@kalisio/kdk 2.2.2 → 2.3.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 (386) hide show
  1. package/.eslintignore +1 -0
  2. package/.github/workflows/main.yaml +67 -0
  3. package/.gitmodules +3 -0
  4. package/README.md +1 -2
  5. package/core/api/hooks/hooks.query.js +15 -2
  6. package/core/api/marshall.js +35 -4
  7. package/core/client/api.js +1 -1
  8. package/core/client/components/KActivity.vue +73 -0
  9. package/core/client/components/KContent.vue +1 -1
  10. package/core/client/components/KSponsor.vue +2 -13
  11. package/core/client/components/account/KDeleteAccountManager.vue +1 -1
  12. package/core/client/components/account/KPasswordManager.vue +1 -1
  13. package/core/client/components/action/KAction.vue +294 -0
  14. package/core/client/components/action/KBugReportAction.vue +37 -0
  15. package/core/client/components/action/index.js +7 -0
  16. package/core/client/components/app/KAbout.vue +16 -63
  17. package/core/client/components/app/KPlatform.vue +1 -1
  18. package/core/client/components/app/KSettings.vue +14 -14
  19. package/core/client/components/app/KTour.vue +6 -8
  20. package/core/client/components/app/KWelcome.vue +1 -1
  21. package/core/client/components/app/index.js +4 -0
  22. package/core/client/components/chart/KDataTable.vue +40 -25
  23. package/core/client/components/chart/KTimeSeriesChart.vue +20 -12
  24. package/core/client/components/collection/KCard.vue +1 -1
  25. package/core/client/components/collection/KColumn.vue +1 -1
  26. package/core/client/components/collection/KFilter.vue +6 -1
  27. package/core/client/components/document/KDocument.vue +83 -0
  28. package/core/client/components/document/KHtml.vue +23 -0
  29. package/core/client/components/document/KMarkdown.vue +37 -0
  30. package/core/client/components/document/index.js +9 -0
  31. package/core/client/components/form/KForm.vue +5 -1
  32. package/core/client/components/form/KSelectField.vue +1 -1
  33. package/core/client/components/index.js +1 -4
  34. package/core/client/components/input/KOptionsChooser.vue +1 -1
  35. package/core/client/components/layout/KFab.vue +1 -1
  36. package/core/client/components/layout/KPage.vue +3 -2
  37. package/core/client/components/layout/KWindow.vue +1 -1
  38. package/core/client/components/media/KColorScale.vue +16 -6
  39. package/core/client/components/screen/KLoginScreen.vue +1 -1
  40. package/core/client/components/screen/KRegisterScreen.vue +1 -1
  41. package/core/client/components/team/KAddMember.vue +7 -7
  42. package/core/client/components/team/KGroupCard.vue +1 -1
  43. package/core/client/components/team/KMemberFilter.vue +1 -1
  44. package/core/client/components/team/KTagCard.vue +1 -1
  45. package/core/client/components/time/KRelativeTimeRanges.vue +1 -1
  46. package/core/client/components/time/KTimeControl.vue +1 -0
  47. package/core/client/components/tool/KExportTool.vue +1 -1
  48. package/core/client/composables/collection.js +1 -1
  49. package/core/client/composables/index.js +1 -0
  50. package/core/client/composables/layout.js +50 -0
  51. package/core/client/composables/session.js +6 -0
  52. package/core/client/filter.js +9 -6
  53. package/core/client/guards.js +29 -6
  54. package/core/client/i18n/core_en.json +1 -1
  55. package/core/client/i18n/core_fr.json +1 -1
  56. package/core/client/i18n.js +14 -0
  57. package/core/client/layout.js +25 -14
  58. package/core/client/mixins/mixin.base-activity.js +16 -0
  59. package/core/client/services/index.js +27 -26
  60. package/core/client/services/local-settings.service.js +2 -3
  61. package/core/client/units.js +6 -1
  62. package/core/client/utils/index.js +3 -0
  63. package/core/client/utils/utils.actions.js +93 -0
  64. package/core/client/utils/utils.colors.js +1 -1
  65. package/core/client/utils/utils.data.js +22 -0
  66. package/core/client/utils/utils.shapes.js +16 -6
  67. package/coverage/base.css +224 -0
  68. package/coverage/block-navigation.js +87 -0
  69. package/coverage/core/api/application.js.html +1870 -0
  70. package/coverage/core/api/authentication.js.html +742 -0
  71. package/coverage/core/api/db.js.html +778 -0
  72. package/coverage/core/api/hooks/hooks.authentication.js.html +313 -0
  73. package/coverage/core/api/hooks/hooks.authorisations.js.html +1243 -0
  74. package/coverage/core/api/hooks/hooks.groups.js.html +229 -0
  75. package/coverage/core/api/hooks/hooks.logger.js.html +163 -0
  76. package/coverage/core/api/hooks/hooks.model.js.html +955 -0
  77. package/coverage/core/api/hooks/hooks.organisations.js.html +541 -0
  78. package/coverage/core/api/hooks/hooks.push.js.html +253 -0
  79. package/coverage/core/api/hooks/hooks.query.js.html +862 -0
  80. package/coverage/core/api/hooks/hooks.schemas.js.html +304 -0
  81. package/coverage/core/api/hooks/hooks.service.js.html +319 -0
  82. package/coverage/core/api/hooks/hooks.storage.js.html +193 -0
  83. package/coverage/core/api/hooks/hooks.users.js.html +868 -0
  84. package/coverage/core/api/hooks/index.html +296 -0
  85. package/coverage/core/api/hooks/index.js.html +121 -0
  86. package/coverage/core/api/index.html +191 -0
  87. package/coverage/core/api/index.js.html +148 -0
  88. package/coverage/core/api/marshall.js.html +448 -0
  89. package/coverage/core/api/models/groups.model.mongodb.js.html +109 -0
  90. package/coverage/core/api/models/index.html +161 -0
  91. package/coverage/core/api/models/organisations.model.mongodb.js.html +94 -0
  92. package/coverage/core/api/models/tags.model.mongodb.js.html +115 -0
  93. package/coverage/core/api/models/users.model.mongodb.js.html +115 -0
  94. package/coverage/core/api/services/account/account.hooks.js.html +208 -0
  95. package/coverage/core/api/services/account/account.service.js.html +436 -0
  96. package/coverage/core/api/services/account/index.html +131 -0
  97. package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +184 -0
  98. package/coverage/core/api/services/authorisations/authorisations.service.js.html +502 -0
  99. package/coverage/core/api/services/authorisations/index.html +131 -0
  100. package/coverage/core/api/services/databases/databases.hooks.js.html +193 -0
  101. package/coverage/core/api/services/databases/databases.service.js.html +100 -0
  102. package/coverage/core/api/services/databases/index.html +131 -0
  103. package/coverage/core/api/services/groups/groups.hooks.js.html +178 -0
  104. package/coverage/core/api/services/groups/index.html +116 -0
  105. package/coverage/core/api/services/import-export/import-export.hooks.js.html +184 -0
  106. package/coverage/core/api/services/import-export/import-export.service.js.html +118 -0
  107. package/coverage/core/api/services/import-export/index.html +131 -0
  108. package/coverage/core/api/services/index.html +116 -0
  109. package/coverage/core/api/services/index.js.html +499 -0
  110. package/coverage/core/api/services/mailer/index.html +131 -0
  111. package/coverage/core/api/services/mailer/mailer.hooks.js.html +190 -0
  112. package/coverage/core/api/services/mailer/mailer.service.js.html +118 -0
  113. package/coverage/core/api/services/organisations/index.html +131 -0
  114. package/coverage/core/api/services/organisations/organisations.hooks.js.html +178 -0
  115. package/coverage/core/api/services/organisations/organisations.service.js.html +343 -0
  116. package/coverage/core/api/services/push/index.html +131 -0
  117. package/coverage/core/api/services/push/push.hooks.js.html +190 -0
  118. package/coverage/core/api/services/push/push.service.js.html +121 -0
  119. package/coverage/core/api/services/storage/index.html +131 -0
  120. package/coverage/core/api/services/storage/storage.hooks.js.html +190 -0
  121. package/coverage/core/api/services/storage/storage.service.js.html +172 -0
  122. package/coverage/core/api/services/tags/index.html +116 -0
  123. package/coverage/core/api/services/tags/tags.hooks.js.html +178 -0
  124. package/coverage/core/api/services/users/index.html +116 -0
  125. package/coverage/core/api/services/users/users.hooks.js.html +307 -0
  126. package/coverage/core/api/utils.js.html +118 -0
  127. package/coverage/core/common/errors.js.html +88 -0
  128. package/coverage/core/common/index.html +176 -0
  129. package/coverage/core/common/index.js.html +115 -0
  130. package/coverage/core/common/permissions.js.html +1048 -0
  131. package/coverage/core/common/schema.js.html +190 -0
  132. package/coverage/core/common/utils.js.html +220 -0
  133. package/coverage/favicon.png +0 -0
  134. package/coverage/index.html +491 -0
  135. package/coverage/lcov-report/base.css +224 -0
  136. package/coverage/lcov-report/block-navigation.js +87 -0
  137. package/coverage/lcov-report/core/api/application.js.html +1870 -0
  138. package/coverage/lcov-report/core/api/authentication.js.html +742 -0
  139. package/coverage/lcov-report/core/api/db.js.html +778 -0
  140. package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +313 -0
  141. package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +1243 -0
  142. package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +229 -0
  143. package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +163 -0
  144. package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +955 -0
  145. package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +541 -0
  146. package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +253 -0
  147. package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +862 -0
  148. package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +304 -0
  149. package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +319 -0
  150. package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +193 -0
  151. package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +868 -0
  152. package/coverage/lcov-report/core/api/hooks/index.html +296 -0
  153. package/coverage/lcov-report/core/api/hooks/index.js.html +121 -0
  154. package/coverage/lcov-report/core/api/index.html +191 -0
  155. package/coverage/lcov-report/core/api/index.js.html +148 -0
  156. package/coverage/lcov-report/core/api/marshall.js.html +448 -0
  157. package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +109 -0
  158. package/coverage/lcov-report/core/api/models/index.html +161 -0
  159. package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +94 -0
  160. package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +115 -0
  161. package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +115 -0
  162. package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +208 -0
  163. package/coverage/lcov-report/core/api/services/account/account.service.js.html +436 -0
  164. package/coverage/lcov-report/core/api/services/account/index.html +131 -0
  165. package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +184 -0
  166. package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +502 -0
  167. package/coverage/lcov-report/core/api/services/authorisations/index.html +131 -0
  168. package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +193 -0
  169. package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +100 -0
  170. package/coverage/lcov-report/core/api/services/databases/index.html +131 -0
  171. package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +178 -0
  172. package/coverage/lcov-report/core/api/services/groups/index.html +116 -0
  173. package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +184 -0
  174. package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +118 -0
  175. package/coverage/lcov-report/core/api/services/import-export/index.html +131 -0
  176. package/coverage/lcov-report/core/api/services/index.html +116 -0
  177. package/coverage/lcov-report/core/api/services/index.js.html +499 -0
  178. package/coverage/lcov-report/core/api/services/mailer/index.html +131 -0
  179. package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +190 -0
  180. package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +118 -0
  181. package/coverage/lcov-report/core/api/services/organisations/index.html +131 -0
  182. package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +178 -0
  183. package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +343 -0
  184. package/coverage/lcov-report/core/api/services/push/index.html +131 -0
  185. package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +190 -0
  186. package/coverage/lcov-report/core/api/services/push/push.service.js.html +121 -0
  187. package/coverage/lcov-report/core/api/services/storage/index.html +131 -0
  188. package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +190 -0
  189. package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +172 -0
  190. package/coverage/lcov-report/core/api/services/tags/index.html +116 -0
  191. package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +178 -0
  192. package/coverage/lcov-report/core/api/services/users/index.html +116 -0
  193. package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +307 -0
  194. package/coverage/lcov-report/core/api/utils.js.html +118 -0
  195. package/coverage/lcov-report/core/common/errors.js.html +88 -0
  196. package/coverage/lcov-report/core/common/index.html +176 -0
  197. package/coverage/lcov-report/core/common/index.js.html +115 -0
  198. package/coverage/lcov-report/core/common/permissions.js.html +1048 -0
  199. package/coverage/lcov-report/core/common/schema.js.html +190 -0
  200. package/coverage/lcov-report/core/common/utils.js.html +220 -0
  201. package/coverage/lcov-report/favicon.png +0 -0
  202. package/coverage/lcov-report/index.html +491 -0
  203. package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +457 -0
  204. package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +397 -0
  205. package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +1309 -0
  206. package/coverage/lcov-report/map/api/hooks/index.html +161 -0
  207. package/coverage/lcov-report/map/api/hooks/index.js.html +94 -0
  208. package/coverage/lcov-report/map/api/index.html +131 -0
  209. package/coverage/lcov-report/map/api/index.js.html +139 -0
  210. package/coverage/lcov-report/map/api/marshall.js.html +178 -0
  211. package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +106 -0
  212. package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +127 -0
  213. package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +196 -0
  214. package/coverage/lcov-report/map/api/models/index.html +161 -0
  215. package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +109 -0
  216. package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +274 -0
  217. package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +610 -0
  218. package/coverage/lcov-report/map/api/services/alerts/index.html +131 -0
  219. package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +316 -0
  220. package/coverage/lcov-report/map/api/services/catalog/index.html +116 -0
  221. package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +1510 -0
  222. package/coverage/lcov-report/map/api/services/daptiles/index.html +116 -0
  223. package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +241 -0
  224. package/coverage/lcov-report/map/api/services/features/features.service.js.html +241 -0
  225. package/coverage/lcov-report/map/api/services/features/index.html +131 -0
  226. package/coverage/lcov-report/map/api/services/index.html +116 -0
  227. package/coverage/lcov-report/map/api/services/index.js.html +817 -0
  228. package/coverage/lcov-report/map/api/services/projects/index.html +116 -0
  229. package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +439 -0
  230. package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +466 -0
  231. package/coverage/lcov-report/map/common/errors.js.html +94 -0
  232. package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +541 -0
  233. package/coverage/lcov-report/map/common/grid.js.html +1612 -0
  234. package/coverage/lcov-report/map/common/index.html +371 -0
  235. package/coverage/lcov-report/map/common/index.js.html +172 -0
  236. package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +556 -0
  237. package/coverage/lcov-report/map/common/moment-utils.js.html +157 -0
  238. package/coverage/lcov-report/map/common/opendap-grid-source.js.html +868 -0
  239. package/coverage/lcov-report/map/common/opendap-utils.js.html +826 -0
  240. package/coverage/lcov-report/map/common/permissions.js.html +124 -0
  241. package/coverage/lcov-report/map/common/time-based-grid-source.js.html +418 -0
  242. package/coverage/lcov-report/map/common/tms-utils.js.html +274 -0
  243. package/coverage/lcov-report/map/common/wcs-grid-source.js.html +364 -0
  244. package/coverage/lcov-report/map/common/wcs-utils.js.html +586 -0
  245. package/coverage/lcov-report/map/common/weacast-grid-source.js.html +1033 -0
  246. package/coverage/lcov-report/map/common/wfs-utils.js.html +574 -0
  247. package/coverage/lcov-report/map/common/wms-utils.js.html +451 -0
  248. package/coverage/lcov-report/map/common/wmts-utils.js.html +547 -0
  249. package/coverage/lcov-report/prettify.css +1 -0
  250. package/coverage/lcov-report/prettify.js +2 -0
  251. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  252. package/coverage/lcov-report/sorter.js +196 -0
  253. package/coverage/lcov.info +11128 -0
  254. package/coverage/map/api/hooks/hooks.catalog.js.html +457 -0
  255. package/coverage/map/api/hooks/hooks.features.js.html +397 -0
  256. package/coverage/map/api/hooks/hooks.query.js.html +1309 -0
  257. package/coverage/map/api/hooks/index.html +161 -0
  258. package/coverage/map/api/hooks/index.js.html +94 -0
  259. package/coverage/map/api/index.html +131 -0
  260. package/coverage/map/api/index.js.html +139 -0
  261. package/coverage/map/api/marshall.js.html +178 -0
  262. package/coverage/map/api/models/alerts.model.mongodb.js.html +106 -0
  263. package/coverage/map/api/models/catalog.model.mongodb.js.html +127 -0
  264. package/coverage/map/api/models/features.model.mongodb.js.html +196 -0
  265. package/coverage/map/api/models/index.html +161 -0
  266. package/coverage/map/api/models/projects.model.mongodb.js.html +109 -0
  267. package/coverage/map/api/services/alerts/alerts.hooks.js.html +274 -0
  268. package/coverage/map/api/services/alerts/alerts.service.js.html +610 -0
  269. package/coverage/map/api/services/alerts/index.html +131 -0
  270. package/coverage/map/api/services/catalog/catalog.hooks.js.html +316 -0
  271. package/coverage/map/api/services/catalog/index.html +116 -0
  272. package/coverage/map/api/services/daptiles/daptiles.service.js.html +1510 -0
  273. package/coverage/map/api/services/daptiles/index.html +116 -0
  274. package/coverage/map/api/services/features/features.hooks.js.html +241 -0
  275. package/coverage/map/api/services/features/features.service.js.html +241 -0
  276. package/coverage/map/api/services/features/index.html +131 -0
  277. package/coverage/map/api/services/index.html +116 -0
  278. package/coverage/map/api/services/index.js.html +817 -0
  279. package/coverage/map/api/services/projects/index.html +116 -0
  280. package/coverage/map/api/services/projects/projects.hooks.js.html +439 -0
  281. package/coverage/map/common/dynamic-grid-source.js.html +466 -0
  282. package/coverage/map/common/errors.js.html +94 -0
  283. package/coverage/map/common/geotiff-grid-source.js.html +541 -0
  284. package/coverage/map/common/grid.js.html +1612 -0
  285. package/coverage/map/common/index.html +371 -0
  286. package/coverage/map/common/index.js.html +172 -0
  287. package/coverage/map/common/meteo-model-grid-source.js.html +556 -0
  288. package/coverage/map/common/moment-utils.js.html +157 -0
  289. package/coverage/map/common/opendap-grid-source.js.html +868 -0
  290. package/coverage/map/common/opendap-utils.js.html +826 -0
  291. package/coverage/map/common/permissions.js.html +124 -0
  292. package/coverage/map/common/time-based-grid-source.js.html +418 -0
  293. package/coverage/map/common/tms-utils.js.html +274 -0
  294. package/coverage/map/common/wcs-grid-source.js.html +364 -0
  295. package/coverage/map/common/wcs-utils.js.html +586 -0
  296. package/coverage/map/common/weacast-grid-source.js.html +1033 -0
  297. package/coverage/map/common/wfs-utils.js.html +574 -0
  298. package/coverage/map/common/wms-utils.js.html +451 -0
  299. package/coverage/map/common/wmts-utils.js.html +547 -0
  300. package/coverage/prettify.css +1 -0
  301. package/coverage/prettify.js +2 -0
  302. package/coverage/sort-arrow-sprite.png +0 -0
  303. package/coverage/sorter.js +196 -0
  304. package/coverage/tmp/coverage-137435-1719398750767-0.json +1 -0
  305. package/coverage/tmp/coverage-137447-1719398750752-0.json +1 -0
  306. package/coverage/tmp/coverage-137458-1719398750740-0.json +1 -0
  307. package/coverage/tmp/coverage-137470-1719398750728-0.json +1 -0
  308. package/coverage/tmp/coverage-137477-1719398750691-0.json +1 -0
  309. package/map/api/hooks/hooks.query.js +5 -2
  310. package/map/api/services/catalog/catalog.hooks.js +4 -5
  311. package/map/client/cesium/utils/index.js +2 -1
  312. package/map/client/cesium/utils/utils.cesium.js +8 -0
  313. package/map/client/cesium/utils/utils.features.js +2 -2
  314. package/map/client/cesium/utils/utils.style.js +19 -17
  315. package/map/client/components/KCompass.vue +25 -3
  316. package/map/client/components/KEditLayerData.vue +1 -1
  317. package/map/client/components/KPositionIndicator.vue +1 -1
  318. package/map/client/components/catalog/KConnectLayer.vue +2 -2
  319. package/map/client/components/catalog/KCreateView.vue +2 -2
  320. package/map/client/components/form/KDirectionField.vue +4 -0
  321. package/map/client/components/form/KOwsLayerField.vue +4 -4
  322. package/map/client/components/form/KOwsServiceField.vue +3 -4
  323. package/map/client/components/legend/KLegend.vue +13 -15
  324. package/map/client/components/tools/KGeolocateTool.vue +1 -1
  325. package/map/client/components/widget/KStackableTimeSeries.vue +3 -0
  326. package/map/client/composables/highlight.js +4 -1
  327. package/map/client/elevation-utils.js +2 -2
  328. package/map/client/i18n/map_en.json +3 -1
  329. package/map/client/i18n/map_fr.json +3 -1
  330. package/map/client/mixins/globe/mixin.base-globe.js +121 -80
  331. package/map/client/mixins/globe/mixin.file-layers.js +2 -2
  332. package/map/client/mixins/globe/mixin.geojson-layers.js +24 -19
  333. package/map/client/mixins/globe/mixin.globe-activity.js +3 -3
  334. package/map/client/mixins/globe/mixin.opendap-layers.js +3 -3
  335. package/map/client/mixins/globe/mixin.style.js +5 -5
  336. package/map/client/mixins/globe/mixin.tooltip.js +5 -3
  337. package/map/client/mixins/map/mixin.base-map.js +42 -4
  338. package/map/client/mixins/map/mixin.canvas-layers.js +0 -1
  339. package/map/client/mixins/map/mixin.geojson-layers.js +10 -5
  340. package/map/client/mixins/mixin.activity.js +2 -2
  341. package/map/client/mixins/mixin.feature-selection.js +7 -5
  342. package/map/client/mixins/mixin.levels.js +1 -1
  343. package/map/client/utils/utils.catalog.js +15 -0
  344. package/map/client/utils/utils.location.js +2 -1
  345. package/map/client/utils/utils.style.js +1 -1
  346. package/map/common/geotiff-grid-source.js +5 -3
  347. package/map/common/grid.js +2 -2
  348. package/map/common/meteo-model-grid-source.js +1 -1
  349. package/map/common/time-based-grid-source.js +1 -1
  350. package/map/common/wmts-utils.js +11 -11
  351. package/package.json +12 -8
  352. package/scripts/build_docs.sh +37 -0
  353. package/scripts/init_runner.sh +30 -0
  354. package/scripts/kash/.github/workflows/run_tests.yaml +33 -0
  355. package/scripts/kash/README.md +2 -0
  356. package/scripts/kash/kash.sh +1657 -0
  357. package/scripts/kash/scripts/run_tests.sh +151 -0
  358. package/scripts/run_tests.sh +48 -0
  359. package/scripts/setup_workspace.sh +42 -0
  360. package/test/api/core/hooks.test.js +31 -0
  361. package/test/api/core/test-log-2023-12-19.log +7 -0
  362. package/test/api/core/test-log-2024-01-04.log +14 -0
  363. package/test/api/core/test-log-2024-05-14.log +6 -0
  364. package/test/api/core/test-log-2024-06-06.log +23 -0
  365. package/test/api/core/test-log-2024-06-26.log +25 -0
  366. package/test/api/map/grid-sources.test.js +3 -1
  367. package/test/api/map/hooks.test.js +58 -12
  368. package/test/api/map/test-log-2023-11-24.log +121 -0
  369. package/test/api/map/test-log-2023-12-12.log +29 -0
  370. package/test/api/map/test-log-2023-12-13.log +5 -0
  371. package/test/api/map/test-log-2024-01-04.log +2 -0
  372. package/test/api/map/test-log-2024-01-11.log +1 -0
  373. package/test/api/map/test-log-2024-01-25.log +19 -0
  374. package/test/api/map/test-log-2024-06-06.log +39 -0
  375. package/test/client/core/collection.js +2 -2
  376. package/test/client/core/dialogs.js +13 -0
  377. package/test/client/core/index.js +6 -5
  378. package/test/client/core/layout.js +1 -13
  379. package/test/client/core/runner.js +41 -20
  380. package/test/client/core/screens.js +6 -0
  381. package/test/client/core/utils.js +23 -19
  382. package/.travis.doc.sh +0 -8
  383. package/.travis.test.sh +0 -72
  384. package/core/client/components/KAction.vue +0 -393
  385. package/core/client/components/KBlock.vue +0 -67
  386. package/core/client/components/app/KTerms.vue +0 -41
