@kalisio/kdk 2.3.2 → 2.4.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 (441) hide show
  1. package/.eslintignore +2 -1
  2. package/.github/workflows/main.yaml +3 -3
  3. package/README.md +1 -0
  4. package/core/api/db.js +6 -1
  5. package/core/api/hooks/hooks.model.js +1 -1
  6. package/core/api/hooks/hooks.schemas.js +0 -2
  7. package/core/api/models/messages.model.mongodb.js +13 -0
  8. package/core/api/services/authorisations/authorisations.service.js +13 -4
  9. package/core/api/services/index.js +19 -0
  10. package/core/api/services/messages/messages.hooks.js +38 -0
  11. package/core/client/api.js +7 -32
  12. package/core/client/capabilities.js +2 -2
  13. package/core/client/components/KActivity.vue +29 -6
  14. package/core/client/components/KContent.vue +2 -2
  15. package/core/client/components/KDialog.vue +4 -7
  16. package/core/client/components/KStamp.vue +3 -9
  17. package/core/client/components/KStore.vue +2 -4
  18. package/core/client/components/KTab.vue +95 -0
  19. package/core/client/components/action/KAction.vue +15 -2
  20. package/core/client/components/action/KBugReportAction.vue +4 -2
  21. package/core/client/components/action/KToggleFullscreenAction.vue +25 -0
  22. package/core/client/components/app/KSettings.vue +17 -13
  23. package/core/client/components/chart/KDataTable.vue +6 -9
  24. package/core/client/components/chart/KTimeSeriesChart.vue +62 -49
  25. package/core/client/components/collection/KBoard.vue +22 -33
  26. package/core/client/components/collection/KCard.vue +71 -56
  27. package/core/client/components/collection/KCardSection.vue +20 -10
  28. package/core/client/components/collection/KDescriptionCardSection.vue +47 -0
  29. package/core/client/components/collection/KGrid.vue +234 -54
  30. package/core/client/components/collection/KScrollDown.vue +97 -0
  31. package/core/client/components/collection/KScrollToTop.vue +93 -0
  32. package/core/client/components/collection/KTable.vue +87 -33
  33. package/core/client/components/collection/KTimeLine.vue +406 -0
  34. package/core/client/components/collection/index.js +1 -5
  35. package/core/client/components/document/KDocument.vue +20 -55
  36. package/core/client/components/document/KHtml.vue +17 -7
  37. package/core/client/components/document/KImage.vue +78 -0
  38. package/core/client/components/document/KMarkdown.vue +12 -16
  39. package/core/client/components/document/KPdf.vue +69 -0
  40. package/core/client/components/form/KFileField.vue +2 -2
  41. package/core/client/components/form/KSelectField.vue +2 -1
  42. package/core/client/components/form/KUnitField.vue +3 -1
  43. package/core/client/components/layout/KFab.vue +9 -10
  44. package/core/client/components/layout/KLayout.vue +104 -6
  45. package/core/client/components/layout/KOpener.vue +14 -19
  46. package/core/client/components/layout/KPage.vue +195 -105
  47. package/core/client/components/layout/KWindow.vue +54 -32
  48. package/core/client/components/layout/index.js +0 -2
  49. package/core/client/components/media/KRibbon.vue +95 -0
  50. package/core/client/components/menu/KMenu.vue +4 -4
  51. package/core/client/components/team/KGroupsActivity.vue +25 -27
  52. package/core/client/components/team/KMembersActivity.vue +21 -23
  53. package/core/client/components/team/KOrganisationsActivity.vue +20 -22
  54. package/core/client/components/team/KTagsActivity.vue +21 -23
  55. package/core/client/components/time/KAbsoluteTimeRange.vue +70 -170
  56. package/core/client/composables/activity.js +14 -12
  57. package/core/client/composables/collection.js +3 -1
  58. package/core/client/composables/counter.js +51 -0
  59. package/core/client/composables/index.js +3 -0
  60. package/core/client/composables/layout.js +13 -2
  61. package/core/client/composables/messages.js +15 -0
  62. package/core/client/composables/pwa.js +1 -1
  63. package/core/client/composables/schema.js +6 -6
  64. package/core/client/composables/screen.js +23 -0
  65. package/core/client/directives/index.js +1 -0
  66. package/core/client/directives/v-hover.js +23 -0
  67. package/core/client/document.js +61 -0
  68. package/core/client/exporter.js +1 -1
  69. package/core/client/filter.js +0 -1
  70. package/core/client/guards.js +1 -1
  71. package/core/client/i18n/core_en.json +14 -8
  72. package/core/client/i18n/core_fr.json +15 -9
  73. package/core/client/index.js +9 -3
  74. package/core/client/layout.js +129 -29
  75. package/core/client/local-storage.js +1 -1
  76. package/core/client/mixins/index.js +0 -1
  77. package/core/client/mixins/mixin.base-activity.js +23 -13
  78. package/core/client/mixins/mixin.base-item.js +6 -3
  79. package/core/client/services/index.js +4 -1
  80. package/core/client/services/local-settings.service.js +4 -0
  81. package/core/client/storage.js +1 -1
  82. package/core/client/store.js +1 -1
  83. package/core/client/template-context.js +17 -0
  84. package/core/client/units.js +49 -27
  85. package/core/client/utils/index.js +3 -2
  86. package/core/client/utils/utils.actions.js +4 -0
  87. package/core/client/utils/utils.colors.js +155 -2
  88. package/core/client/utils/utils.items.js +26 -0
  89. package/core/client/utils/utils.math.js +3 -0
  90. package/core/client/utils/utils.platform.js +3 -1
  91. package/core/client/utils/utils.screen.js +82 -0
  92. package/core/client/utils/utils.time.js +0 -1
  93. package/core/common/schemas/settings.update.json +12 -0
  94. package/coverage/base.css +224 -0
  95. package/coverage/block-navigation.js +87 -0
  96. package/coverage/core/api/application.js.html +1870 -0
  97. package/coverage/core/api/authentication.js.html +742 -0
  98. package/coverage/core/api/db.js.html +793 -0
  99. package/coverage/core/api/hooks/hooks.authentication.js.html +313 -0
  100. package/coverage/core/api/hooks/hooks.authorisations.js.html +1243 -0
  101. package/coverage/core/api/hooks/hooks.groups.js.html +229 -0
  102. package/coverage/core/api/hooks/hooks.logger.js.html +163 -0
  103. package/coverage/core/api/hooks/hooks.model.js.html +955 -0
  104. package/coverage/core/api/hooks/hooks.organisations.js.html +541 -0
  105. package/coverage/core/api/hooks/hooks.push.js.html +253 -0
  106. package/coverage/core/api/hooks/hooks.query.js.html +862 -0
  107. package/coverage/core/api/hooks/hooks.schemas.js.html +298 -0
  108. package/coverage/core/api/hooks/hooks.service.js.html +319 -0
  109. package/coverage/core/api/hooks/hooks.storage.js.html +193 -0
  110. package/coverage/core/api/hooks/hooks.users.js.html +868 -0
  111. package/coverage/core/api/hooks/index.html +296 -0
  112. package/coverage/core/api/hooks/index.js.html +121 -0
  113. package/coverage/core/api/index.html +191 -0
  114. package/coverage/core/api/index.js.html +148 -0
  115. package/coverage/core/api/marshall.js.html +448 -0
  116. package/coverage/core/api/models/groups.model.mongodb.js.html +109 -0
  117. package/coverage/core/api/models/index.html +176 -0
  118. package/coverage/core/api/models/messages.model.mongodb.js.html +121 -0
  119. package/coverage/core/api/models/organisations.model.mongodb.js.html +94 -0
  120. package/coverage/core/api/models/tags.model.mongodb.js.html +115 -0
  121. package/coverage/core/api/models/users.model.mongodb.js.html +115 -0
  122. package/coverage/core/api/services/account/account.hooks.js.html +208 -0
  123. package/coverage/core/api/services/account/account.service.js.html +436 -0
  124. package/coverage/core/api/services/account/index.html +131 -0
  125. package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +184 -0
  126. package/coverage/core/api/services/authorisations/authorisations.service.js.html +529 -0
  127. package/coverage/core/api/services/authorisations/index.html +131 -0
  128. package/coverage/core/api/services/databases/databases.hooks.js.html +193 -0
  129. package/coverage/core/api/services/databases/databases.service.js.html +100 -0
  130. package/coverage/core/api/services/databases/index.html +131 -0
  131. package/coverage/core/api/services/groups/groups.hooks.js.html +178 -0
  132. package/coverage/core/api/services/groups/index.html +116 -0
  133. package/coverage/core/api/services/import-export/import-export.hooks.js.html +184 -0
  134. package/coverage/core/api/services/import-export/import-export.service.js.html +118 -0
  135. package/coverage/core/api/services/import-export/index.html +131 -0
  136. package/coverage/core/api/services/index.html +116 -0
  137. package/coverage/core/api/services/index.js.html +556 -0
  138. package/coverage/core/api/services/mailer/index.html +131 -0
  139. package/coverage/core/api/services/mailer/mailer.hooks.js.html +190 -0
  140. package/coverage/core/api/services/mailer/mailer.service.js.html +118 -0
  141. package/coverage/core/api/services/messages/index.html +116 -0
  142. package/coverage/core/api/services/messages/messages.hooks.js.html +199 -0
  143. package/coverage/core/api/services/organisations/index.html +131 -0
  144. package/coverage/core/api/services/organisations/organisations.hooks.js.html +178 -0
  145. package/coverage/core/api/services/organisations/organisations.service.js.html +343 -0
  146. package/coverage/core/api/services/push/index.html +131 -0
  147. package/coverage/core/api/services/push/push.hooks.js.html +190 -0
  148. package/coverage/core/api/services/push/push.service.js.html +121 -0
  149. package/coverage/core/api/services/storage/index.html +131 -0
  150. package/coverage/core/api/services/storage/storage.hooks.js.html +190 -0
  151. package/coverage/core/api/services/storage/storage.service.js.html +172 -0
  152. package/coverage/core/api/services/tags/index.html +116 -0
  153. package/coverage/core/api/services/tags/tags.hooks.js.html +178 -0
  154. package/coverage/core/api/services/users/index.html +116 -0
  155. package/coverage/core/api/services/users/users.hooks.js.html +307 -0
  156. package/coverage/core/api/utils.js.html +118 -0
  157. package/coverage/core/common/errors.js.html +88 -0
  158. package/coverage/core/common/index.html +176 -0
  159. package/coverage/core/common/index.js.html +115 -0
  160. package/coverage/core/common/permissions.js.html +1048 -0
  161. package/coverage/core/common/schema.js.html +190 -0
  162. package/coverage/core/common/utils.js.html +220 -0
  163. package/coverage/favicon.png +0 -0
  164. package/coverage/index.html +506 -0
  165. package/coverage/lcov-report/base.css +224 -0
  166. package/coverage/lcov-report/block-navigation.js +87 -0
  167. package/coverage/lcov-report/core/api/application.js.html +1870 -0
  168. package/coverage/lcov-report/core/api/authentication.js.html +742 -0
  169. package/coverage/lcov-report/core/api/db.js.html +793 -0
  170. package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +313 -0
  171. package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +1243 -0
  172. package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +229 -0
  173. package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +163 -0
  174. package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +955 -0
  175. package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +541 -0
  176. package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +253 -0
  177. package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +862 -0
  178. package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +298 -0
  179. package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +319 -0
  180. package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +193 -0
  181. package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +868 -0
  182. package/coverage/lcov-report/core/api/hooks/index.html +296 -0
  183. package/coverage/lcov-report/core/api/hooks/index.js.html +121 -0
  184. package/coverage/lcov-report/core/api/index.html +191 -0
  185. package/coverage/lcov-report/core/api/index.js.html +148 -0
  186. package/coverage/lcov-report/core/api/marshall.js.html +448 -0
  187. package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +109 -0
  188. package/coverage/lcov-report/core/api/models/index.html +176 -0
  189. package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +121 -0
  190. package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +94 -0
  191. package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +115 -0
  192. package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +115 -0
  193. package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +208 -0
  194. package/coverage/lcov-report/core/api/services/account/account.service.js.html +436 -0
  195. package/coverage/lcov-report/core/api/services/account/index.html +131 -0
  196. package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +184 -0
  197. package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +529 -0
  198. package/coverage/lcov-report/core/api/services/authorisations/index.html +131 -0
  199. package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +193 -0
  200. package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +100 -0
  201. package/coverage/lcov-report/core/api/services/databases/index.html +131 -0
  202. package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +178 -0
  203. package/coverage/lcov-report/core/api/services/groups/index.html +116 -0
  204. package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +184 -0
  205. package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +118 -0
  206. package/coverage/lcov-report/core/api/services/import-export/index.html +131 -0
  207. package/coverage/lcov-report/core/api/services/index.html +116 -0
  208. package/coverage/lcov-report/core/api/services/index.js.html +556 -0
  209. package/coverage/lcov-report/core/api/services/mailer/index.html +131 -0
  210. package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +190 -0
  211. package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +118 -0
  212. package/coverage/lcov-report/core/api/services/messages/index.html +116 -0
  213. package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +199 -0
  214. package/coverage/lcov-report/core/api/services/organisations/index.html +131 -0
  215. package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +178 -0
  216. package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +343 -0
  217. package/coverage/lcov-report/core/api/services/push/index.html +131 -0
  218. package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +190 -0
  219. package/coverage/lcov-report/core/api/services/push/push.service.js.html +121 -0
  220. package/coverage/lcov-report/core/api/services/storage/index.html +131 -0
  221. package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +190 -0
  222. package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +172 -0
  223. package/coverage/lcov-report/core/api/services/tags/index.html +116 -0
  224. package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +178 -0
  225. package/coverage/lcov-report/core/api/services/users/index.html +116 -0
  226. package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +307 -0
  227. package/coverage/lcov-report/core/api/utils.js.html +118 -0
  228. package/coverage/lcov-report/core/common/errors.js.html +88 -0
  229. package/coverage/lcov-report/core/common/index.html +176 -0
  230. package/coverage/lcov-report/core/common/index.js.html +115 -0
  231. package/coverage/lcov-report/core/common/permissions.js.html +1048 -0
  232. package/coverage/lcov-report/core/common/schema.js.html +190 -0
  233. package/coverage/lcov-report/core/common/utils.js.html +220 -0
  234. package/coverage/lcov-report/favicon.png +0 -0
  235. package/coverage/lcov-report/index.html +506 -0
  236. package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +457 -0
  237. package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +397 -0
  238. package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +1309 -0
  239. package/coverage/lcov-report/map/api/hooks/index.html +161 -0
  240. package/coverage/lcov-report/map/api/hooks/index.js.html +94 -0
  241. package/coverage/lcov-report/map/api/index.html +131 -0
  242. package/coverage/lcov-report/map/api/index.js.html +139 -0
  243. package/coverage/lcov-report/map/api/marshall.js.html +178 -0
  244. package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +106 -0
  245. package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +127 -0
  246. package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +196 -0
  247. package/coverage/lcov-report/map/api/models/index.html +161 -0
  248. package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +109 -0
  249. package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +274 -0
  250. package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +610 -0
  251. package/coverage/lcov-report/map/api/services/alerts/index.html +131 -0
  252. package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +310 -0
  253. package/coverage/lcov-report/map/api/services/catalog/index.html +116 -0
  254. package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +1510 -0
  255. package/coverage/lcov-report/map/api/services/daptiles/index.html +116 -0
  256. package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +241 -0
  257. package/coverage/lcov-report/map/api/services/features/features.service.js.html +241 -0
  258. package/coverage/lcov-report/map/api/services/features/index.html +131 -0
  259. package/coverage/lcov-report/map/api/services/index.html +116 -0
  260. package/coverage/lcov-report/map/api/services/index.js.html +817 -0
  261. package/coverage/lcov-report/map/api/services/projects/index.html +116 -0
  262. package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +439 -0
  263. package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +466 -0
  264. package/coverage/lcov-report/map/common/errors.js.html +94 -0
  265. package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +541 -0
  266. package/coverage/lcov-report/map/common/grid.js.html +1612 -0
  267. package/coverage/lcov-report/map/common/index.html +371 -0
  268. package/coverage/lcov-report/map/common/index.js.html +172 -0
  269. package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +556 -0
  270. package/coverage/lcov-report/map/common/moment-utils.js.html +157 -0
  271. package/coverage/lcov-report/map/common/opendap-grid-source.js.html +868 -0
  272. package/coverage/lcov-report/map/common/opendap-utils.js.html +826 -0
  273. package/coverage/lcov-report/map/common/permissions.js.html +124 -0
  274. package/coverage/lcov-report/map/common/time-based-grid-source.js.html +418 -0
  275. package/coverage/lcov-report/map/common/tms-utils.js.html +274 -0
  276. package/coverage/lcov-report/map/common/wcs-grid-source.js.html +364 -0
  277. package/coverage/lcov-report/map/common/wcs-utils.js.html +586 -0
  278. package/coverage/lcov-report/map/common/weacast-grid-source.js.html +1033 -0
  279. package/coverage/lcov-report/map/common/wfs-utils.js.html +574 -0
  280. package/coverage/lcov-report/map/common/wms-utils.js.html +451 -0
  281. package/coverage/lcov-report/map/common/wmts-utils.js.html +547 -0
  282. package/coverage/lcov-report/prettify.css +1 -0
  283. package/coverage/lcov-report/prettify.js +2 -0
  284. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  285. package/coverage/lcov-report/sorter.js +196 -0
  286. package/coverage/lcov.info +11245 -0
  287. package/coverage/map/api/hooks/hooks.catalog.js.html +457 -0
  288. package/coverage/map/api/hooks/hooks.features.js.html +397 -0
  289. package/coverage/map/api/hooks/hooks.query.js.html +1309 -0
  290. package/coverage/map/api/hooks/index.html +161 -0
  291. package/coverage/map/api/hooks/index.js.html +94 -0
  292. package/coverage/map/api/index.html +131 -0
  293. package/coverage/map/api/index.js.html +139 -0
  294. package/coverage/map/api/marshall.js.html +178 -0
  295. package/coverage/map/api/models/alerts.model.mongodb.js.html +106 -0
  296. package/coverage/map/api/models/catalog.model.mongodb.js.html +127 -0
  297. package/coverage/map/api/models/features.model.mongodb.js.html +196 -0
  298. package/coverage/map/api/models/index.html +161 -0
  299. package/coverage/map/api/models/projects.model.mongodb.js.html +109 -0
  300. package/coverage/map/api/services/alerts/alerts.hooks.js.html +274 -0
  301. package/coverage/map/api/services/alerts/alerts.service.js.html +610 -0
  302. package/coverage/map/api/services/alerts/index.html +131 -0
  303. package/coverage/map/api/services/catalog/catalog.hooks.js.html +310 -0
  304. package/coverage/map/api/services/catalog/index.html +116 -0
  305. package/coverage/map/api/services/daptiles/daptiles.service.js.html +1510 -0
  306. package/coverage/map/api/services/daptiles/index.html +116 -0
  307. package/coverage/map/api/services/features/features.hooks.js.html +241 -0
  308. package/coverage/map/api/services/features/features.service.js.html +241 -0
  309. package/coverage/map/api/services/features/index.html +131 -0
  310. package/coverage/map/api/services/index.html +116 -0
  311. package/coverage/map/api/services/index.js.html +817 -0
  312. package/coverage/map/api/services/projects/index.html +116 -0
  313. package/coverage/map/api/services/projects/projects.hooks.js.html +439 -0
  314. package/coverage/map/common/dynamic-grid-source.js.html +466 -0
  315. package/coverage/map/common/errors.js.html +94 -0
  316. package/coverage/map/common/geotiff-grid-source.js.html +541 -0
  317. package/coverage/map/common/grid.js.html +1612 -0
  318. package/coverage/map/common/index.html +371 -0
  319. package/coverage/map/common/index.js.html +172 -0
  320. package/coverage/map/common/meteo-model-grid-source.js.html +556 -0
  321. package/coverage/map/common/moment-utils.js.html +157 -0
  322. package/coverage/map/common/opendap-grid-source.js.html +868 -0
  323. package/coverage/map/common/opendap-utils.js.html +826 -0
  324. package/coverage/map/common/permissions.js.html +124 -0
  325. package/coverage/map/common/time-based-grid-source.js.html +418 -0
  326. package/coverage/map/common/tms-utils.js.html +274 -0
  327. package/coverage/map/common/wcs-grid-source.js.html +364 -0
  328. package/coverage/map/common/wcs-utils.js.html +586 -0
  329. package/coverage/map/common/weacast-grid-source.js.html +1033 -0
  330. package/coverage/map/common/wfs-utils.js.html +574 -0
  331. package/coverage/map/common/wms-utils.js.html +451 -0
  332. package/coverage/map/common/wmts-utils.js.html +547 -0
  333. package/coverage/prettify.css +1 -0
  334. package/coverage/prettify.js +2 -0
  335. package/coverage/sort-arrow-sprite.png +0 -0
  336. package/coverage/sorter.js +196 -0
  337. package/coverage/tmp/coverage-280506-1731704745613-0.json +1 -0
  338. package/coverage/tmp/coverage-280518-1731704745599-0.json +1 -0
  339. package/coverage/tmp/coverage-280529-1731704745588-0.json +1 -0
  340. package/coverage/tmp/coverage-280541-1731704745574-0.json +1 -0
  341. package/coverage/tmp/coverage-280548-1731704745545-0.json +1 -0
  342. package/extras/css/core.variables.scss +32 -8
  343. package/extras/icons/attribution.png +0 -0
  344. package/map/api/services/catalog/catalog.hooks.js +5 -7
  345. package/map/api/services/features/features.hooks.js +1 -1
  346. package/map/client/cesium/utils/utils.style.js +11 -2
  347. package/map/client/components/KAttribution.vue +108 -0
  348. package/map/client/components/KPositionIndicator.vue +11 -18
  349. package/map/client/components/KProjectMenu.vue +4 -4
  350. package/map/client/components/catalog/KCategoryItem.vue +74 -0
  351. package/map/client/components/catalog/KLayerCategories.vue +24 -12
  352. package/map/client/components/catalog/KLayersPanel.vue +139 -116
  353. package/map/client/components/catalog/KProjectSelector.vue +29 -17
  354. package/map/client/components/catalog/KProjectsPanel.vue +19 -35
  355. package/map/client/components/catalog/KViewSelector.vue +37 -25
  356. package/map/client/components/catalog/KViewsPanel.vue +19 -35
  357. package/map/client/components/form/KLocationField.vue +1 -2
  358. package/map/client/components/legend/KLegend.vue +34 -34
  359. package/map/client/components/location/KLocationCardSection.vue +18 -22
  360. package/map/client/components/location/KLocationMap.vue +36 -38
  361. package/map/client/components/location/KLocationTimeLineCard.vue +147 -0
  362. package/map/client/components/location/KLocationTip.vue +12 -2
  363. package/map/client/components/widget/KInformationBox.vue +0 -4
  364. package/map/client/components/widget/KStackableTimeSeries.vue +8 -1
  365. package/map/client/components/widget/KTimeSeries.vue +1 -1
  366. package/map/client/composables/highlight.js +29 -31
  367. package/map/client/composables/probe.js +7 -3
  368. package/map/client/composables/weather.js +71 -31
  369. package/map/client/i18n/map_en.json +3 -0
  370. package/map/client/i18n/map_fr.json +3 -0
  371. package/map/client/init.js +4 -3
  372. package/map/client/leaflet/ShapeMarker.js +1 -1
  373. package/map/client/leaflet/utils/utils.events.js +1 -1
  374. package/map/client/leaflet/utils/utils.style.js +20 -8
  375. package/map/client/mixins/globe/mixin.base-globe.js +111 -13
  376. package/map/client/mixins/globe/mixin.file-layers.js +10 -10
  377. package/map/client/mixins/globe/mixin.geojson-layers.js +90 -15
  378. package/map/client/mixins/globe/mixin.style.js +2 -0
  379. package/map/client/mixins/index.js +0 -1
  380. package/map/client/mixins/map/index.js +1 -0
  381. package/map/client/mixins/map/mixin.base-map.js +21 -2
  382. package/map/client/mixins/map/mixin.canvas-layers.js +7 -2
  383. package/map/client/mixins/map/mixin.edit-layers.js +12 -4
  384. package/map/client/mixins/map/mixin.file-layers.js +3 -0
  385. package/map/client/mixins/map/mixin.geojson-layers.js +90 -5
  386. package/map/client/mixins/map/mixin.pmtiles-layers.js +106 -0
  387. package/map/client/mixins/mixin.activity.js +8 -3
  388. package/map/client/mixins/mixin.feature-service.js +73 -32
  389. package/map/client/mixins/mixin.levels.js +1 -0
  390. package/map/client/mixins/mixin.weacast.js +10 -87
  391. package/map/client/utils/index.js +1 -0
  392. package/map/client/utils/utils.capture.js +1 -1
  393. package/map/client/utils/utils.catalog.js +7 -7
  394. package/map/client/utils/utils.features.js +59 -1
  395. package/map/client/utils/utils.layers.js +8 -0
  396. package/map/client/utils/utils.time-series.js +121 -0
  397. package/map/client/utils/utils.weacast.js +102 -0
  398. package/package.json +6 -6
  399. package/scripts/init_runner.sh +2 -2
  400. package/scripts/kash/CHANGELOG.md +12 -0
  401. package/scripts/kash/README.md +2 -0
  402. package/scripts/kash/kash.sh +34 -32
  403. package/scripts/run_tests.sh +2 -2
  404. package/scripts/setup_workspace.sh +24 -6
  405. package/test/api/core/hooks.test.js +6 -3
  406. package/test/api/core/test-log-2023-12-19.log +7 -0
  407. package/test/api/core/test-log-2024-01-04.log +14 -0
  408. package/test/api/core/test-log-2024-05-14.log +6 -0
  409. package/test/api/core/{test-log-2024-04-23.log → test-log-2024-06-06.log} +3 -3
  410. package/test/api/core/test-log-2024-06-26.log +25 -0
  411. package/test/api/core/test-log-2024-06-28.log +2 -0
  412. package/test/api/core/test-log-2024-07-09.log +0 -0
  413. package/test/api/core/test-log-2024-08-13.log +69 -0
  414. package/test/api/core/test-log-2024-10-28.log +53 -0
  415. package/test/api/core/test-log-2024-11-05.log +30 -0
  416. package/test/api/core/test-log-2024-11-15.log +23 -0
  417. package/test/api/map/alerts.test.js +3 -1
  418. package/test/api/map/config/layers.json +3 -1
  419. package/test/api/map/index.test.js +18 -1
  420. package/test/api/map/test-log-2023-11-24.log +121 -0
  421. package/test/api/map/test-log-2023-12-12.log +29 -0
  422. package/test/api/map/test-log-2023-12-13.log +5 -0
  423. package/test/api/map/test-log-2024-01-04.log +2 -0
  424. package/test/api/map/test-log-2024-01-11.log +1 -0
  425. package/test/api/map/test-log-2024-01-25.log +19 -0
  426. package/test/api/map/test-log-2024-06-06.log +39 -0
  427. package/test/api/map/test-log-2024-08-13.log +13 -0
  428. package/test/api/map/test-log-2024-08-20.log +55 -0
  429. package/test/api/map/test-log-2024-09-09.log +92 -0
  430. package/test/api/map/test-log-2024-10-28.log +11 -0
  431. package/test/client/core/utils.js +13 -0
  432. package/test/client/map/api.js +34 -0
  433. package/test/client/map/catalog.js +6 -2
  434. package/test/client/map/index.js +1 -0
  435. package/test/client/map/utils.js +4 -2
  436. package/core/client/components/collection/KList.vue +0 -135
  437. package/core/client/components/layout/KPageSticky.vue +0 -53
  438. package/core/client/mixins/mixin.base-collection.js +0 -162
  439. package/core/client/utils/utils.data.js +0 -22
  440. package/map/client/mixins/mixin.catalog-panel.js +0 -26
  441. package/test/api/core/test-log-2024-04-22.log +0 -84
