@kalisio/kdk 2.6.2 → 2.6.3

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 (299) hide show
  1. package/client/css/core.variables.scss +72 -0
  2. package/client/i18n/core_en.json +744 -0
  3. package/client/i18n/core_fr.json +744 -0
  4. package/client/i18n/map_en.json +800 -0
  5. package/client/i18n/map_fr.json +800 -0
  6. package/client/kdk.client.css +47 -0
  7. package/client/kdk.client.js +41097 -0
  8. package/client/kdk.client.map.css +47 -0
  9. package/client/kdk.client.map.js +38182 -0
  10. package/client/kdk.client.map.min.css +1 -0
  11. package/client/kdk.client.map.min.js +27032 -0
  12. package/client/kdk.client.min.css +1 -0
  13. package/client/kdk.client.min.js +29074 -0
  14. package/client/schemas/capture.create.json +132 -0
  15. package/client/schemas/catalog.update.json +44 -0
  16. package/client/schemas/messages.update.json +16 -0
  17. package/client/schemas/projects.create.json +52 -0
  18. package/client/schemas/projects.update.json +52 -0
  19. package/client/schemas/settings.update.json +286 -0
  20. package/client/schemas/tags.update.json +35 -0
  21. package/client/schemas/users.update-profile.json +34 -0
  22. package/core/api/authentication.js +13 -1
  23. package/core/api/hooks/hooks.query.js +9 -0
  24. package/core/client/capabilities.js +6 -1
  25. package/core/client/components/KChip.vue +27 -6
  26. package/core/client/components/collection/KCard.vue +2 -2
  27. package/core/client/utils/utils.session.js +5 -1
  28. package/coverage/core/api/application.js.html +392 -398
  29. package/coverage/core/api/authentication.js.html +352 -187
  30. package/coverage/core/api/db.js.html +165 -126
  31. package/coverage/core/api/hooks/hooks.authentication.js.html +22 -196
  32. package/coverage/core/api/hooks/hooks.authorisations.js.html +383 -662
  33. package/coverage/core/api/hooks/hooks.logger.js.html +41 -41
  34. package/coverage/core/api/hooks/hooks.model.js.html +113 -101
  35. package/coverage/core/api/hooks/hooks.push.js.html +112 -97
  36. package/coverage/core/api/hooks/hooks.query.js.html +270 -222
  37. package/coverage/core/api/hooks/hooks.schemas.js.html +123 -123
  38. package/coverage/core/api/hooks/hooks.service.js.html +1 -1
  39. package/coverage/core/api/hooks/hooks.storage.js.html +1 -1
  40. package/coverage/core/api/hooks/{hooks.groups.js.html → hooks.tags.js.html} +100 -76
  41. package/coverage/core/api/hooks/hooks.users.js.html +255 -447
  42. package/coverage/core/api/hooks/index.html +107 -122
  43. package/coverage/core/api/hooks/index.js.html +4 -10
  44. package/coverage/core/api/index.html +46 -61
  45. package/coverage/core/api/index.js.html +9 -9
  46. package/coverage/core/api/marshall.js.html +9 -9
  47. package/coverage/core/api/models/{organisations.model.mongodb.js.html → configurations.model.mongodb.js.html} +10 -7
  48. package/coverage/core/api/models/index.html +35 -50
  49. package/coverage/core/api/models/messages.model.mongodb.js.html +39 -27
  50. package/coverage/core/api/models/tags.model.mongodb.js.html +26 -32
  51. package/coverage/core/api/models/users.model.mongodb.js.html +10 -10
  52. package/coverage/core/api/services/account/account.hooks.js.html +5 -5
  53. package/coverage/core/api/services/account/account.service.js.html +127 -127
  54. package/coverage/core/api/services/account/index.html +22 -22
  55. package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +1 -1
  56. package/coverage/core/api/services/authorisations/authorisations.service.js.html +213 -222
  57. package/coverage/core/api/services/authorisations/index.html +21 -21
  58. package/coverage/core/api/services/{groups/groups.hooks.js.html → configurations/configurations.hooks.js.html} +16 -10
  59. package/coverage/{lcov-report/core/api/services/groups → core/api/services/configurations}/index.html +8 -8
  60. package/coverage/core/api/services/databases/databases.hooks.js.html +1 -1
  61. package/coverage/core/api/services/databases/databases.service.js.html +1 -1
  62. package/coverage/core/api/services/databases/index.html +1 -1
  63. package/coverage/core/api/services/import-export/import-export.hooks.js.html +76 -76
  64. package/coverage/core/api/services/import-export/import-export.service.js.html +32 -32
  65. package/coverage/core/api/services/import-export/index.html +32 -32
  66. package/coverage/core/api/services/index.html +21 -21
  67. package/coverage/core/api/services/index.js.html +313 -142
  68. package/coverage/core/api/services/mailer/index.html +32 -32
  69. package/coverage/core/api/services/mailer/mailer.hooks.js.html +80 -80
  70. package/coverage/core/api/services/mailer/mailer.service.js.html +32 -32
  71. package/coverage/core/api/services/messages/index.html +21 -21
  72. package/coverage/core/api/services/messages/messages.hooks.js.html +112 -76
  73. package/coverage/core/api/services/push/index.html +32 -32
  74. package/coverage/core/api/services/push/push.hooks.js.html +80 -80
  75. package/coverage/core/api/services/push/push.service.js.html +34 -34
  76. package/coverage/core/api/services/storage/index.html +29 -29
  77. package/coverage/core/api/services/storage/storage.hooks.js.html +80 -80
  78. package/coverage/core/api/services/storage/storage.service.js.html +29 -29
  79. package/coverage/core/api/services/tags/index.html +21 -21
  80. package/coverage/core/api/services/tags/tags.hooks.js.html +119 -71
  81. package/coverage/core/api/services/users/index.html +27 -12
  82. package/coverage/core/api/services/users/users.hooks.js.html +14 -11
  83. package/coverage/core/api/services/users/users.service.js.html +100 -0
  84. package/coverage/core/common/errors.js.html +1 -1
  85. package/coverage/core/common/index.html +42 -27
  86. package/coverage/core/common/index.js.html +1 -1
  87. package/coverage/core/common/permissions.js.html +166 -472
  88. package/coverage/core/common/schema.js.html +4 -4
  89. package/coverage/core/common/utils.js.html +31 -25
  90. package/coverage/core/common/utils.offline.js.html +199 -0
  91. package/coverage/index.html +192 -192
  92. package/coverage/lcov-report/core/api/application.js.html +392 -398
  93. package/coverage/lcov-report/core/api/authentication.js.html +352 -187
  94. package/coverage/lcov-report/core/api/db.js.html +165 -126
  95. package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +22 -196
  96. package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +383 -662
  97. package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +41 -41
  98. package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +113 -101
  99. package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +112 -97
  100. package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +270 -222
  101. package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +123 -123
  102. package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +1 -1
  103. package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +1 -1
  104. package/coverage/lcov-report/core/api/hooks/{hooks.groups.js.html → hooks.tags.js.html} +100 -76
  105. package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +255 -447
  106. package/coverage/lcov-report/core/api/hooks/index.html +107 -122
  107. package/coverage/lcov-report/core/api/hooks/index.js.html +4 -10
  108. package/coverage/lcov-report/core/api/index.html +46 -61
  109. package/coverage/lcov-report/core/api/index.js.html +9 -9
  110. package/coverage/lcov-report/core/api/marshall.js.html +9 -9
  111. package/coverage/lcov-report/core/api/models/{organisations.model.mongodb.js.html → configurations.model.mongodb.js.html} +10 -7
  112. package/coverage/lcov-report/core/api/models/index.html +35 -50
  113. package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +39 -27
  114. package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +26 -32
  115. package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +10 -10
  116. package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +5 -5
  117. package/coverage/lcov-report/core/api/services/account/account.service.js.html +127 -127
  118. package/coverage/lcov-report/core/api/services/account/index.html +22 -22
  119. package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +1 -1
  120. package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +213 -222
  121. package/coverage/lcov-report/core/api/services/authorisations/index.html +21 -21
  122. package/coverage/lcov-report/core/api/services/{groups/groups.hooks.js.html → configurations/configurations.hooks.js.html} +16 -10
  123. package/coverage/{core/api/services/groups → lcov-report/core/api/services/configurations}/index.html +8 -8
  124. package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +1 -1
  125. package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +1 -1
  126. package/coverage/lcov-report/core/api/services/databases/index.html +1 -1
  127. package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +76 -76
  128. package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +32 -32
  129. package/coverage/lcov-report/core/api/services/import-export/index.html +32 -32
  130. package/coverage/lcov-report/core/api/services/index.html +21 -21
  131. package/coverage/lcov-report/core/api/services/index.js.html +313 -142
  132. package/coverage/lcov-report/core/api/services/mailer/index.html +32 -32
  133. package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +80 -80
  134. package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +32 -32
  135. package/coverage/lcov-report/core/api/services/messages/index.html +21 -21
  136. package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +112 -76
  137. package/coverage/lcov-report/core/api/services/push/index.html +32 -32
  138. package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +80 -80
  139. package/coverage/lcov-report/core/api/services/push/push.service.js.html +34 -34
  140. package/coverage/lcov-report/core/api/services/storage/index.html +29 -29
  141. package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +80 -80
  142. package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +29 -29
  143. package/coverage/lcov-report/core/api/services/tags/index.html +21 -21
  144. package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +119 -71
  145. package/coverage/lcov-report/core/api/services/users/index.html +27 -12
  146. package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +14 -11
  147. package/coverage/lcov-report/core/api/services/users/users.service.js.html +100 -0
  148. package/coverage/lcov-report/core/common/errors.js.html +1 -1
  149. package/coverage/lcov-report/core/common/index.html +42 -27
  150. package/coverage/lcov-report/core/common/index.js.html +1 -1
  151. package/coverage/lcov-report/core/common/permissions.js.html +166 -472
  152. package/coverage/lcov-report/core/common/schema.js.html +4 -4
  153. package/coverage/lcov-report/core/common/utils.js.html +31 -25
  154. package/coverage/lcov-report/core/common/utils.offline.js.html +199 -0
  155. package/coverage/lcov-report/index.html +192 -192
  156. package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +169 -31
  157. package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +1 -1
  158. package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +32 -32
  159. package/coverage/lcov-report/map/api/hooks/index.html +5 -5
  160. package/coverage/lcov-report/map/api/hooks/index.js.html +1 -1
  161. package/coverage/lcov-report/map/api/index.html +1 -1
  162. package/coverage/lcov-report/map/api/index.js.html +1 -1
  163. package/coverage/lcov-report/map/api/marshall.js.html +1 -1
  164. package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +1 -1
  165. package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +82 -7
  166. package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +1 -1
  167. package/coverage/lcov-report/map/api/models/index.html +22 -7
  168. package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +1 -1
  169. package/coverage/lcov-report/{core/api/models/groups.model.mongodb.js.html → map/api/models/styles.model.mongodb.js.html} +10 -7
  170. package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +1 -1
  171. package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +1 -1
  172. package/coverage/lcov-report/map/api/services/alerts/index.html +1 -1
  173. package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +39 -12
  174. package/coverage/lcov-report/map/api/services/catalog/index.html +5 -5
  175. package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +1 -1
  176. package/coverage/lcov-report/map/api/services/daptiles/index.html +1 -1
  177. package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +86 -11
  178. package/coverage/lcov-report/map/api/services/features/features.service.js.html +307 -4
  179. package/coverage/lcov-report/map/api/services/features/index.html +7 -7
  180. package/coverage/lcov-report/map/api/services/index.html +5 -5
  181. package/coverage/lcov-report/map/api/services/index.js.html +326 -50
  182. package/coverage/lcov-report/map/api/services/projects/index.html +1 -1
  183. package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +1 -1
  184. package/coverage/{core/api/services/organisations → lcov-report/map/api/services/styles}/index.html +10 -25
  185. package/coverage/{core/api/services/organisations/organisations.hooks.js.html → lcov-report/map/api/services/styles/styles.hooks.js.html} +45 -12
  186. package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +1 -1
  187. package/coverage/lcov-report/map/common/errors.js.html +1 -1
  188. package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +7 -10
  189. package/coverage/lcov-report/map/common/grid.js.html +1 -1
  190. package/coverage/lcov-report/map/common/index.html +19 -19
  191. package/coverage/lcov-report/map/common/index.js.html +1 -1
  192. package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +1 -1
  193. package/coverage/lcov-report/map/common/moment-utils.js.html +1 -1
  194. package/coverage/lcov-report/map/common/opendap-grid-source.js.html +1 -1
  195. package/coverage/lcov-report/map/common/opendap-utils.js.html +4 -7
  196. package/coverage/lcov-report/map/common/permissions.js.html +10 -4
  197. package/coverage/lcov-report/map/common/time-based-grid-source.js.html +1 -1
  198. package/coverage/lcov-report/map/common/tms-utils.js.html +9 -12
  199. package/coverage/lcov-report/map/common/wcs-grid-source.js.html +3 -3
  200. package/coverage/lcov-report/map/common/wcs-utils.js.html +12 -15
  201. package/coverage/lcov-report/map/common/weacast-grid-source.js.html +2 -2
  202. package/coverage/lcov-report/map/common/wfs-utils.js.html +14 -17
  203. package/coverage/lcov-report/map/common/wms-utils.js.html +30 -12
  204. package/coverage/lcov-report/map/common/wmts-utils.js.html +10 -13
  205. package/coverage/lcov.info +4172 -3909
  206. package/coverage/map/api/hooks/hooks.catalog.js.html +169 -31
  207. package/coverage/map/api/hooks/hooks.features.js.html +1 -1
  208. package/coverage/map/api/hooks/hooks.query.js.html +32 -32
  209. package/coverage/map/api/hooks/index.html +5 -5
  210. package/coverage/map/api/hooks/index.js.html +1 -1
  211. package/coverage/map/api/index.html +1 -1
  212. package/coverage/map/api/index.js.html +1 -1
  213. package/coverage/map/api/marshall.js.html +1 -1
  214. package/coverage/map/api/models/alerts.model.mongodb.js.html +1 -1
  215. package/coverage/map/api/models/catalog.model.mongodb.js.html +82 -7
  216. package/coverage/map/api/models/features.model.mongodb.js.html +1 -1
  217. package/coverage/map/api/models/index.html +22 -7
  218. package/coverage/map/api/models/projects.model.mongodb.js.html +1 -1
  219. package/coverage/{core/api/models/groups.model.mongodb.js.html → map/api/models/styles.model.mongodb.js.html} +10 -7
  220. package/coverage/map/api/services/alerts/alerts.hooks.js.html +1 -1
  221. package/coverage/map/api/services/alerts/alerts.service.js.html +1 -1
  222. package/coverage/map/api/services/alerts/index.html +1 -1
  223. package/coverage/map/api/services/catalog/catalog.hooks.js.html +39 -12
  224. package/coverage/map/api/services/catalog/index.html +5 -5
  225. package/coverage/map/api/services/daptiles/daptiles.service.js.html +1 -1
  226. package/coverage/map/api/services/daptiles/index.html +1 -1
  227. package/coverage/map/api/services/features/features.hooks.js.html +86 -11
  228. package/coverage/map/api/services/features/features.service.js.html +307 -4
  229. package/coverage/map/api/services/features/index.html +7 -7
  230. package/coverage/map/api/services/index.html +5 -5
  231. package/coverage/map/api/services/index.js.html +326 -50
  232. package/coverage/map/api/services/projects/index.html +1 -1
  233. package/coverage/map/api/services/projects/projects.hooks.js.html +1 -1
  234. package/coverage/{lcov-report/core/api/services/organisations → map/api/services/styles}/index.html +10 -25
  235. package/coverage/{lcov-report/core/api/services/organisations/organisations.hooks.js.html → map/api/services/styles/styles.hooks.js.html} +45 -12
  236. package/coverage/map/common/dynamic-grid-source.js.html +1 -1
  237. package/coverage/map/common/errors.js.html +1 -1
  238. package/coverage/map/common/geotiff-grid-source.js.html +7 -10
  239. package/coverage/map/common/grid.js.html +1 -1
  240. package/coverage/map/common/index.html +19 -19
  241. package/coverage/map/common/index.js.html +1 -1
  242. package/coverage/map/common/meteo-model-grid-source.js.html +1 -1
  243. package/coverage/map/common/moment-utils.js.html +1 -1
  244. package/coverage/map/common/opendap-grid-source.js.html +1 -1
  245. package/coverage/map/common/opendap-utils.js.html +4 -7
  246. package/coverage/map/common/permissions.js.html +10 -4
  247. package/coverage/map/common/time-based-grid-source.js.html +1 -1
  248. package/coverage/map/common/tms-utils.js.html +9 -12
  249. package/coverage/map/common/wcs-grid-source.js.html +3 -3
  250. package/coverage/map/common/wcs-utils.js.html +12 -15
  251. package/coverage/map/common/weacast-grid-source.js.html +2 -2
  252. package/coverage/map/common/wfs-utils.js.html +14 -17
  253. package/coverage/map/common/wms-utils.js.html +30 -12
  254. package/coverage/map/common/wmts-utils.js.html +10 -13
  255. package/coverage/tmp/coverage-222524-1765963609350-0.json +1 -0
  256. package/coverage/tmp/coverage-222536-1765963609335-0.json +1 -0
  257. package/coverage/tmp/coverage-222547-1765963609324-0.json +1 -0
  258. package/coverage/tmp/coverage-222559-1765963609309-0.json +1 -0
  259. package/coverage/tmp/coverage-222566-1765963609278-0.json +1 -0
  260. package/map/api/hooks/hooks.query.js +60 -0
  261. package/map/client/components/stickies/KZoomControl.vue +17 -9
  262. package/map/client/i18n/map_en.json +6 -0
  263. package/map/client/i18n/map_fr.json +6 -0
  264. package/map/client/mixins/map/mixin.base-map.js +19 -1
  265. package/package.json +2 -2
  266. package/scripts/kash/CHANGELOG.md +4 -0
  267. package/scripts/kash/LICENSE +21 -0
  268. package/scripts/kash/README.md +9 -0
  269. package/scripts/kash/kash.sh +40 -45
  270. package/scripts/kash/scripts/run_tests.sh +4 -1
  271. package/test/api/core/config/default.cjs +1 -0
  272. package/test/api/core/test-log-2025-07-31.log +15 -0
  273. package/test/api/core/{test-log-2024-04-23.log → test-log-2025-10-03.log} +4 -9
  274. package/test/api/core/test-log-2025-11-12.log +117 -0
  275. package/test/api/core/test-log-2025-11-27.log +0 -0
  276. package/test/api/core/test-log-2025-11-28.log +17 -0
  277. package/test/api/core/test-log-2025-12-09.log +148 -0
  278. package/test/api/core/test-log-2025-12-17.log +58 -0
  279. package/test/api/core/test-log-2026-01-29.log +17 -0
  280. package/test/api/map/index.test.js +21 -0
  281. package/test/api/map/test-log-2025-07-23.log +1 -0
  282. package/test/api/map/test-log-2025-11-28.log +33 -0
  283. package/test/api/map/test-log-2025-12-10.log +2 -0
  284. package/test/api/map/test-log-2026-01-06.log +26 -0
  285. package/.vscode/settings.json +0 -5
  286. package/coverage/core/api/hooks/hooks.organisations.js.html +0 -541
  287. package/coverage/core/api/services/organisations/organisations.service.js.html +0 -343
  288. package/coverage/core/api/utils.js.html +0 -118
  289. package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +0 -541
  290. package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +0 -343
  291. package/coverage/lcov-report/core/api/utils.js.html +0 -118
  292. package/coverage/tmp/coverage-151166-1723543324307-0.json +0 -1
  293. package/coverage/tmp/coverage-151178-1723543324283-0.json +0 -1
  294. package/coverage/tmp/coverage-151189-1723543324271-0.json +0 -1
  295. package/coverage/tmp/coverage-151201-1723543324248-0.json +0 -1
  296. package/coverage/tmp/coverage-151208-1723543324227-0.json +0 -1
  297. package/test/api/core/test-log-2024-04-22.log +0 -84
  298. package/test/api/core/test-log-2024-08-13.log +0 -3
  299. /package/test/api/{map/test-log-2025-03-08.log → core/test-log-2025-11-10.log} +0 -0