@@ -2,28 +2,30 @@
2
2
  <div class="column">
3
3
  <!-- Banner -->
4
4
  <div class="row justify-center">
5
- <component :is="logoComponent" />
5
+ <KContent :content="banner" />
6
6
  </div>
7
7
  <!-- Version -->
8
8
  <KVersion class="q-pa-sm" />
9
9
  <!-- Endpoint -->
10
- <div class="row justify-center">
10
+ <div class="q-pb-md row justify-center">
11
11
  <cite>{{ $t('KAbout.DOMAIN') }}
12
- <a :href="$config('domain')" target="_blank">{{ $config('domain') }}</a>
12
+ <a :href="domain" target="_blank">{{ domain }}</a>
13
13
  </cite>
14
14
  <cite>
15
- &nbsp;({{ $config('flavor') }})
15
+ &nbsp;({{ flavor }})
16
16
  </cite>
17
17
  </div>
18
- <!-- separator -->
19
- <div class="q-py-md">
20
- <q-separator />
18
+ <!-- Extra content -->
19
+ <div v-if="content" class="q-pl-md q-pr-md q-pt-md">
20
+ <KContent :content="content" />
21
21
  </div>
22
+ <!-- Separator -->
23
+ <q-separator />
22
24
  <!-- Actions -->