@@ -1,183 +1,83 @@
1
1
  <template>
2
- <div class="row justify-start items-center q-pl-sm q-pr-sm no-wrap">
3
- <div id="start-date" class="k-datetime text-body2">
4
- {{ formattedStartDate }}
5
- <q-tooltip>{{ $t('KAbsoluteTimeRange.PICK_START_DATE_LABEL') }}</q-tooltip>
6
- <q-popup-proxy ref="popup" transition-show="scale" transition-hide="scale">
7
- <q-date
8
- id="start-date-popup"
9
- v-model="startDate"
10
- :mask="dateFormat"
11
- :title="startDate"
12
- :options="checkStartDate"
13
- @update:model-value="onTimeRangeChanged"
14
- />
15
- </q-popup-proxy>
16
- </div>
17
- <div>&nbsp;</div>
18
- <div id="start-time" class="k-datetime text-body2">
19
- {{ formattedStartTime }}
20
- <q-tooltip>{{ $t('KAbsoluteTimeRange.PICK_START_TIME_LABEL') }}</q-tooltip>
21
- <q-popup-proxy ref="popup" transition-show="scale" transition-hide="scale">
22
- <q-time
23
- id="start-time-popup"
24
- v-model="startTime"
25
- :mask="hourFormat"
26
- :options="checkStartTime"
27
- @update:model-value="onTimeRangeChanged"
28
- />
29
- </q-popup-proxy>
30
- </div>
31
- <div>&nbsp;-&nbsp;</div>
32
- <div id="end-date" class="k-datetime text-body2">
33
- {{ formattedEndDate }}
34
- <q-tooltip>{{ $t('KAbsoluteTimeRange.PICK_END_DATE_LABEL') }}</q-tooltip>
35
- <q-popup-proxy ref="popup" transition-show="scale" transition-hide="scale">
36
- <q-date
37
- id="end-date-popup"
38
- v-model="endDate"
39
- :mask="dateFormat"
40
- :title="endDate"
41
- :options="checkEndDate"
42
- @update:model-value="onTimeRangeChanged"
43
- />
44
- </q-popup-proxy>
45
- </div>
46
- <div>&nbsp;</div>
47
- <div id="end-time" class="k-datetime text-body2">
48
- {{ formattedEndTime }}
49
- <q-tooltip>{{ $t('KAbsoluteTimeRange.PICK_END_TIME_LABEL') }}</q-tooltip>
50
- <q-popup-proxy ref="popup" transition-show="scale" transition-hide="scale">
51
- <q-time
52
- id="end-time-popup"
53
- v-model="endTime"
54
- :mask="hourFormat"
55
- :options="checkEndTime"
56
- @update:model-value="onTimeRangeChanged"
57
- />
58
- </q-popup-proxy>
59
- </div>
60
- </div>
2
+ <KDateTimeRange
3
+ v-model="dateTimeRangeModel"
4
+ :options="dateTimeRangeOptions"
5
+ :min="props.min"
6
+ :max="props.max"
7
+ :dense="props.dense"
8
+ :disabled="props.disabled"
9
+ />
61
10
  </template>
