@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,28 +1,23 @@
1
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"
2
+ <div v-if="viewer">
3
+ <component
4
+ :is="viewer"
5
+ v-bind="$props"
9
6
  />
10
7
  </div>
11
8
  </template>
12
9
 
13
10
  <script setup>
14
11
  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'
12
+ import { computed } from 'vue'
13
+ import { Document } from '../../document.js'
14
+ import { loadComponent } from '../../utils'
20
15
 
21
16
  // Props
22
17
  const props = defineProps({
23
18
  url: {
24
19
  type: String,
25
- default: undefined
20
+ default: null
26
21
  },
27
22
  localize: {
28
23
  type: Boolean,
@@ -34,50 +29,20 @@ const props = defineProps({
34
29
  }
35
30
  })
36
31
 
37
- // Data
38
- const contentType = ref(null)
39
- const content = ref(null)
32
+ // Computed
33
+ const viewer = computed(() => {
34
+ const mimeType = guessMimeType()
35
+ if (!mimeType) return null
36
+ const viewer = _.get(Document.options, `viewers.${mimeType}`)
37
+ if (!viewer) return null
38
+ return loadComponent(viewer)
39
+ })
40
40
 
41
41
  // Function
42
- function guessContentType () {
42
+ function guessMimeType () {
43
+ if (!props.url) return null
43
44
  const index = _.lastIndexOf(props.url, '.')
44
- if (index) {
45
- return props.url.substring(index + 1)
46
- }
45
+ if (!index) return null
46
+ return props.url.substring(index + 1)
47
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
48
  </script>
@@ -1,23 +1,33 @@
1
1
  <template>
2
- <div v-if="html" v-html="html" />
2
+ <div
3
+ v-if="html"
4
+ v-html="html"
5
+ />
3
6
  </template>
4
7
 
5
8
  <script setup>
6
9
  import { ref, watch } from 'vue'
7
-
8
- // Data
9
- const html = ref(null)
10
+ import { Document } from '../../document.js'
10
11
 
11
12
  // Props
12
13
  const props = defineProps({
13
- content: {
14
+ url: {
14
15
  type: String,
15
16
  default: null
17
+ },
18
+ localize: {
19
+ type: Boolean,
20
+ default: true
16
21
  }
17
22
  })
18
23
 
24
+ // Data
25
+ const html = ref(null)
26
+
19
27
  // Watch
20
- watch(() => props.content, async (value) => {
21
- html.value = props.content
28
+ watch(() => props.url, async (value) => {
29
+ const response = await Document.fetchUrl(value, props.localize)
30
+ if (response?.ok) html.value = Document.sanitizeHtml(await response.text())
31
+ else html.value = null
22
32
  }, { immediate: true })
23
33
  </script>
@@ -0,0 +1,78 @@
1
+ <template>
2
+ <div>
3
+ <div v-if="interactive === true" class="fit" >
4
+ <pinch-zoom class="pinch-zoom-controller fit row justify-center items-center" @change="$emit('image-transformed')">
5
+ <img :src="url" class="fit" :onload="onLoaded" />
6
+ </pinch-zoom>
7
+
8
+ </div>
9
+ <div v-else class="fit row justify-center items-center">
10
+ <img :src="url" class="fit" :onload="onLoaded" />
11
+ </div>
12
+ <q-spinner
13
+ class="absolute-center"
14
+ v-if="loading"
15
+ color="white"
16
+ size="3em"
17
+ />
18
+ </div>
19
+ </template>
20
+
21
+ <script setup>
22
+ import _ from 'lodash'
23
+ import { ref, computed, onMounted } from 'vue'
24
+ import 'pinch-zoom-element/dist/pinch-zoom.js'
25
+
26
+ // Props
27
+ const props = defineProps({
28
+ url: {
29
+ type: String,
30
+ default: ''
31
+ },
32
+ options: {
33
+ type: Object,
34
+ default: () => {
35
+ return {
36
+ interactive: true
37
+ }
38
+ }
39
+ }
40
+ })
41
+
42
+ // Emit
43
+ defineEmits(['image-transformed'])
44
+
45
+ // Data
46
+ const loading = ref(true)
47
+
48
+ // Computed
49
+ const interactive = computed(() => {
50
+ return _.get(props.options, 'interactive', true)
51
+ })
52
+
53
+ // Functions
54
+ function restore () {
55
+ const controller = document.querySelector('.pinch-zoom-controller')
56
+ if (controller) {
57
+ controller.setTransform({
58
+ scale: 1,
59
+ x: 0,
60
+ y: 0,
61
+ allowChangeEvent: true
62
+ })
63
+ }
64
+ }
65
+ function onLoaded () {
66
+ loading.value = false
67
+ }
68
+
69
+ // Hooks
70
+ onMounted(() => {
71
+ restore()
72
+ })
73
+
74
+ // Expose
75
+ defineExpose({
76
+ restore
77
+ })
78
+ </script>
@@ -1,24 +1,23 @@
1
1
  <template>
2
- <KHtml
2
+ <div
3
3
  v-if="html"
4
- :content="html"
4
+ v-html="html"
5
5
  />
6
6
  </template>
7
7
 
8
8
  <script setup>
9
9
  import { ref, watch } from 'vue'
10
- import showdown from 'showdown'
11
- import KHtml from './KHtml.vue'
10
+ import { Document } from '../../document.js'
12
11
 
13
12
  // Props
14
13
  const props = defineProps({
15
- content: {
14
+ url: {
16
15
  type: String,
17
- default: undefined
16
+ default: null
18
17
  },
19
- options: {
20
- type: Object,
21
- default: () => {}
18
+ localize: {
19
+ type: Boolean,
20
+ default: true
22
21
  }
23
22
  })
24
23
 
@@ -26,12 +25,9 @@ const props = defineProps({
26
25
  const html = ref(null)
27
26
 
28
27
  // 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
- }
28
+ watch(() => props.url, async (value) => {
29
+ const response = await Document.fetchUrl(value, props.localize)
30
+ if (response?.ok) html.value = Document.sanitizeHtml(Document.convertMdToHtml(await response.text()))
31
+ else html.value = null
36
32
  }, { immediate: true })
37
33
  </script>
@@ -0,0 +1,69 @@
1
+ <template>
2
+ <div
3
+ id="viewer"
4
+ class="fit"
5
+ />
6
+ </template>
7
+
8
+ <script setup>
9
+ import _ from 'lodash'
10
+ import { watch, onMounted } from 'vue'
11
+ import { Viewer } from '@pdfme/ui'
12
+ import { Document } from '../../document.js'
13
+
14
+ // Props
15
+ const props = defineProps({
16
+ url: {
17
+ type: String,
18
+ default: null
19
+ },
20
+ localize: {
21
+ type: Boolean,
22
+ default: true
23
+ },
24
+ options: {
25
+ type: Object,
26
+ default: () => {
27
+ return {
28
+ schemas: [],
29
+ inputs: [{ fake: 'fake' }]
30
+ }
31
+ }
32
+ }
33
+ })
34
+
35
+ // Data
36
+ const defaultSchemas = []
37
+ const defaultInputs = [{ fake: 'fake' }]
38
+ let domViewer
39
+ let viewer
40
+
41
+ // Watch
42
+ watch(() => props.url, async (value) => {
43
+ if (viewer) {
44
+ viewer.destroy()
45
+ viewer = null
46
+ }
47
+ const response = await Document.fetchUrl(value, props.localize)
48
+ if (response?.ok) {
49
+ const blob = await response.blob()
50
+ const reader = new FileReader()
51
+ reader.onloadend = () => {
52
+ viewer = new Viewer({
53
+ domContainer: domViewer,
54
+ template: {
55
+ basePdf: reader.result,
56
+ schemas: _.get(props.options, 'schemas', defaultSchemas)
57
+ },
58
+ inputs: _.get(props.options, 'inputs', defaultInputs)
59
+ })
60
+ }
61
+ reader.readAsDataURL(blob)
62
+ }
63
+ }, { immediate: true })
64
+
65
+ // Hook
66
+ onMounted(() => {
67
+ domViewer = document.getElementById('viewer')
68
+ })
69
+ </script>
@@ -31,7 +31,7 @@
31
31
  @rejected="onFileRejected">
32
32
  <!-- Helper -->
33
33
  <template v-if="hasHelper" v-slot:append>
34
- <k-action
34
+ <KAction
35
35
  :id="properties.name + '-helper'"
36
36
  :label="helperLabel"
37
37
  :icon="helperIcon"
@@ -141,7 +141,7 @@ export default {
141
141
  let context = _.get(this.properties, 'field.storage.context')
142
142
  if (context) context = _.template(context)(Object.assign({}, { fileName: this.model.name }, object))
143
143
  const query = _.get(this.properties, 'field.storage.uploadQuery')
144
- logger.debug(`Uploading file ${this.model.name} with key ${this.model.key}`)
144
+ logger.debug(`[KDK] Uploading file ${this.model.name} with key ${this.model.key}`)
145
145
  Storage.upload({
146
146
  file: this.model.name,
147
147
  type: this.model.type,
@@ -109,7 +109,8 @@ export default {
109
109
  handler (opts) {
110
110
  if (_.isEmpty(this.filter) && opts.length === 1 && this.required) {
111
111
  this.$nextTick(() => {
112
- this.model = opts[0].value
112
+ this.fill(opts[0].value)
113
+ this.onChanged(opts[0].value)
113
114
  })
114
115
  }
115
116
  }
@@ -55,7 +55,9 @@ export default {
55
55
  mixins: [baseField],
56
56
  computed: {
57
57
  options () {
58
- const units = Units.getUnits(_.get(this.properties, 'field.quantity'))
58
+ let units = Units.getUnits(_.get(this.properties, 'field.quantity'))
59
+ const unitsFilter = _.get(this.properties, 'field.filter', [])
60
+ if (!_.isEmpty(unitsFilter)) units = _.filter(units, unit => _.includes(unitsFilter, unit.name))
59
61
  return units.map(unit => {
60
62
  // Check if we have a translation key or directly the label content
61
63
  const label = _.get(unit, 'label', '')
@@ -15,11 +15,13 @@
15
15
  <!-- Render a grid menu if the number of actions is higher than the expandable limit -->
16
16
  <q-menu v-if="actions.length > expandableLimit" v-model="isOpened" ref="menu" persistent fit anchor="top left" self="bottom right">
17
17
  <div class="q-pa-sm row" style="max-width: 50vw">
18
- <template v-for="action in actions" :key="action.uid">
18
+ <template v-for="action in actions" :key="action.id">
19
19
  <div class="col-12 col-sm-6 col-md-4 col-lg-3 col-xl-2">
20
20
  <KAction
21
+ color="primary"
21
22
  v-bind="action"
22
23
  renderer="item"
24
+ v-on="action.on ? { [action.on.event]: action.on.listener } : {}"
23
25
  @triggered="isOpened = false"
24
26
  />
25
27
  </div>
@@ -28,10 +30,12 @@
28
30
  </q-menu>
29
31
  <!-- Render an expandable list of actions -->
30
32
  <div v-else>
31
- <template v-for="action in actions" :key="action.uid">
33
+ <template v-for="action in actions" :key="action.id">
32
34
  <KAction
35
+ color="primary"
33
36
  v-bind="action"
34
37
  renderer="fab-action"
38
+ v-on="action.on ? { [action.on.event]: action.on.listener } : {}"
35
39
  :iconRight="actionsAlign === 'left' ? true : false"
36
40
  />
37
41
  </template>
@@ -41,9 +45,11 @@
41
45
  Render a non expandable fab if a single action is provided
42
46
  -->
43
47
  <KAction v-else-if="actions.length === 1"
48
+ color="primary"
44
49
  v-bind="actions[0]"
45
50
  size="1.15rem"
46
51
  renderer="fab"
52
+ v-on="actions[0].on ? { [actions[0].on.event]: actions[0].on.listener } : {}"
47
53
  />
48
54
  </div>
49
55
  </template>
@@ -51,7 +57,6 @@
51
57
  <script setup>
52
58
  import _ from 'lodash'
53
59
  import { ref, computed } from 'vue'
54
- import { uid } from 'quasar'
55
60
  import { Layout } from '../../layout'
56
61
  import KAction from '../action/KAction.vue'
57
62
 
@@ -86,8 +91,6 @@ const icon = computed(() => {
86
91
  return fab.icon || 'las la-ellipsis-v'
87
92
  })
88
93
  const actions = computed(() => {
89
- // let fabActions = fab.mode ? fab.content[fab.mode] : fab.content
90
- // if (!fabActions) return null
91
94
  const actions = []
92
95
  // Apply filtering
93
96
  _.forEach(fab.components, (action) => {
@@ -96,11 +99,7 @@ const actions = computed(() => {
96
99
  if (typeof isVisible === 'function') {
97
100
  isVisible = isVisible()
98
101
  }
99
- if (isVisible) {
100
- action.uid = uid()
101
- if (!action.color) action.color = 'primary'
102
- actions.push(action)
103
- }
102
+ if (isVisible) actions.push(action)
104
103
  })
105
104
  return actions
106
105
  })
@@ -1,13 +1,48 @@
1
1
  <template>
2
2
  <q-layout
3
- v-if="layout"
4
- v-bind="layout.options"
3
+ :view="layout.view"
5
4
  >
5
+ <!-- Left pane -->
6
+ <div v-if="hasLeftPaneComponents">
7
+ <q-page-sticky
8
+ v-if="leftPane.opener"
9
+ position="left"
10
+ :offset="[openerOffset, 0]"
11
+ class="k-left-pane-sticky"
12
+ >
13
+ <KOpener
14
+ id="left-opener"
15
+ v-model="isLeftPaneOpened"
16
+ position="left"
17
+ />
18
+ </q-page-sticky>
19
+ <q-drawer
20
+ id="left-pane"
21
+ v-model="isLeftPaneOpened"
22
+ :width="leftPaneSize"
23
+ side="left"
24
+ overlay
25
+ :behavior="$q.platform.is.mobile ? 'mobile' : 'desktop'"
26
+ no-swipe-open
27
+ no-swipe-close
28
+ no-swipe-backdrop
29
+ >
30
+ <q-scroll-area class="fit">
31
+ <KPanel
32
+ id="left-panel"
33
+ :content="leftPane.components"
34
+ :mode="leftPane.mode"
35
+ :filter="leftPane.filter"
36
+ />
37
+ </q-scroll-area>
38
+ </q-drawer>
39
+ </div>
6
40
  <!-- Header -->
7
41
  <q-header
8
- v-if="header.components"
42
+ v-if="hasHeaderComponents"
9
43
  v-model="isHeaderVisible"
10
44
  >
45
+ <q-resize-observer @resize="onHeaderResized" />
11
46
  <KPanel
12
47
  id="header-panel"
13
48
  :content="header.components"
@@ -17,9 +52,10 @@
17
52
  </q-header>
18
53
  <!-- Footer -->
19
54
  <q-footer
20
- v-if="footer.components"
55
+ v-if="hasFooterComponents"
21
56
  v-model="isFooterVisible"
22
57
  >
58
+ <q-resize-observer @resize="onFooterResized" />
23
59
  <KPanel
24
60
  id="footer-panel"
25
61
  :content="footer.components"
@@ -35,16 +71,24 @@
35
71
  </template>
36
72
 
37
73
  <script setup>
38
- import { computed } from 'vue'
74
+ import _ from 'lodash'
75
+ import { ref, computed, watch } from 'vue'
76
+ import { computeResponsiveWidth } from '../../utils'
39
77
  import { Layout } from '../../layout'
78
+ import KOpener from './KOpener.vue'
40
79
  import KPanel from '../KPanel.vue'
41
80
 
42
81
  // Data
43
82
  const layout = Layout.get()
83
+ const leftPane = Layout.getPane('left')
44
84
  const header = Layout.getHeader()
45
85
  const footer = Layout.getFooter()
86
+ const openerOffset = ref(0)
46
87
 
47
- // Compputed
88
+ // Computed
89
+ const hasHeaderComponents = computed(() => {
90
+ return !_.isEmpty(header.components)
91
+ })
48
92
  const isHeaderVisible = computed({
49
93
  get: function () {
50
94
  return header.visible
@@ -53,6 +97,9 @@ const isHeaderVisible = computed({
53
97
  Layout.setHeaderVisible(value)
54
98
  }
55
99
  })
100
+ const hasFooterComponents = computed(() => {
101
+ return !_.isEmpty(footer.components)
102
+ })
56
103
  const isFooterVisible = computed({
57
104
  get: function () {
58
105
  return footer.visible
@@ -61,4 +108,55 @@ const isFooterVisible = computed({
61
108
  Layout.setFooterVisible(value)
62
109
  }
63
110
  })
111
+ const hasLeftPaneComponents = computed(() => {
112
+ return !_.isEmpty(leftPane.components)
113
+ })
114
+ const leftPaneSize = computed(() => {
115
+ return computeResponsiveWidth(leftPane.sizes)
116
+ })
117
+ const isLeftPaneOpened = computed({
118
+ get: function () {
119
+ return leftPane.visible
120
+ },
121
+ set: function (value) {
122
+ Layout.setPaneVisible('left', value)
123
+ }
124
+ })
125
+
126
+ // Watch
127
+ watch(() => leftPane.visible, (visible) => {
128
+ if (visible) {
129
+ setTimeout(() => {
130
+ openerOffset.value = leftPaneSize.value
131
+ document.addEventListener('click', clickOutsideLeftPanelListener, true)
132
+ }, 100)
133
+ } else {
134
+ document.removeEventListener('click', clickOutsideLeftPanelListener, true)
135
+ openerOffset.value = 0
136
+ }
137
+ }, { immediate: true })
138
+ watch(leftPaneSize, () => {
139
+ if (openerOffset.value > 0) openerOffset.value = leftPaneSize.value
140
+ })
141
+
142
+ // Functions
143
+ function clickOutsideLeftPanelListener (event) {
144
+ const leftPanelElement = document.getElementById('left-panel')
145
+ if (leftPanelElement && leftPanelElement.contains(event.target)) return
146
+ const leftOpenerElement = document.getElementById('left-opener')
147
+ if (leftOpenerElement && leftOpenerElement.contains(event.target)) return
148
+ Layout.setPaneVisible('left', false)
149
+ }
150
+ function onHeaderResized (size) {
151
+ Layout.setElementSize('header', [size.width, size.height])
152
+ }
153
+ function onFooterResized (size) {
154
+ Layout.setElementSize('footer', [size.width, size.height])
155
+ }
64
156
  </script>
157
+
158
+ <style lang="scss">
159
+ .k-left-pane-sticky {
160
+ z-index: v-bind('leftPane.zIndex');
161
+ }
162
+ </style>
@@ -20,7 +20,7 @@
20
20
  </template>
21
21
 
22
22
  <script setup>
23
- import { ref, computed } from 'vue'
23
+ import { ref } from 'vue'
24
24
  import { useQuasar } from 'quasar'
25
25
 
26
26
  // Props
@@ -47,27 +47,22 @@ const hasTouch = $q.platform.has.touch
47
47
  const isHovered = ref(false)
48
48
  const icon = ref(null)
49
49
 
50
- // Computed
51
- const isOpened = computed(() => {
52
- return props.modelValue
53
- })
54
-
55
50
  // Functions
56
51
  function onMouseOver () {
57
52
  if (hasTouch) return
58
53
  isHovered.value = true
59
54
  switch (props.position) {
60
55
  case 'left':
61
- icon.value = isOpened.value ? 'las la-angle-left' : 'las la-angle-right'
56
+ icon.value = props.modelValue ? 'las la-angle-left' : 'las la-angle-right'
62
57
  break
63
58
  case 'right':
64
- icon.value = isOpened.value ? 'las la-angle-right' : 'las la-angle-left'
59
+ icon.value = props.modelValue ? 'las la-angle-right' : 'las la-angle-left'
65
60
  break
66
61
  case 'top':
67
- icon.value = isOpened.value ? 'las la-angle-up' : 'las la-angle-down'
62
+ icon.value = props.modelValue ? 'las la-angle-up' : 'las la-angle-down'
68
63
  break
69
64
  default: // bottom
70
- icon.value = isOpened.value ? 'las la-angle-down' : 'las la-angle-up'
65
+ icon.value = props.modelValue ? 'las la-angle-down' : 'las la-angle-up'
71
66
  }
72
67
  }
73
68
  function onMouseLeave () {
@@ -79,24 +74,24 @@ function onSwipe ({ evt, ...info }) {
79
74
  if (!info && !info.direction) return
80
75
  switch (props.position) {
81
76
  case 'left':
82
- if (info.direction === 'left' && isOpened.value) onClick()
83
- if (info.direction === 'right' && !isOpened.value) onClick()
77
+ if (info.direction === 'left' && props.modelValue) onClick()
78
+ if (info.direction === 'right' && !props.modelValue) onClick()
84
79
  break
85
80
  case 'right':
86
- if (info.direction === 'left' && !isOpened.value) onClick()
87
- if (info.direction === 'right' && isOpened.value) onClick()
81
+ if (info.direction === 'left' && !props.modelValue) onClick()
82
+ if (info.direction === 'right' && props.modelValue) onClick()
88
83
  break
89
84
  case 'top':
90
- if (info.direction === 'up' && isOpened.value) onClick()
91
- if (info.direction === 'down' && !isOpened.value) onClick()
85
+ if (info.direction === 'up' && props.modelValue) onClick()
86
+ if (info.direction === 'down' && !props.modelValue) onClick()
92
87
  break
93
88
  default: // bottom
94
- if (info.direction === 'up' && !isOpened.value) onClick()
95
- if (info.direction === 'down' && isOpened.value) onClick()
89
+ if (info.direction === 'up' && !props.modelValue) onClick()
90
+ if (info.direction === 'down' && props.modelValue) onClick()
96
91
  }
97
92
  }
98
93
  function onClick () {
99
- emit('update:modelValue', !isOpened.value)
94
+ emit('update:modelValue', !props.modelValue)
100
95
  }
101
96
  </script>
102
97