23
25
  <KPanel
24
26
  id="actions"
25
27
  :content="actions"
26
- class="justify-center"
28
+ class="q-pt-md justify-center"
27
29
  />
28
30
  <!-- Sponsor -->
29
31
  <KSponsor class="q-pt-lg" />
@@ -34,64 +36,15 @@
34
36
  import _ from 'lodash'
35
37
  import config from 'config'
36
38
  import { ref } from 'vue'
37
- import { i18n } from '../../i18n'
38
- import { loadComponent } from '../../utils'
39
- import { getPlatform } from '../../utils/utils.platform'
40
- import { useVersion } from '../../composables'
39
+ import KContent from '../KContent.vue'
41
40
  import KVersion from '../KVersion.vue'
42
41
  import KSponsor from '../KSponsor.vue'
43
42
  import KPanel from '../KPanel.vue'
44
43
 
45
44
  // Data
46
- const { clientVersionName, apiVersionName } = useVersion()
47
- const platform = getPlatform()
48
- // logo component
49
- const logoComponent = ref(loadComponent(_.get(config, 'logoComponent', 'KLogo')))
50
- // changelog url
51
- const changelog = _.get(config, 'appChangelog')
52
- // bug report
53
- const bugReport = {
54
- address: _.get(config, 'publisherContact'),
55
- subject: i18n.t('KAbout.BUG_REPORT_SUBJECT', {
56
- appName: _.get(config, 'appName'),
57
- clientVersion: clientVersionName.value,
58
- apiVersion: apiVersionName.value
59
- }),
60
- body: i18n.t('KAbout.BUG_REPORT_BODY')
61
- }
62
- _.forOwn(platform, (value, key) => { bugReport.body += `${key}: ${value}%0D%0A` })
63
- bugReport.body += `domain: ${_.get(config, 'domain')}%0D%0A`
64
- bugReport.body += `flavor: ${_.get(config, 'flavor')}%0D%0A`
65
- // actions
66
- const defaultActions = [{
67
- id: 'platform-info',
68
- icon: 'las la-desktop',
69
- label: 'KAbout.PLATFORM_INFO',
70
- stack: true,
71
- dialog: {
72
- title: 'KAbout.PLATFORM_INFO',
73
- component: 'app/KPlatform',
74
- okAction: 'CLOSE',
75
- widthPolicy: 'narrow'
76
- }
77
- }]
78
- if (!_.isNil(bugReport.address)) {
79
- defaultActions.unshift({
80
- id: 'report-bug',
81
- icon: 'las la-bug',
82
- label: 'KAbout.BUG_REPORT',
83
- stack: true,
84
- url: `mailto:${bugReport.address}?subject=${bugReport.subject}&body=${bugReport.body}`
85
- })
86
- }
87
- if (!_.isNil(changelog)) {
88
- defaultActions.unshift({
89
- id: 'view-changelog',
90
- icon: 'las la-history',
91
- label: 'KAbout.VIEW_CHANGELOG',
92
- stack: true,
93
- url: changelog
94
- })
95
- }
96
- const actions = ref(_.get(config, 'about.actions', defaultActions))
45
+ const domain = ref(_.get(config, 'domain'))
46
+ const flavor = ref(_.get(config, 'flavor'))
47
+ const banner = ref(_.get(config, 'about.banner', [{ component: 'KLogo' }]))
48
+ const content = ref(_.get(config, 'about.content', []))
49
+ const actions = ref(_.get(config, 'about.actions', []))
97
50
  </script>