62
11
 
63
- <script>
64
- import moment from 'moment'
12
+ <script setup>
13
+ import { ref, watch, onMounted, onBeforeUnmount } from 'vue'
14
+ import KDateTimeRange from './KDateTimeRange.vue'
15
+ import { Events } from '../../events'
65
16
  import { Time } from '../../time'
17
+ import moment from 'moment'
66
18
 
67
- const dateFormat = 'DD/MM/YYYY'
68
- const hourFormat = 'HH:mm'
69
- const checkDateFormat = 'YYYY/MM/DD'
70
-
71
- // Convert from moment date/time to quasar format in local time zone
72
- function toQuasarDate (date) {
73
- return Time.convertToLocal(date).format(dateFormat)
74
- }
75
- function toQuasarTime (date) {
76
- return Time.convertToLocal(date).format(hourFormat)
77
- }
78
- // Convert from quasar format in local time zone to moment date/time
79
- function fromQuasarDate (date, format) {
80
- return (Time.getFormatTimezone()
81
- ? moment.tz(date, format, Time.getFormatTimezone())
82
- : moment(date, format))
83
- }
84
- function fromQuasarTime (time, format) {
85
- return (Time.getFormatTimezone()
86
- ? moment.tz(time, format, Time.getFormatTimezone())
87
- : moment(time, format))
88
- }
89
-
90
- export default {
91
- name: 'k-absolute-time-range',
92
- props: {
93
- dense: {
94
- type: Boolean,
95
- default: false
96
- }
97
- },
98
- data () {
99
- const { start, end } = Time.getRange()
100
- return {
101
- dateFormat,
102
- hourFormat,
103
- checkDateFormat,
104
- startDate: toQuasarDate(start),
105
- startTime: toQuasarTime(start),
106
- endDate: toQuasarDate(end),
107
- endTime: toQuasarTime(end)
19
+ const props = defineProps({
20
+ min: {
21
+ type: String,
22
+ default: () => null,
23
+ validator: (value) => {
24
+ if (value) return moment(value).isValid()
25
+ return true
108
26
  }
109
27
  },
110
- computed: {
111
- start () {
112
- const date = fromQuasarDate(this.startDate, this.dateFormat)
113
- const time = fromQuasarTime(this.startTime, this.hourFormat)
114
- date.set({ hour: time.hour(), minute: time.minute() })
115
- return date.utc()
116
- },
117
- formattedStartDate () {
118
- return Time.format(this.start, 'date.short')
119
- },
120
- formattedStartTime () {
121
- return Time.format(this.start, 'time.long')
122
- },
123
- end () {
124
- const date = fromQuasarDate(this.endDate, this.dateFormat)
125
- const time = fromQuasarTime(this.endTime, this.hourFormat)
126
- date.set({ hour: time.hour(), minute: time.minute() })
127
- return date.utc()
128
- },
129
- formattedEndDate () {
130
- return Time.format(this.end, 'date.short')
131
- },
132
- formattedEndTime () {
133
- return Time.format(this.end, 'time.long')
28
+ max: {
29
+ type: String,
30
+ default: () => null,
31
+ validator: (value) => {
32
+ if (value) return moment(value).isValid()
33
+ return true
134
34
  }
135
35
  },
136
- methods: {
137
- checkStartDate (date) {
138
- date = fromQuasarDate(date, this.checkDateFormat)
139
- const time = fromQuasarTime(this.startTime, this.hourFormat)
140
- date.set({ hour: time.hour(), minute: time.minute() })
141
- return date.utc().isBefore(this.end)
142
- },
143
- checkStartTime (hour, minute) {
144
- const date = fromQuasarDate(this.startDate, this.dateFormat)
145
- date.set({ hour, minute })
146
- return date.utc().isBefore(this.end)
147
- },
148
- checkEndDate (date) {
149
- date = fromQuasarDate(date, this.checkDateFormat)
150
- const time = fromQuasarTime(this.endTime, this.hourFormat)
151
- date.set({ hour: time.hour(), minute: time.minute() })
152
- return date.utc().isAfter(this.start)
153
- },
154
- checkEndTime (hour, minute) {
155
- const date = fromQuasarDate(this.endDate, this.dateFormat)
156
- date.set({ hour, minute })
157
- return date.utc().isAfter(this.start)
158
- },
159
- onTimeRangeChanged () {
160
- Time.patchRange({ start: this.start, end: this.end })
161
- },
162
- onTimeRangeUpdated () {
163
- const { start, end } = Time.getRange()
164
- this.startDate = toQuasarDate(start)
165
- this.startTime = toQuasarTime(start)
166
- this.endDate = toQuasarDate(end)
167
- this.endTime = toQuasarTime(end)
168
- }
169
- },
170
- created () {
171
- this.$events.on('time-range-changed', () => this.onTimeRangeUpdated())
36
+ disabled: {
37
+ type: Boolean,
38
+ default: false
172
39
  },
173
- beforeUnmount () {
174
- this.$events.off('time-range-changed', () => this.onTimeRangeUpdated())
40
+ dense: {
41
+ type: Boolean,
42
+ default: true
175
43
  }
176
- }
177
- </script>
44
+ })
45
+
46
+ // Data
47
+ const { start, end } = Time.getRange()
48
+ const dateTimeRangeModel = ref({
49
+ start: start.toISOString(),
50
+ end: end.toISOString()
51
+ })
52
+ const dateTimeRangeOptions = ref({
53
+ separator: '-',
54
+ date: {
55
+ format: 'DD/MM/YYYY'
56
+ }
57
+ })
58
+
59
+ // Watch
60
+ watch(dateTimeRangeModel, (newDateTimeRange, oldDateTimeRange) => {
61
+ Time.patchRange({
62
+ start: moment(newDateTimeRange.start),
63
+ end: moment(newDateTimeRange.end)
64
+ })
65
+ })
178
66
 
179
- <style lang="scss">
180
- .k-datetime:hover {
181
- cursor: pointer;
67
+ // Functions
68
+ function onTimeRangeUpdated () {
69
+ const { start, end } = Time.getRange()
70
+ dateTimeRangeModel.value = {
71
+ start: start.toISOString(),
72
+ end: end.toISOString()
182
73
  }
183
- </style>
74
+ }
75
+
76
+ // Hooks
77
+ onMounted(() => {
78
+ Events.on('time-range-changed', onTimeRangeUpdated)
79
+ })
80
+ onBeforeUnmount(() => {
81
+ Events.off('time-range-changed', onTimeRangeUpdated)
82
+ })
83
+ </script>
@@ -4,8 +4,8 @@ import { ref, shallowRef, readonly, onBeforeUnmount } from 'vue'
4
4
  import { useStore } from './store.js'
5
5
  import { useSelection } from './selection.js'
6
6
 
7
- const kActivity = shallowRef(null)
8
- const kActivityName = ref(null)
7
+ const CurrentActivity = shallowRef(null)
8
+ const CurrentActivityName = ref(null)
9
9
 
10
10
  export function useActivity (name, options = {}) {
11
11
  _.defaults(options, { selection: true })
@@ -18,9 +18,9 @@ export function useActivity (name, options = {}) {
18
18
 
19
19
  // functions
20
20
  function setCurrentActivity (activity) {
21
- if (kActivity.value === activity) return
22
- kActivityName.value = activity ? name : null
23
- kActivity.value = activity
21
+ if (CurrentActivity.value === activity) return
22
+ CurrentActivityName.value = activity ? name : null
23
+ CurrentActivity.value = activity
24
24
  }
25
25
 
26
26
  // expose
@@ -31,7 +31,7 @@ export function useActivity (name, options = {}) {
31
31
  }
32
32
  if (options.selection) {
33
33
  Object.assign(expose, {
34
- ...useSelection(kActivityName.value)
34
+ ...useSelection(name)
35
35
  })
36
36
  }
37
37
 
@@ -46,12 +46,14 @@ export function useCurrentActivity (options = {}) {
46
46
 
47
47
  // expose
48
48
  const expose = {
49
- kActivity: readonly(kActivity),
50
- kActivityName: readonly(kActivityName)
49
+ CurrentActivity: readonly(CurrentActivity),
50
+ kActivity: readonly(CurrentActivity),
51
+ CurrentActivityName: readonly(CurrentActivityName),
52
+ kActivityName: readonly(CurrentActivityName)
51
53
  }
52
- if (kActivityName.value) {
53
- const activityState = useStore(`store.${kActivityName.value}.state`)
54
- const activityOptions = useStore(`store.${kActivityName.value}.options`)
54
+ if (CurrentActivityName.value) {
55
+ const activityState = useStore(`store.${CurrentActivityName.value}.state`)
56
+ const activityOptions = useStore(`store.${CurrentActivityName.value}.options`)
55
57
 
56
58
  Object.assign(expose, {
57
59
  state: activityState.store,
@@ -59,7 +61,7 @@ export function useCurrentActivity (options = {}) {
59
61
  })
60
62
  if (options.selection) {
61
63
  Object.assign(expose, {
62
- ...useSelection(kActivityName.value)
64
+ ...useSelection(CurrentActivityName.value)
63
65
  })
64
66
  }
65
67
  }
@@ -20,7 +20,7 @@ export function useCollection (options) {
20
20
  })
21
21
 
22
22
  // Data
23
- const items = ref([])
23
+ const items = ref(null)
24
24
  const nbTotalItems = ref(0)
25
25
  const currentPage = ref(1)
26
26
  let itemListener = null
@@ -118,6 +118,8 @@ export function useCollection (options) {
118
118
  }, options.refreshThrottle.value, { leading: false })
119
119
 
120
120
  function resetCollection () {
121
+ // Do not reset the collection since it is initializing
122
+ if (_.isNil(items.value)) return
121
123
  // Reset pagination and start again refreshing the collection
122
124
  if (options.appendItems.value) setCollectionItems([])
123
125
  currentPage.value = 1
@@ -0,0 +1,51 @@
1
+ import _ from 'lodash'
2
+ import logger from 'loglevel'
3
+ import { ref, watchEffect, onBeforeMount, onBeforeUnmount } from 'vue'
4
+ import { api } from '../api.js'
5
+
6
+ export function useCounter (options) {
7
+ logger.trace(`[KDK] Counter created with options ${options}`)
8
+
9
+ // Data
10
+ const counter = ref(0)
11
+
12
+ // Watch
13
+ watchEffect(() => refresh())
14
+
15
+ // Functions
16
+ function getService () {
17
+ const service = api.getService(options.service.value, options.contextId ? options.contextId.value : null)
18
+ if (!service) {
19
+ throw new Error('[KDK] Cannot retrieve target service ' + options.service.value)
20
+ }
21
+ return service
22
+ }
23
+ function getBaseQuery () {
24
+ return options.baseQuery ? options.baseQuery.value : {}
25
+ }
26
+ function getFilterQuery () {
27
+ return options.filterQuery ? options.filterQuery.value : {}
28
+ }
29
+ async function refresh () {
30
+ const query = _.merge(getBaseQuery(), getFilterQuery(), { $limit: 0 })
31
+ logger.trace(`[KDK] Count service ${options.service.value} with query ${query}`)
32
+ const response = await getService().find({ query })
33
+ counter.value = response.total
34
+ }
35
+
36
+ // Hooks
37
+ onBeforeMount(async () => {
38
+ const service = getService()
39
+ service.on('created', refresh)
40
+ service.on('removed', refresh)
41
+ })
42
+ onBeforeUnmount(() => {
43
+ const service = getService()
44
+ service.off('created', refresh)
45
+ service.off('removed', refresh)
46
+ })
47
+
48
+ return {
49
+ counter
50
+ }
51
+ }
@@ -1,9 +1,12 @@
1
1
  export * from './activity.js'
2
2
  export * from './collection.js'
3
+ export * from './counter.js'
3
4
  export * from './layout.js'
5
+ export * from './messages.js'
4
6
  export * from './pwa.js'
5
7
  export * from './session.js'
6
8
  export * from './schema.js'
9
+ export * from './screen.js'
7
10
  export * from './selection.js'
8
11
  export * from './store.js'
9
12
  export * from './version.js'
@@ -4,9 +4,12 @@ export function useLayout () {
4
4
 
5
5
  // functions
6
6
  function configureLayout (configuration, context) {
7
+ if (configuration.view) Layout.setView(configuration.view)
8
+ if (configuration.padding) Layout.setPadding(configuration.padding)
7
9
  if (configuration.header) Layout.setHeader(configuration.header, context)
8
10
  if (configuration.footer) Layout.setFooter(configuration.footer, context)
9
11
  if (configuration.page) Layout.setPage(configuration.page, context)
12
+ if (configuration.stickies) Layout.setStickies(configuration.stickies, context)
10
13
  if (configuration.fab) Layout.setFab(configuration.fab, context)
11
14
  Layout.placements.forEach(placement => {
12
15
  if (_.has(configuration, `panes.${placement}`)) Layout.setPane(placement, _.get(configuration, `panes.${placement}`), context)
@@ -19,16 +22,23 @@ export function useLayout () {
19
22
  if (configuration.bottomPane) Layout.setPane('bottom', configuration.bottomPane, context)
20
23
  }
21
24
  function clearLayout () {
25
+ Layout.clearFocus()
26
+ Layout.clearView()
27
+ Layout.clearPadding()
22
28
  Layout.clearHeader()
23
29
  Layout.clearFooter()
24
30
  Layout.clearPage()
31
+ Layout.clearStickies()
25
32
  Layout.clearFab()
26
33
  Layout.placements.forEach(placement => {
27
34
  Layout.clearPane(placement)
28
35
  Layout.clearWindow(placement)
29
36
  })
30
37
  }
31
-
38
+ function setLayoutMode (mode) {
39
+ if (mode) Layout.setMode(mode)
40
+ }
41
+
32
42
  // immediate
33
43
  const additionalFunctions = {}
34
44
  Layout.placements.forEach(placement => {
@@ -42,9 +52,10 @@ export function useLayout () {
42
52
 
43
53
  // expose
44
54
  return {
45
- layout: Layout,
55
+ Layout,
46
56
  configureLayout,
47
57
  clearLayout,
58
+ setLayoutMode,
48
59
  ...additionalFunctions
49
60
  }
50
61
  }
@@ -0,0 +1,15 @@
1
+ import { api } from '../api.js'
2
+
3
+ export function useMessages (contextId) {
4
+ const messagesService = api.getService('messages', contextId)
5
+
6
+ // Functions
7
+ async function createMessage (message) {
8
+ return messagesService.create(message)
9
+ }
10
+
11
+ // Expose
12
+ return {
13
+ createMessage
14
+ }
15
+ }
@@ -15,7 +15,7 @@ export function usePwa () {
15
15
 
16
16
  // Functions
17
17
  function install () {
18
- if (window.matchMedia('(display-mode: standalone)').matches) return
18
+ if (config.buildMode !== 'pwa' || window.matchMedia('(display-mode: standalone)').matches) return
19
19
  // Install prompt can be avoided, eg in tests
20
20
  if (!LocalStorage.get(installKey, true)) return
21
21
  // Take care of install prompt
@@ -16,19 +16,19 @@ export function useSchema () {
16
16
  async function compile (schemaNameOrObject, propertiesFilter) {
17
17
  if (typeof schemaNameOrObject === 'string') {
18
18
  // load the schema file
19
- logger.debug('loading schema ', schemaNameOrObject)
19
+ logger.trace('[KDK] Loading schema ', schemaNameOrObject)
20
20
  const schemaModule = await import(`@schemas/${schemaNameOrObject}.json`)
21
- schema.value = schemaModule.default
21
+ schema.value = _.cloneDeep(schemaModule.default)
22
22
  } else {
23
23
  // clone the schema object
24
- logger.debug('setting schema ', schemaNameOrObject.$id)
24
+ logger.trace('setting schema ', schemaNameOrObject.$id)
25
25
  schema.value = _.cloneDeep(schemaNameOrObject)
26
26
  }
27
27
  // filter ther schema
28
28
  if (propertiesFilter) {
29
29
  let properties = propertiesFilter
30
30
  if (typeof propertiesFilter === 'string') properties = _.split(propertiesFilter, ',')
31
- logger.debug('filtering schema with ', properties)
31
+ logger.trace('[KDK] Filtering schema with ', properties)
32
32
  _.forOwn(schema.value.properties, (value, key) => {
33
33
  if (!properties.includes(key)) delete schema.value.properties[key]
34
34
  })
@@ -38,12 +38,12 @@ export function useSchema () {
38
38
  schema.value.required = _.intersection(schema.value.required, properties)
39
39
  }
40
40
  // compile the schema
41
- logger.debug('compiling schema ', schema.value.$id)
41
+ logger.trace('[KDK] Compiling schema ', schema.value.$id)
42
42
  validator.value = Schema.register(schema.value)
43
43
  }
44
44
  function validate (values) {
45
45
  if (!validator.value) {
46
- logger.error('validator not instantiated')
46
+ logger.error('[KDK] schema \'validator\' not instantiated')
47
47
  return
48
48
  }
49
49
  const result = validator.value(values)
@@ -0,0 +1,23 @@
1
+ import { ref, watch, readonly } from 'vue'
2
+ import { useQuasar } from 'quasar'
3
+ import { Fullscreen, toggleFullscreen } from '../utils/utils.screen.js'
4
+
5
+ const Orientation = ref(null)
6
+
7
+ export function useScreen () {
8
+ // Data
9
+ const $q = useQuasar()
10
+
11
+ // Watch
12
+ watch(() => [$q.screen.width, $q.screen.height], () => {
13
+ Orientation.value = $q.screen.width >= $q.screen.height ? 'landscape' : 'portrait'
14
+ }, { immediate: true})
15
+
16
+ // Expose
17
+ return {
18
+ Screen: readonly($q.screen),
19
+ Orientation: readonly(Orientation),
20
+ Fullscreen: readonly(Fullscreen),
21
+ toggleFullscreen
22
+ }
23
+ }
@@ -0,0 +1 @@
1
+ export * from './v-hover.js'
@@ -0,0 +1,23 @@
1
+ import { getPlatform } from '../utils/utils.platform.js'
2
+ const Platform = getPlatform()
3
+
4
+ export const vHover = {
5
+
6
+ mounted (el, binding) {
7
+ if (Platform.touch) return
8
+ el.__vHoverEnter__ = binding.value.enter || (() => {})
9
+ el.__vHoverLeave__ = binding.value.leave || (() => {})
10
+
11
+ // Add Event Listeners
12
+ el.addEventListener('mouseover', el.__vHoverEnter__)
13
+ el.addEventListener('mouseleave', el.__vHoverLeave__)
14
+ },
15
+
16
+ beforeUnmount (el, binding) {
17
+ // Remove Event Listeners
18
+ el.removeEventListener('mouseover', el.__vHoverEnter__)
19
+ el.removeEventListener('mouseleave', el.__vHoverLeave__)
20
+ delete el.__vHoverEnter__
21
+ delete el.__vHoverLeave__
22
+ }
23
+ }
@@ -0,0 +1,61 @@
1
+ import _ from 'lodash'
2
+ import logger from 'loglevel'
3
+ import config from 'config'
4
+ import sanitize from 'sanitize-html'
5
+ import showdown from 'showdown'
6
+ import { i18n } from './i18n.js'
7
+
8
+ export const Document = {
9
+ initialize () {
10
+ this.options = _.get(config, 'document')
11
+ this.options = _.defaultsDeep(this.options, {
12
+ viewers: {
13
+ htm: 'document/KHtml',
14
+ html: 'document/KHtml',
15
+ md: 'document/KMarkdown',
16
+ pdf: 'document/KPdf',
17
+ jpg: 'document/KImage',
18
+ jpeg: 'document/KImage',
19
+ png: 'document/KImage'
20
+ },
21
+ htmlSanitizer: {
22
+ allowedTags: sanitize.defaults.allowedTags.concat(['img'])
23
+ },
24
+ mdConverter: {}
25
+ })
26
+ logger.debug('[KDK] Configuring documents with options:', this.options)
27
+ },
28
+ register (mimeTypes, viewer) {
29
+ if (!_.isArray(mimeTypes)) mimeTypes = [mimeTypes]
30
+ _.forEach(mimeTypes, mimeType => {
31
+ _.set(this.options, `viewers.${mimeType}`, viewer)
32
+ })
33
+ },
34
+ sanitizeHtml (html) {
35
+ if (_.isNil(html)) return null
36
+ return sanitize(html, this.options.htmlSanitizer)
37
+ },
38
+ convertMdToHtml (md) {
39
+ if (_.isNil(md)) return null
40
+ const converter = new showdown.Converter(this.options.mdConverter)
41
+ return converter.makeHtml(md)
42
+ },
43
+ async fetchUrl (url, localize) {
44
+ if (_.isEmpty(url)) return null
45
+ // localize the url if needed
46
+ let urls
47
+ if (localize) urls = i18n.localize(url)
48
+ else urls = [url]
49
+ // try to load the content
50
+ let response
51
+ for (const url of urls) {
52
+ try {
53
+ response = await fetch(url)
54
+ if (response.ok) return response
55
+ } catch (error) {
56
+ // ignore the error
57
+ }
58
+ }
59
+ return null
60
+ }
61
+ }
@@ -9,7 +9,7 @@ import { i18n } from './i18n.js'
9
9
  const ExporterQueue = {
10
10
  initialize (maxConcurrentRequests) {
11
11
  this.maxConcurrentRequests = maxConcurrentRequests
12
- logger.debug(`[KDK] Exporter initialized with ${maxConcurrentRequests} maxConcurrentRequests`)
12
+ logger.debug(`[KDK] Configuring exporter with '${maxConcurrentRequests}' maxConcurrentRequests`)
13
13
  this.pendingRequests = []
14
14
  this.runningRequests = []
15
15
  this.exportService = api.getService('import-export')
@@ -41,7 +41,6 @@ export const Filter = {
41
41
  // Handle the pattern
42
42
  if (pattern !== '') {
43
43
  query.$or = _.map(fields, field => { return { [field]: { $search: pattern } } })
44
- console.log(query)
45
44
  }
46
45
  // Handle the selection
47
46
  items.forEach(item => {
@@ -63,7 +63,7 @@ export function permissionsGuard (user, to, from) {
63
63
  }
64
64
 
65
65
  // Guard based on route definition
66
- export function routeGuard (user, to, from) {
66
+ export function publicRouteGuard (user, to, from) {
67
67
  // Retrieves routes corresponding to the destination
68
68
  const matchedRoute = _.get(to, 'matched', [])
69
69
  // Retrieves the last corresponding route