@@ -30,6 +30,16 @@ export class Authentication extends AuthenticationService {
30
30
  return {}
31
31
  }
32
32
  }
33
+
34
+ // Similarly the subject will not be set by Feathers for stateless tokens that do not target existing users.
35
+ async getTokenOptions (authResult, params) {
36
+ const jwtOptions = await super.getTokenOptions(authResult, params)
37
+ if (!jwtOptions.subject) {
38
+ const subject = _.get(authResult, 'authentication.payload.sub')
39
+ if (subject) jwtOptions.subject = subject
40
+ }
41
+ return jwtOptions
42
+ }
33
43
  }
34
44
 
35
45
  export class AuthenticationProviderStrategy extends OAuthStrategy {
@@ -105,6 +115,7 @@ export class JWTAuthenticationStrategy extends JWTStrategy {
105
115
  const { identityFields } = authConfig
106
116
  const { entity } = this.configuration
107
117
  const renewJwt = _.get(this.configuration, 'renewJwt', true)
118
+ const { provider, ...paramsWithoutProvider } = params
108
119
 
109
120
  if (!accessToken) {
110
121
  throw new NotAuthenticated('No access token')
@@ -142,7 +153,8 @@ export class JWTAuthenticationStrategy extends JWTStrategy {
142
153
  $or: _.reduce(identityFields, (or, field) => or.concat([{ [field]: payload.sub }]), []),
143
154
  $limit: 1
144
155
  }
145
- const response = await this.entityService.find({ ...params, query })
156
+ // Avoid sending provider to internal call as it might raises some issues with hooks relying on it otherwise
157
+ const response = await this.entityService.find({ ...paramsWithoutProvider, query })
146
158
  const [value = null] = response.data ? response.data : response
147
159
  // Otherwise assume a stateless token
148
160
  if (value) {
@@ -1,10 +1,12 @@
1
1
  import _ from 'lodash'
2
2
  import { marshallComparisonFields, marshallTime, marshallBooleanFields, marshallNumberFields, marshallDateFields } from '../marshall.js'
3
3
  import mongodb from 'mongodb'
4
+ import errors from '@feathersjs/errors'
4
5
  import makeDebug from 'debug'
5
6
  import { makeDiacriticPattern } from '../../common/utils.js'
6
7
 
7
8
  const { ObjectID } = mongodb
9
+ const { Forbidden } = errors
8
10
  const debug = makeDebug('kdk:core:query:hooks')
9
11
 
10
12
  export function marshallTimeQuery (hook) {
@@ -59,10 +61,17 @@ export function marshallHttpQuery (hook) {
59
61
  }
60
62
 
61
63
  export async function aggregationQuery (hook) {
64
+ if (hook.type !== 'before') {
65
+ throw new Error('The \'aggregationQuery\' hook should only be used as a \'before\' hook.')
66
+ }
62
67
  const query = hook.params.query
63
68
  if (!query) return
64
69
  const service = hook.service
65
70
  if (query.$aggregation) {
71
+ // Generic aggregation request could allow to disclose or update information in DB so that it should only be used through controlled internal calls
72
+ if (hook.params.provider) {
73
+ throw new Forbidden('You are not allowed to perform aggregation')
74
+ }
66
75
  const collection = service.Model
67
76
  // Set result to avoid service DB call
68
77
  hook.result = await collection.aggregate(query.$aggregation.pipeline, query.$aggregation.options).toArray()
@@ -17,7 +17,12 @@ export const Capabilities = {
17
17
  const capabilities = await window.fetch(api.getConfig('domain') + _.get(config, 'apiPath') + '/capabilities')
18
18
  this.content = await capabilities.json()
19
19
  // Store latest capabilities data for offline mode
20
- await LocalCache.setItem('capabilities', this.content)
20
+ // Avoid blocking on eg QuotaExceededError
21
+ try {
22
+ await LocalCache.setItem('capabilities', this.content)
23
+ } catch (error) {
24
+ logger.error(error)
25
+ }
21
26
  }
22
27
  logger.debug('[KDK] Capabilities initialized with content:', this.content)
23
28
  if (!this.content) return
@@ -2,7 +2,7 @@
2
2
  <q-chip
3
3
  v-model="computedState"
4
4
  :selected="selected"
5
- :icon="icon"
5
+ :icon="computedIcon"
6
6
  :iconRight="iconRight"
7
7
  :iconRemove="iconRemove"
8
8
  :iconSelected="iconSelected"
@@ -17,7 +17,7 @@
17
17
  @click="event => emit('click', event)"
18
18
  class="k-chip"
19
19
  >
20
- <div v-if="computedLabel"
20
+ <div v-if="!hideLabel && computedLabel"
21
21
  :id="id"
22
22
  class="ellipsis"
23
23
  :class="{ 'q-pl-sm': !dense && (icon || isTruncated ) , 'q-pl-xs': dense && (icon || isTruncated) }"
@@ -46,10 +46,21 @@ const props = defineProps({
46
46
  type: [String, Number],
47
47
  default: ''
48
48
  },
49
+ hideLabel: {
50
+ type: Boolean,
51
+ default: false
52
+ },
49
53
  tooltip: {
50
54
  type: String,
51
55
  default: undefined
52
56
  },
57
+ tooltipBehavior: {
58
+ type: String,
59
+ default: 'truncated',
60
+ validator: (value) => {
61
+ return ['always', 'truncated', 'never'].includes(value)
62
+ }
63
+ },
53
64
  icon: {
54
65
  type: String,
55
66
  default: undefined
@@ -66,6 +77,10 @@ const props = defineProps({
66
77
  type: String,
67
78
  default: 'check'
68
79
  },
80
+ hideIcon: {
81
+ type: Boolean,
82
+ default: false
83
+ },
69
84
  modelValue: {
70
85
  type: Boolean,
71
86
  default: true
@@ -129,11 +144,17 @@ const computedState = computed({
129
144
  }
130
145
  })
131
146
  const computedLabel = computed(() => {
132
- return i18n.tie(props.label)
147
+ if (!props.hideLabel && props.label) return i18n.tie(props.label)
148
+ })
149
+ const computedIcon = computed(() => {
150
+ if (!props.hideIcon) return props.icon
133
151
  })
134
152
  const computedTooltip = computed(() => {
135
- if (props.tooltip) return i18n.tie(props.tooltip)
136
- if (props.label && isTruncated.value) return computedLabel.value
153
+ if (props.tooltipBehavior === 'never') return
154
+ if (props.tooltipBehavior === 'truncated') {
155
+ if (!isTruncated.value) return
156
+ }
157
+ return props.label ? i18n.tie(props.label) : props.tooltip
137
158
  })
138
159
  const computedColor = computed(() => {
139
160
  return props.outline ? 'transparent' : getHtmlColor(props.color)
@@ -153,7 +174,7 @@ const computedBorderColor = computed(() => {
153
174
  function onResize () {
154
175
  // check whether the label is truncated
155
176
  const chipElement = document.getElementById(id)
156
- if (chipElement) isTruncated.value = (chipElement && chipElement.offsetWidth < chipElement.scrollWidth)
177
+ if (chipElement) isTruncated.value = (chipElement && (chipElement.offsetWidth < chipElement.scrollWidth))
157
178
  }
158
179
  </script>
159
180
 
@@ -163,10 +163,10 @@ export default {
163
163
  computedSections () {
164
164
  return _.map(this.sections, (value, key) => {
165
165
  return {
166
- ...value,
167
166
  item: this.item,
168
167
  actions: _.filter(this.itemActions, { scope: key }),
169
- dense: this.dense
168
+ dense: this.dense,
169
+ ...value
170
170
  }
171
171
  })
172
172
  },
@@ -11,7 +11,11 @@ async function authenticate(authentication) {
11
11
  let user = Store.get('user')
12
12
  if (user) return
13
13
  // Store latest authentication data for offline mode
14
- await LocalCache.setItem('authentication', authentication)
14
+ try {
15
+ await LocalCache.setItem('authentication', authentication)
16
+ } catch (error) {
17
+ logger.error(error)
18
+ }
15
19
  // Anonymous user or user account ?
16
20
  user = authentication.user ? authentication.user : { name: i18n.t('composables.ANONYMOUS'), anonymous: true }
17
21
  Store.set('user', user)