@@ -30,7 +30,7 @@
30
30
  import { useQuasar, copyToClipboard } from 'quasar'
31
31
  import { i18n } from '../../i18n.js'
32
32
  import { getPlatform } from '../../utils/utils.platform'
33
- import KAction from '../KAction.vue'
33
+ import KAction from '../action/KAction.vue'
34
34
 
35
35
  // data
36
36
  const $q = useQuasar()
@@ -1,16 +1,18 @@
1
1
  <template>
2
- <KForm
3
- id="settings"
4
- ref="formRef"
5
- :values="settings"
6
- schema="settings.update"
7
- :schema-properties="schemaFilter"
8
- />
2
+ <Suspense>
3
+ <KForm
4
+ id="settings"
5
+ ref="formRef"
6
+ :values="settings"
7
+ schema="settings.update"
8
+ :filter="schemaFilter"
9
+ />
10
+ </Suspense>
9
11
  </template>
10
12
 
11
13
  <script setup>
12
14
  import _ from 'lodash'
13
- import { ref, onMounted } from 'vue'
15
+ import { ref } from 'vue'
14
16
  import { api } from '../../api.js'
15
17
  import KForm from '../form/KForm.vue'
16
18
 
@@ -29,12 +31,10 @@ async function apply () {
29
31
  }
30
32
  }
31
33
 
32
- // Hooks
33
- onMounted(async () => {
34
- settings.value = await serviceSettings.get('settings')
35
- const mapping = serviceSettings.getSettingsMapping()
36
- schemaFilter.value = Object.keys(mapping).filter(value => _.get(mapping, value))
37
- })
34
+ // Immediate
35
+ settings.value = await serviceSettings.get('settings')
36
+ const mapping = serviceSettings.getSettingsMapping()
37
+ schemaFilter.value = Object.keys(mapping).filter(value => _.get(mapping, value))
38
38
 
39
39
  // Expose
40
40
  defineExpose({
@@ -52,13 +52,12 @@ import _ from 'lodash'
52
52
  import logger from 'loglevel'
53
53
  import { ref, onMounted, onBeforeUnmount, watch, computed } from 'vue'
54
54
  import { useRouter, useRoute } from 'vue-router'
55
- import { Store, Events, i18n, beforeGuard } from '../..'
56
55
  import { Notify } from 'quasar'
56
+ import { Store, Events, i18n, beforeGuard } from '../..'
57
57
 
58
58
  // Data
59
59
  const router = useRouter()
60
60
  const route = useRoute()
61
- const notify = Notify.create
62
61
  const tourRef = ref()
63
62
  const tourSteps = ref([])
64
63
  const tourOptions = ref({
@@ -83,7 +82,7 @@ const tourCallbacks = ref({
83
82
  const isStepVisible = ref(true)
84
83
  let isRunning = false
85
84
 
86
- // functions
85
+ // Functions
87
86
  function hasLinkButton (step) {
88
87
  return _.has(step, 'params.route') && !_.has(step, 'link') // Only if no link label
89
88
  }
@@ -277,7 +276,7 @@ function blockOnMiss () {
277
276
  if (!getTarget(target)) missing = true
278
277
  })
279
278
  if (missing) {
280
- notify({ type: 'warning', message: i18n.t('KTour.MISS_ERROR') })
279
+ Notify.create({ type: 'warning', message: i18n.t('KTour.MISS_ERROR') })
281
280
  }
282
281
  }
283
282
  return missing
@@ -416,7 +415,7 @@ function beforeRoute (to, from, next) {
416
415
  next()
417
416
  }
418
417
 
419
- // hooks
418
+ // Hooks
420
419
  onMounted(() => {
421
420
  beforeGuard.unregisterGuard = router.beforeEach(beforeRoute)
422
421
  refreshTour()
@@ -426,15 +425,14 @@ onBeforeUnmount(() => {
426
425
  Events.off('tours-current-changed', setCurrentTour)
427
426
  })
428
427
 
429
- // computed
428
+ // Computed
430
429
  const step = computed(() => getStep())
431
430
 
432
- // watch
431
+ // Watch
433
432
  watch(route, (to, from) => refreshTour())
434
433
 
435
434
  // immediate
436
435
  Events.on('tours-current-changed', setCurrentTour)
437
-
438
436
  </script>
439
437
 
440
438
  <style lang="scss" scoped>
@@ -79,7 +79,7 @@ import { openURL, useQuasar } from 'quasar'
79
79
  import { Store, api } from '../..'
80
80
  import { loadComponent } from '../../utils'
81
81
  import { LocalStorage } from '../../local-storage.js'
82
- import KAction from '../KAction.vue'
82
+ import KAction from '../action/KAction.vue'
83
83
 
84
84
  // Data
85
85
  const $q = useQuasar()
@@ -1,11 +1,15 @@
1
1
  import KAbout from './KAbout.vue'
2
2
  import KHome from './KHome.vue'
3
3
  import KPlatform from './KPlatform.vue'
4
+ import KSettings from './KSettings.vue'
5
+ import KTour from './KTour.vue'
4
6
  import KWelcome from './KWelcome.vue'
5
7
 
6
8
  export {
7
9
  KAbout,
8
10
  KHome,
9
11
  KPlatform,
12
+ KSettings,
13
+ KTour,
10
14
  KWelcome
11
15
  }
@@ -30,32 +30,33 @@ import _ from 'lodash'
30
30
  import moment from 'moment'
31
31
  import Papa from 'papaparse'
32
32
  import { ref, watch } from 'vue'
33
- import { downloadAsBlob } from '../../utils'
33
+ import { downloadAsBlob, convertTimeSerie } from '../../utils'
34
34
  import { useSchema } from '../../composables'
35
- import { Units } from '../../units'
36
- import { Time } from '../../time'
37
- import { i18n } from '../../i18n'
38
-
39
- // const timeserie = {
40
- // variable: { } variable definition
41
- // data:
42
- // label:
43
- // color:
44
- // unit:
45
- // }
35
+ import { Units } from '../../units.js'
36
+ import { Time } from '../../time.js'
37
+ import { i18n } from '../../i18n.js'
46
38
 
39
+ // Props
47
40
  const props = defineProps({
48
- tables: { type: Array, default: () => [] },
49
- schema: { type: [String, Object], default: null },
50
- nbRowsPerPage: { type: Number, default: 10 }
51
- })
52
-
53
- defineExpose({
54
- update,
55
- exportData
41
+ tables: {
42
+ type: Array,
43
+ default: () => []
44
+ },
45
+ schema: {
46
+ type: [String, Object],
47
+ default: () => null
48
+ },
49
+ formatters: {
50
+ type: Object,
51
+ default: () => null
52
+ },
53
+ nbRowsPerPage: {
54
+ type: Number,
55
+ default: 10
56
+ }
56
57
  })
57
58
 
58
- // data
59
+ // Data
59
60
  const { schema, compile } = useSchema()
60
61
  const pagination = ref({
61
62
  // sortBy: '_id',
@@ -70,24 +71,28 @@ const height = ref(0)
70
71
  // Used to store template compilers per field
71
72
  const compilers = {}
72
73
  const exportCompilers = {}
74
+ let propertiesToConvert = []
73
75
 
74
- // computed
75
-
76
- // watch
76
+ // Watch
77
77
  watch(() => props.tables, update)
78
78
  watch(() => props.schema, update)
79
79
 
80
+ // Functions
80
81
  async function update () {
81
82
  await compile(props.schema)
82
83
  columns.value = []
83
84
  const invisibleColumns = []
85
+ propertiesToConvert = []
84
86
  _.forOwn(schema.value.properties, (value, key) => {
85
87
  const type = _.get(value, 'type')
86
88
  // FIXME: allow for custom representation of complex objects
87
89
  if (type === 'object') return
88
90
  const label = _.get(value, 'field.label', _.get(value, 'field.helper', key))
91
+ const convertToDefaultUnit = _.get(value, 'field.defaultUnit', false)
92
+ if (convertToDefaultUnit) propertiesToConvert.push(key)
89
93
  const visible = _.get(value, 'field.visible', true)
90
94
  if (!visible) invisibleColumns.push(key)
95
+ const formatter = _.has(value, 'field.formatter') ? _.get(props.formatters, value.field.formatter) : null
91
96
  const format = _.get(value, 'format')
92
97
  const path = _.get(value, 'field.path', key)
93
98
  if (_.has(value, 'field.template')) {
@@ -107,6 +112,7 @@ async function update () {
107
112
  align: 'center',
108
113
  sortable: true,
109
114
  format: (value, row) => {
115
+ if (formatter) return formatter(value, row)
110
116
  if (_.isNil(value)) return ''
111
117
  if (compilers[key]) return compilers[key]({ value, row, i18n, Units, Time, moment })
112
118
  switch (type) {
@@ -129,6 +135,7 @@ async function update () {
129
135
  rows.value = []
130
136
  for (const table of props.tables) {
131
137
  const data = await table.data
138
+ convertTimeSerie(data, table.variable, propertiesToConvert)
132
139
  rows.value = rows.value.concat(data)
133
140
  }
134
141
  }
@@ -141,6 +148,7 @@ async function exportData (options = {}) {
141
148
  for (let i = 0; i < props.tables.length; i++) {
142
149
  const table = props.tables[i]
143
150
  const data = await table.data
151
+ await convertTimeSerie(data, table.variable, propertiesToConvert)
144
152
  for (const item of data) {
145
153
  const row = {}
146
154
  _.forOwn(schema.value.properties, (value, key) => {
@@ -173,9 +181,16 @@ async function exportData (options = {}) {
173
181
  downloadAsBlob(csv, _.template(options.filename || i18n.t('KDataTable.DATA_EXPORT_FILE'))(), 'text/csv;charset=utf-8;')
174
182
  }
175
183
 
176
- // immediate
184
+ // Immediate
177
185
  update()
186
+
187
+ // Exposed
188
+ defineExpose({
189
+ update,
190
+ exportData
191
+ })
178
192
  </script>
193
+
179
194
  <style lang="scss" scoped>
180
195
  .data-table-background {
181
196
  background-color: $table-background
@@ -79,9 +79,10 @@ async function onCanvasRef (ref) {
79
79
  canvas = ref
80
80
  }
81
81
  function getUnit (timeSerie) {
82
- // Falback to base unit
83
- const unit = _.get(timeSerie, 'variable.unit')
84
- return unit
82
+ return _.get(timeSerie, 'variable.unit')
83
+ }
84
+ function setUnit (timeserie, targetUnit) {
85
+ _.set(timeserie, 'variable.unit', targetUnit)
85
86
  }
86
87
  function getZoom () {
87
88
  const start = moment.utc(_.get(chart, 'scales.x.min'))
@@ -136,8 +137,9 @@ async function makeChartConfig () {
136
137
  },
137
138
  label: (context) => {
138
139
  const { unit, label } = context.dataset
140
+ const defaultUnit = Units.getDefaultUnit(unit)
139
141
  const y = _.get(context, 'parsed.y')
140
- return label + ': ' + Units.format(y, unit)
142
+ return label + ': ' + Units.format(y, defaultUnit)
141
143
  }
142
144
  }
143
145
  },
@@ -158,7 +160,7 @@ async function makeChartConfig () {
158
160
  backgroundColor: getCssVar('secondary') + '88'
159
161
  },
160
162
  mode: 'x',
161
- onZoomStart: onZoomStart,
163
+ onZoomStart,
162
164
  onZoom: onZoomEnd
163
165
  }
164
166
  }
@@ -243,21 +245,22 @@ function makeScales () {
243
245
  let axisId = 0
244
246
  for (const timeSerie of props.timeSeries) {
245
247
  const unit = getUnit(timeSerie)
246
- if (!unit2axis.has(unit)) {
248
+ const defaultUnit = Units.getDefaultUnit(unit)
249
+ if (!unit2axis.has(defaultUnit)) {
247
250
  const axis = `y${axisId}`
248
- unit2axis.set(unit, axis)
251
+ unit2axis.set(defaultUnit, axis)
249
252
  scales[axis] = _.merge({
250
- unit,
253
+ targetUnit: defaultUnit,
251
254
  type: props.logarithmic ? 'logarithmic' : 'linear',
252
255
  position: (axisId + 1) % 2 ? 'left' : 'right',
253
256
  title: {
254
257
  display: true,
255
- text: unit
258
+ text: defaultUnit
256
259
  },
257
260
  ticks: {
258
261
  callback: function (value, index, values) {
259
262
  if (values[index] !== undefined) {
260
- return Units.format(values[index].value, unit, null, { symbol: false })
263
+ return Units.format(values[index].value, null, null, { symbol: false })
261
264
  }
262
265
  }
263
266
  }
@@ -276,6 +279,8 @@ async function makeDatasets () {
276
279
  for (const timeSerie of props.timeSeries) {
277
280
  const label = _.get(timeSerie, 'variable.label')
278
281
  const unit = getUnit(timeSerie)
282
+ const defaultUnit = Units.getDefaultUnit(unit)
283
+ setUnit(timeSerie, defaultUnit)
279
284
  const data = await timeSerie.data
280
285
  const dataset = Object.assign({
281
286
  label,
@@ -288,8 +293,11 @@ async function makeDatasets () {
288
293
  // Update time/value range
289
294
  data.forEach(item => {
290
295
  const time = moment.utc(_.get(item, xAxisKey))
291
-
292
- const value = _.get(item, yAxisKey)
296
+ let value = _.get(item, yAxisKey)
297
+ if (unit !== defaultUnit) {
298
+ value = Units.convert(value, unit, defaultUnit)
299
+ _.set(item, yAxisKey, value)
300
+ }
293
301
  if (_.isNil(min) || (value < min)) min = value
294
302
  if (_.isNil(max) || (value > max)) max = value
295
303
  if (!props.startTime) {
@@ -100,7 +100,7 @@
100
100
 
101
101
  <script>
102
102
  import _ from 'lodash'
103
- import KAction from '../KAction.vue'
103
+ import KAction from '../action/KAction.vue'
104
104
  import KPanel from '../KPanel.vue'
105
105
  import KTextArea from '../KTextArea.vue'
106
106
  import KAvatar from '../KAvatar.vue'
@@ -78,7 +78,7 @@
78
78
  import _ from 'lodash'
79
79
  import { ref, computed, watch, toRefs, onBeforeMount, onBeforeUnmount } from 'vue'
80
80
  import { Events } from '../../events.js'
81
- import KAction from '../KAction.vue'
81
+ import KAction from '../action/KAction.vue'
82
82
  import KScrollArea from '../KScrollArea.vue'
83
83
  import KStamp from '../KStamp.vue'
84
84
  import { useCollection } from '../../composables'
@@ -72,10 +72,15 @@ export default {
72
72
  type: String,
73
73
  default: 'KFilter.SEARCH_LABEL'
74
74
  },
75
+ // TODO: keep this props for backward compatibility
75
76
  field: {
76
77
  type: String,
77
78
  default: 'name'
78
79
  },
80
+ fields: {
81
+ type: [String, Array],
82
+ default: 'name'
83
+ },
79
84
  description: {
80
85
  type: String,
81
86
  default: 'description'
@@ -145,7 +150,7 @@ export default {
145
150
  },
146
151
  created () {
147
152
  // Initialize the filter, we keep track of any existing items previously set by another activity
148
- this.$store.patch('filter', { field: this.field, pattern: '' })
153
+ this.$store.patch('filter', { fields: this.fields || this.field, pattern: '' })
149
154
  },
150
155
  beforeUnmount () {
151
156
  this.items = []
@@ -0,0 +1,83 @@
1
+ <template>
2
+ <div v-if="content">
3
+ <KHtml v-if="contentType === 'html'"
4
+ :content="content"
5
+ />
6
+ <KMarkdown v-if="contentType === 'md'"
7
+ :content="content"
8
+ :options="options"
9
+ />
10
+ </div>
11
+ </template>
12
+
13
+ <script setup>
14
+ import _ from 'lodash'
15
+ import logger from 'loglevel'
16
+ import { ref, watch } from 'vue'
17
+ import { i18n } from '../../i18n.js'
18
+ import KHtml from './KHtml.vue'
19
+ import KMarkdown from './KMarkdown.vue'
20
+
21
+ // Props
22
+ const props = defineProps({
23
+ url: {
24
+ type: String,
25
+ default: undefined
26
+ },
27
+ localize: {
28
+ type: Boolean,
29
+ default: true
30
+ },
31
+ options: {
32
+ type: Object,
33
+ default: () => null
34
+ }
35
+ })
36
+
37
+ // Data
38
+ const contentType = ref(null)
39
+ const content = ref(null)
40
+
41
+ // Function
42
+ function guessContentType () {
43
+ const index = _.lastIndexOf(props.url, '.')
44
+ if (index) {
45
+ return props.url.substring(index + 1)
46
+ }
47
+ }
48
+
49
+ // Watch
50
+ watch(() => props.url, async (value) => {
51
+ if (!_.isEmpty(props.url)) {
52
+ content.value = null
53
+ // guess content type
54
+ contentType.value = guessContentType()
55
+ if (contentType.value) {
56
+ let urls
57
+ // localize file if needed
58
+ if (props.localize) urls = i18n.localize(props.url)
59
+ else urls = [props.url]
60
+ // try to load the content
61
+ let response
62
+ for (const url of urls) {
63
+ try {
64
+ response = await fetch(url)
65
+ if (response.ok) {
66
+ content.value = await response.text()
67
+ break
68
+ }
69
+ } catch (error) {
70
+ // ignore the error
71
+ }
72
+ }
73
+ if (content.value === null) {
74
+ logger.error(`[KDK] fetch '${props.url}' failed with error with code: ${response.status}`)
75
+ }
76
+ } else {
77
+ logger.error(`[KDK] cannot guess content type for '${props.url}'`)
78
+ }
79
+ } else {
80
+ content.value = null
81
+ }
82
+ }, { immediate: true })
83
+ </script>
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <div v-if="html" v-html="html" />
3
+ </template>
4
+
5
+ <script setup>
6
+ import { ref, watch } from 'vue'
7
+
8
+ // Data
9
+ const html = ref(null)
10
+
11
+ // Props
12
+ const props = defineProps({
13
+ content: {
14
+ type: String,
15
+ default: null
16
+ }
17
+ })
18
+
19
+ // Watch
20
+ watch(() => props.content, async (value) => {
21
+ html.value = props.content
22
+ }, { immediate: true })
23
+ </script>
@@ -0,0 +1,37 @@
1
+ <template>
2
+ <KHtml
3
+ v-if="html"
4
+ :content="html"
5
+ />
6
+ </template>
7
+
8
+ <script setup>
9
+ import { ref, watch } from 'vue'
10
+ import showdown from 'showdown'
11
+ import KHtml from './KHtml.vue'
12
+
13
+ // Props
14
+ const props = defineProps({
15
+ content: {
16
+ type: String,
17
+ default: undefined
18
+ },
19
+ options: {
20
+ type: Object,
21
+ default: () => {}
22
+ }
23
+ })
24
+
25
+ // Data
26
+ const html = ref(null)
27
+
28
+ // Watch
29
+ watch(() => [props.content, props.options], async (value) => {
30
+ if (props.content) {
31
+ const converter = new showdown.Converter(props.options)
32
+ html.value = converter.makeHtml(props.content)
33
+ } else {
34
+ html.value = null
35
+ }
36
+ }, { immediate: true })
37
+ </script>
@@ -0,0 +1,9 @@
1
+ import KDocument from './KDocument.vue'
2
+ import KHtml from './KHtml.vue'
3
+ import KMarkdown from './KMarkdown.vue'
4
+
5
+ export {
6
+ KDocument,
7
+ KHtml,
8
+ KMarkdown
9
+ }
@@ -115,7 +115,11 @@ const groups = computed(() => {
115
115
 
116
116
  // Watch
117
117
  watch(() => props.schema, async (value) => {
118
- logger.debug('[KDK] Schema changed', value)
118
+ logger.debug('[KDK] Schema content changed', value)
119
+ if (value) await build()
120
+ })
121
+ watch(() => props.filter, async (value) => {
122
+ logger.debug('[KDK] Schema filter changed', value)
119
123
  if (value) await build()
120
124
  })
121
125