@panoramax/web-viewer 3.2.3-develop-f219e404 → 3.2.3-develop-6257391e

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 (221) hide show
  1. package/.gitlab-ci.yml +3 -0
  2. package/CHANGELOG.md +19 -0
  3. package/CODE_OF_CONDUCT.md +1 -1
  4. package/README.md +1 -1
  5. package/build/editor.html +10 -1
  6. package/build/index.css +2 -2
  7. package/build/index.css.map +1 -1
  8. package/build/index.html +1 -1
  9. package/build/index.js +1682 -5
  10. package/build/index.js.map +1 -1
  11. package/build/map.html +1 -1
  12. package/build/viewer.html +10 -1
  13. package/build/widgets.html +1 -0
  14. package/config/jest/mocks.js +172 -0
  15. package/config/paths.js +1 -0
  16. package/config/webpack.config.js +26 -0
  17. package/docs/03_URL_settings.md +3 -11
  18. package/docs/05_Compatibility.md +59 -76
  19. package/docs/09_Develop.md +30 -11
  20. package/docs/90_Releases.md +2 -2
  21. package/docs/images/class_diagram.drawio +28 -28
  22. package/docs/images/class_diagram.jpg +0 -0
  23. package/docs/index.md +112 -0
  24. package/docs/reference/components/core/Basic.md +153 -0
  25. package/docs/reference/components/core/CoverageMap.md +160 -0
  26. package/docs/reference/components/core/Editor.md +172 -0
  27. package/docs/reference/components/core/Viewer.md +288 -0
  28. package/docs/reference/components/layout/CorneredGrid.md +29 -0
  29. package/docs/reference/components/layout/Mini.md +45 -0
  30. package/docs/reference/components/menus/MapBackground.md +32 -0
  31. package/docs/reference/components/menus/MapFilters.md +15 -0
  32. package/docs/reference/components/menus/MapLayers.md +15 -0
  33. package/docs/reference/components/menus/MapLegend.md +15 -0
  34. package/docs/reference/components/menus/PictureLegend.md +15 -0
  35. package/docs/reference/components/menus/PictureMetadata.md +15 -0
  36. package/docs/reference/components/menus/PlayerOptions.md +15 -0
  37. package/docs/reference/components/menus/QualityScoreDoc.md +15 -0
  38. package/docs/reference/components/menus/ReportForm.md +15 -0
  39. package/docs/reference/components/menus/ShareMenu.md +15 -0
  40. package/docs/reference/components/ui/Button.md +39 -0
  41. package/docs/reference/components/ui/ButtonGroup.md +36 -0
  42. package/docs/reference/components/ui/CopyButton.md +35 -0
  43. package/docs/reference/components/ui/Grade.md +32 -0
  44. package/docs/reference/components/ui/LinkButton.md +44 -0
  45. package/docs/reference/components/ui/Loader.md +54 -0
  46. package/docs/reference/components/ui/Map.md +214 -0
  47. package/docs/reference/components/ui/MapMore.md +233 -0
  48. package/docs/reference/components/ui/Photo.md +369 -0
  49. package/docs/reference/components/ui/Popup.md +56 -0
  50. package/docs/reference/components/ui/QualityScore.md +45 -0
  51. package/docs/reference/components/ui/SearchBar.md +63 -0
  52. package/docs/reference/components/ui/TogglableGroup.md +39 -0
  53. package/docs/reference/components/ui/widgets/GeoSearch.md +32 -0
  54. package/docs/reference/components/ui/widgets/Legend.md +32 -0
  55. package/docs/reference/components/ui/widgets/MapFiltersButton.md +33 -0
  56. package/docs/reference/components/ui/widgets/MapLayersButton.md +15 -0
  57. package/docs/reference/components/ui/widgets/Player.md +32 -0
  58. package/docs/reference/components/ui/widgets/Share.md +15 -0
  59. package/docs/reference/components/ui/widgets/Zoom.md +15 -0
  60. package/docs/reference/utils/API.md +311 -0
  61. package/docs/reference/utils/InitParameters.md +67 -0
  62. package/docs/reference/utils/URLHandler.md +102 -0
  63. package/docs/reference.md +73 -0
  64. package/docs/shortcuts.md +11 -0
  65. package/docs/tutorials/aerial_imagery.md +19 -0
  66. package/docs/tutorials/authentication.md +10 -0
  67. package/docs/tutorials/custom_widgets.md +64 -0
  68. package/docs/tutorials/map_style.md +27 -0
  69. package/docs/tutorials/migrate_v4.md +122 -0
  70. package/docs/tutorials/synced_coverage.md +42 -0
  71. package/mkdocs.yml +60 -5
  72. package/package.json +10 -7
  73. package/public/editor.html +21 -29
  74. package/public/index.html +3 -3
  75. package/public/map.html +19 -18
  76. package/public/viewer.html +18 -24
  77. package/public/widgets.html +265 -0
  78. package/scripts/doc.js +77 -0
  79. package/src/components/core/Basic.css +44 -0
  80. package/src/components/core/Basic.js +258 -0
  81. package/src/components/core/CoverageMap.css +9 -0
  82. package/src/components/core/CoverageMap.js +105 -0
  83. package/src/components/core/Editor.css +23 -0
  84. package/src/components/core/Editor.js +354 -0
  85. package/src/components/core/Viewer.css +109 -0
  86. package/src/components/core/Viewer.js +707 -0
  87. package/src/components/core/index.js +11 -0
  88. package/src/components/index.js +13 -0
  89. package/src/components/layout/CorneredGrid.js +109 -0
  90. package/src/components/layout/Mini.js +117 -0
  91. package/src/components/layout/index.js +7 -0
  92. package/src/components/menus/MapBackground.js +106 -0
  93. package/src/components/menus/MapFilters.js +386 -0
  94. package/src/components/menus/MapLayers.js +143 -0
  95. package/src/components/menus/MapLegend.js +54 -0
  96. package/src/components/menus/PictureLegend.js +103 -0
  97. package/src/components/menus/PictureMetadata.js +188 -0
  98. package/src/components/menus/PlayerOptions.js +96 -0
  99. package/src/components/menus/QualityScoreDoc.js +36 -0
  100. package/src/components/menus/ReportForm.js +133 -0
  101. package/src/components/menus/Share.js +228 -0
  102. package/src/components/menus/index.js +15 -0
  103. package/src/components/styles.js +365 -0
  104. package/src/components/ui/Button.js +75 -0
  105. package/src/components/ui/ButtonGroup.css +49 -0
  106. package/src/components/ui/ButtonGroup.js +68 -0
  107. package/src/components/ui/CopyButton.js +71 -0
  108. package/src/components/ui/Grade.js +54 -0
  109. package/src/components/ui/LinkButton.js +68 -0
  110. package/src/components/ui/Loader.js +188 -0
  111. package/src/components/{Map.css → ui/Map.css} +5 -17
  112. package/src/components/{Map.js → ui/Map.js} +114 -138
  113. package/src/components/ui/MapMore.js +324 -0
  114. package/src/components/{Photo.css → ui/Photo.css} +6 -6
  115. package/src/components/{Photo.js → ui/Photo.js} +279 -90
  116. package/src/components/ui/Popup.js +145 -0
  117. package/src/components/ui/QualityScore.js +152 -0
  118. package/src/components/ui/SearchBar.js +363 -0
  119. package/src/components/ui/TogglableGroup.js +162 -0
  120. package/src/components/ui/index.js +20 -0
  121. package/src/components/ui/widgets/GeoSearch.css +21 -0
  122. package/src/components/ui/widgets/GeoSearch.js +139 -0
  123. package/src/components/ui/widgets/Legend.js +51 -0
  124. package/src/components/ui/widgets/MapFiltersButton.js +104 -0
  125. package/src/components/ui/widgets/MapLayersButton.js +79 -0
  126. package/src/components/ui/widgets/Player.css +7 -0
  127. package/src/components/ui/widgets/Player.js +148 -0
  128. package/src/components/ui/widgets/Share.js +30 -0
  129. package/src/components/ui/widgets/Zoom.js +82 -0
  130. package/src/components/ui/widgets/index.js +12 -0
  131. package/src/img/panoramax.svg +13 -0
  132. package/src/img/switch_big.svg +20 -10
  133. package/src/index.js +6 -9
  134. package/src/translations/da.json +1 -1
  135. package/src/translations/de.json +1 -1
  136. package/src/translations/en.json +5 -3
  137. package/src/translations/eo.json +1 -1
  138. package/src/translations/es.json +1 -1
  139. package/src/translations/fr.json +5 -3
  140. package/src/translations/hu.json +1 -1
  141. package/src/translations/it.json +1 -1
  142. package/src/translations/ja.json +1 -1
  143. package/src/translations/nl.json +1 -1
  144. package/src/translations/pl.json +1 -1
  145. package/src/translations/sv.json +33 -3
  146. package/src/translations/zh_Hant.json +1 -1
  147. package/src/utils/API.js +74 -42
  148. package/src/utils/InitParameters.js +354 -0
  149. package/src/utils/URLHandler.js +364 -0
  150. package/src/utils/geocoder.js +116 -0
  151. package/src/utils/{I18n.js → i18n.js} +3 -1
  152. package/src/utils/index.js +11 -0
  153. package/src/utils/{Map.js → map.js} +216 -80
  154. package/src/utils/picture.js +433 -0
  155. package/src/utils/utils.js +315 -0
  156. package/src/utils/widgets.js +93 -0
  157. package/tests/components/ui/CopyButton.test.js +52 -0
  158. package/tests/components/ui/Loader.test.js +54 -0
  159. package/tests/components/{Map.test.js → ui/Map.test.js} +19 -61
  160. package/tests/components/{Photo.test.js → ui/Photo.test.js} +89 -57
  161. package/tests/components/ui/Popup.test.js +24 -0
  162. package/tests/components/ui/QualityScore.test.js +17 -0
  163. package/tests/components/ui/SearchBar.test.js +107 -0
  164. package/tests/components/ui/__snapshots__/CopyButton.test.js.snap +34 -0
  165. package/tests/components/ui/__snapshots__/Loader.test.js.snap +56 -0
  166. package/tests/components/{__snapshots__ → ui/__snapshots__}/Map.test.js.snap +11 -38
  167. package/tests/components/{__snapshots__ → ui/__snapshots__}/Photo.test.js.snap +57 -4
  168. package/tests/components/ui/__snapshots__/Popup.test.js.snap +29 -0
  169. package/tests/components/ui/__snapshots__/QualityScore.test.js.snap +11 -0
  170. package/tests/components/ui/__snapshots__/SearchBar.test.js.snap +65 -0
  171. package/tests/utils/API.test.js +1 -14
  172. package/tests/utils/InitParameters.test.js +485 -0
  173. package/tests/utils/URLHandler.test.js +350 -0
  174. package/tests/utils/__snapshots__/URLHandler.test.js.snap +21 -0
  175. package/tests/utils/__snapshots__/picture.test.js.snap +315 -0
  176. package/tests/utils/__snapshots__/widgets.test.js.snap +19 -0
  177. package/tests/utils/geocoder.test.js +37 -0
  178. package/tests/utils/{I18n.test.js → i18n.test.js} +1 -1
  179. package/tests/utils/map.test.js +67 -0
  180. package/tests/utils/picture.test.js +745 -0
  181. package/tests/utils/utils.test.js +288 -0
  182. package/tests/utils/widgets.test.js +90 -0
  183. package/docs/01_Start.md +0 -149
  184. package/docs/02_Usage.md +0 -831
  185. package/docs/04_Advanced_examples.md +0 -216
  186. package/src/Editor.css +0 -37
  187. package/src/Editor.js +0 -361
  188. package/src/StandaloneMap.js +0 -114
  189. package/src/Viewer.css +0 -203
  190. package/src/Viewer.js +0 -1246
  191. package/src/components/CoreView.css +0 -70
  192. package/src/components/CoreView.js +0 -175
  193. package/src/components/Loader.css +0 -74
  194. package/src/components/Loader.js +0 -120
  195. package/src/utils/Exif.js +0 -193
  196. package/src/utils/Utils.js +0 -631
  197. package/src/utils/Widgets.js +0 -562
  198. package/src/viewer/URLHash.js +0 -469
  199. package/src/viewer/Widgets.css +0 -880
  200. package/src/viewer/Widgets.js +0 -1470
  201. package/tests/Editor.test.js +0 -126
  202. package/tests/StandaloneMap.test.js +0 -45
  203. package/tests/Viewer.test.js +0 -366
  204. package/tests/__snapshots__/Editor.test.js.snap +0 -298
  205. package/tests/__snapshots__/StandaloneMap.test.js.snap +0 -30
  206. package/tests/__snapshots__/Viewer.test.js.snap +0 -195
  207. package/tests/components/CoreView.test.js +0 -92
  208. package/tests/components/Loader.test.js +0 -38
  209. package/tests/components/__snapshots__/Loader.test.js.snap +0 -15
  210. package/tests/utils/Exif.test.js +0 -124
  211. package/tests/utils/Map.test.js +0 -113
  212. package/tests/utils/Utils.test.js +0 -300
  213. package/tests/utils/Widgets.test.js +0 -107
  214. package/tests/utils/__snapshots__/Exif.test.js.snap +0 -43
  215. package/tests/utils/__snapshots__/Utils.test.js.snap +0 -41
  216. package/tests/utils/__snapshots__/Widgets.test.js.snap +0 -44
  217. package/tests/viewer/URLHash.test.js +0 -559
  218. package/tests/viewer/Widgets.test.js +0 -127
  219. package/tests/viewer/__snapshots__/URLHash.test.js.snap +0 -108
  220. package/tests/viewer/__snapshots__/Widgets.test.js.snap +0 -403
  221. /package/tests/utils/__snapshots__/{Map.test.js.snap → geocoder.test.js.snap} +0 -0
@@ -0,0 +1,15 @@
1
+ <a name="Panoramax.components.menus.PlayerOptions"></a>
2
+
3
+ ## Panoramax.components.menus.PlayerOptions ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
4
+ **Kind**: static class of <code>Panoramax.components.menus</code>
5
+ **Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
6
+ **Element**: pnx-player-options
7
+ <a name="new_Panoramax.components.menus.PlayerOptions_new"></a>
8
+
9
+ ### new PlayerOptions()
10
+ Player Options menu displays player speed and contrast settings.
11
+
12
+ **Example**
13
+ ```html
14
+ <pnx-player-options ._parent=${viewer} />
15
+ ```
@@ -0,0 +1,15 @@
1
+ <a name="Panoramax.components.menus.QualityScoreDoc"></a>
2
+
3
+ ## Panoramax.components.menus.QualityScoreDoc ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
4
+ **Kind**: static class of <code>Panoramax.components.menus</code>
5
+ **Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
6
+ **Element**: pnx-quality-score-doc
7
+ <a name="new_Panoramax.components.menus.QualityScoreDoc_new"></a>
8
+
9
+ ### new QualityScoreDoc()
10
+ Quality Score Doc displays a synthetic summary of how Quality Score is computed.
11
+
12
+ **Example**
13
+ ```html
14
+ <pnx-quality-score-doc ._t=${viewer._t} />
15
+ ```
@@ -0,0 +1,15 @@
1
+ <a name="Panoramax.components.menus.ReportForm"></a>
2
+
3
+ ## Panoramax.components.menus.ReportForm ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
4
+ **Kind**: static class of <code>Panoramax.components.menus</code>
5
+ **Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
6
+ **Element**: pnx-report-form
7
+ <a name="new_Panoramax.components.menus.ReportForm_new"></a>
8
+
9
+ ### new ReportForm()
10
+ Report Form displays a form to send issues about pictures.
11
+
12
+ **Example**
13
+ ```html
14
+ <pnx-report-form ._parent=${viewer} />
15
+ ```
@@ -0,0 +1,15 @@
1
+ <a name="Panoramax.components.menus.ShareMenu"></a>
2
+
3
+ ## Panoramax.components.menus.ShareMenu ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
4
+ **Kind**: static class of <code>Panoramax.components.menus</code>
5
+ **Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
6
+ **Element**: pnx-share-menu
7
+ <a name="new_Panoramax.components.menus.ShareMenu_new"></a>
8
+
9
+ ### new ShareMenu()
10
+ Share Menu displays links for quick picture sharing.
11
+
12
+ **Example**
13
+ ```html
14
+ <pnx-share-menu ._parent=${viewer} />
15
+ ```
@@ -0,0 +1,39 @@
1
+ <a name="Panoramax.components.ui.Button"></a>
2
+
3
+ ## Panoramax.components.ui.Button ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
4
+ **Kind**: static class of <code>Panoramax.components.ui</code>
5
+ **Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
6
+ **Element**: pnx-button
7
+
8
+ * [.Button](#Panoramax.components.ui.Button) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
9
+ * [new Button()](#new_Panoramax.components.ui.Button_new)
10
+ * [.properties](#Panoramax.components.ui.Button+properties) : <code>Object</code>
11
+
12
+ <a name="new_Panoramax.components.ui.Button_new"></a>
13
+
14
+ ### new Button()
15
+ Button element displays a direct action button.
16
+ Binds to a HTML button, so you can use any events offered by it.
17
+
18
+ **Example**
19
+ ```html
20
+ <pnx-button kind="flat" size="l" @click=${() => alert("click!")}>
21
+ Click on me
22
+ </pnx-button>
23
+ ```
24
+ <a name="Panoramax.components.ui.Button+properties"></a>
25
+
26
+ ### button.properties : <code>Object</code>
27
+ Component properties.
28
+
29
+ **Kind**: instance property of [<code>Button</code>](#Panoramax.components.ui.Button)
30
+ **Properties**
31
+
32
+ | Name | Type | Default | Description |
33
+ | --- | --- | --- | --- |
34
+ | [active] | <code>boolean</code> | <code>false</code> | Whether the button is in an active state. |
35
+ | [kind] | <code>string</code> | <code>&quot;full&quot;</code> | The style variation of the button (full, outline, flat, superflat) |
36
+ | [size] | <code>string</code> | <code>&quot;md&quot;</code> | The size of the button (md, l, xl, xxl) |
37
+ | [disabled] | <code>boolean</code> | <code>false</code> | Whether the button is disabled. |
38
+ | [type] | <code>string</code> | | The button type (e.g., 'submit'). |
39
+
@@ -0,0 +1,36 @@
1
+ <a name="Panoramax.components.ui.ButtonGroup"></a>
2
+
3
+ ## Panoramax.components.ui.ButtonGroup ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
4
+ **Kind**: static class of <code>Panoramax.components.ui</code>
5
+ **Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
6
+ **Element**: pnx-button-group
7
+
8
+ * [.ButtonGroup](#Panoramax.components.ui.ButtonGroup) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
9
+ * [new ButtonGroup()](#new_Panoramax.components.ui.ButtonGroup_new)
10
+ * [.properties](#Panoramax.components.ui.ButtonGroup+properties) : <code>Object</code>
11
+
12
+ <a name="new_Panoramax.components.ui.ButtonGroup_new"></a>
13
+
14
+ ### new ButtonGroup()
15
+ Button Group element allows to merge many button in a single bar.
16
+
17
+ **Example**
18
+ ```html
19
+ <pnx-button-group id="pnx-widget-player" dir="row" size="xl" class="pnx-print-hidden">
20
+ <pnx-button>B1</pnx-button>
21
+ <pnx-button>B2</pnx-button>
22
+ </pnx-button-group>
23
+ ```
24
+ <a name="Panoramax.components.ui.ButtonGroup+properties"></a>
25
+
26
+ ### buttonGroup.properties : <code>Object</code>
27
+ Component properties.
28
+
29
+ **Kind**: instance property of [<code>ButtonGroup</code>](#Panoramax.components.ui.ButtonGroup)
30
+ **Properties**
31
+
32
+ | Name | Type | Description |
33
+ | --- | --- | --- |
34
+ | [dir] | <code>string</code> | Group direction (row, column) |
35
+ | [size] | <code>string</code> | Group size (md, xl) |
36
+
@@ -0,0 +1,35 @@
1
+ <a name="Panoramax.components.ui.CopyButton"></a>
2
+
3
+ ## Panoramax.components.ui.CopyButton ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
4
+ **Kind**: static class of <code>Panoramax.components.ui</code>
5
+ **Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
6
+ **Element**: pnx-copy-button
7
+
8
+ * [.CopyButton](#Panoramax.components.ui.CopyButton) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
9
+ * [new CopyButton()](#new_Panoramax.components.ui.CopyButton_new)
10
+ * [.properties](#Panoramax.components.ui.CopyButton+properties) : <code>Object</code>
11
+
12
+ <a name="new_Panoramax.components.ui.CopyButton_new"></a>
13
+
14
+ ### new CopyButton()
15
+ Copy Button element allows top copy in clipboard some text.
16
+
17
+ **Example**
18
+ ```html
19
+ <pnx-copy-button text="content to copy" ._t=${viewer._t}>
20
+ Copy me !
21
+ </pnx-copy-button>
22
+ ```
23
+ <a name="Panoramax.components.ui.CopyButton+properties"></a>
24
+
25
+ ### copyButton.properties : <code>Object</code>
26
+ Component properties.
27
+
28
+ **Kind**: instance property of [<code>CopyButton</code>](#Panoramax.components.ui.CopyButton)
29
+ **Properties**
30
+
31
+ | Name | Type | Description |
32
+ | --- | --- | --- |
33
+ | [text] | <code>string</code> | Text to copy in clipboard on click (use either this parameter or input, not both) |
34
+ | [input] | <code>input</code> | ID of a HTML input field to copy content from in clipboard (use either this parameter or text, not both) |
35
+
@@ -0,0 +1,32 @@
1
+ <a name="Panoramax.components.ui.Grade"></a>
2
+
3
+ ## Panoramax.components.ui.Grade ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
4
+ **Kind**: static class of <code>Panoramax.components.ui</code>
5
+ **Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
6
+ **Element**: pnx-grade
7
+
8
+ * [.Grade](#Panoramax.components.ui.Grade) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
9
+ * [new Grade()](#new_Panoramax.components.ui.Grade_new)
10
+ * [.properties](#Panoramax.components.ui.Grade+properties) : <code>Object</code>
11
+
12
+ <a name="new_Panoramax.components.ui.Grade_new"></a>
13
+
14
+ ### new Grade()
15
+ Grade element displays a 5-star rating.
16
+
17
+ **Example**
18
+ ```html
19
+ <pnx-grade stars="5" .t=${viewer._t} />
20
+ ```
21
+ <a name="Panoramax.components.ui.Grade+properties"></a>
22
+
23
+ ### grade.properties : <code>Object</code>
24
+ Component properties.
25
+
26
+ **Kind**: instance property of [<code>Grade</code>](#Panoramax.components.ui.Grade)
27
+ **Properties**
28
+
29
+ | Name | Type | Default | Description |
30
+ | --- | --- | --- | --- |
31
+ | [stars] | <code>number</code> | <code>0</code> | 1 to 5 grade (or 0 for unknown value) |
32
+
@@ -0,0 +1,44 @@
1
+ <a name="Panoramax.components.ui.LinkButton"></a>
2
+
3
+ ## Panoramax.components.ui.LinkButton ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
4
+ **Kind**: static class of <code>Panoramax.components.ui</code>
5
+ **Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
6
+ **Element**: pnx-link-button
7
+
8
+ * [.LinkButton](#Panoramax.components.ui.LinkButton) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
9
+ * [new LinkButton()](#new_Panoramax.components.ui.LinkButton_new)
10
+ * [.properties](#Panoramax.components.ui.LinkButton+properties) : <code>Object</code>
11
+
12
+ <a name="new_Panoramax.components.ui.LinkButton_new"></a>
13
+
14
+ ### new LinkButton()
15
+ Link Button element displays a HTML `<a>` anchor with a button style.
16
+
17
+ **Example**
18
+ ```html
19
+ <pnx-link-button
20
+ title="Redirect to other website"
21
+ kind="outline"
22
+ href="https://panoramax.fr"
23
+ target="_blank"
24
+ >
25
+ Click to go on Panoramax
26
+ </pnx-link-button>
27
+ ```
28
+ <a name="Panoramax.components.ui.LinkButton+properties"></a>
29
+
30
+ ### linkButton.properties : <code>Object</code>
31
+ Component properties.
32
+
33
+ **Kind**: instance property of [<code>LinkButton</code>](#Panoramax.components.ui.LinkButton)
34
+ **Properties**
35
+
36
+ | Name | Type | Default | Description |
37
+ | --- | --- | --- | --- |
38
+ | [href] | <code>string</code> | | The URL the button should navigate to when clicked |
39
+ | [target] | <code>string</code> | | Specifies where to open the linked document (e.g., '_blank') |
40
+ | [title] | <code>string</code> | | Tooltip text displayed when hovering over the button |
41
+ | [download] | <code>string</code> | | Indicates if the linked resource should be downloaded |
42
+ | [class] | <code>string</code> | | Custom CSS class for additional styling |
43
+ | [kind] | <code>string</code> | <code>&quot;full&quot;</code> | The style variation of the button (full, outline, flat, superflat) |
44
+
@@ -0,0 +1,54 @@
1
+ <a name="Panoramax.components.ui.Loader"></a>
2
+
3
+ ## Panoramax.components.ui.Loader ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
4
+ **Kind**: static class of <code>Panoramax.components.ui</code>
5
+ **Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
6
+ **Element**: pnx-loader
7
+
8
+ * [.Loader](#Panoramax.components.ui.Loader) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
9
+ * [new Loader()](#new_Panoramax.components.ui.Loader_new)
10
+ * [.properties](#Panoramax.components.ui.Loader+properties) : <code>Object</code>
11
+ * [.isVisible()](#Panoramax.components.ui.Loader+isVisible) ⇒ <code>boolean</code>
12
+ * [.dismiss([err], [errMeaningful], [next])](#Panoramax.components.ui.Loader+dismiss)
13
+
14
+ <a name="new_Panoramax.components.ui.Loader_new"></a>
15
+
16
+ ### new Loader()
17
+ Loader component display a full page covering for user waiting.
18
+
19
+ **Example**
20
+ ```html
21
+ <pnx-loader ._parent=${this.viewer} />
22
+ ```
23
+ <a name="Panoramax.components.ui.Loader+properties"></a>
24
+
25
+ ### loader.properties : <code>Object</code>
26
+ Component properties.
27
+
28
+ **Kind**: instance property of [<code>Loader</code>](#Panoramax.components.ui.Loader)
29
+ **Properties**
30
+
31
+ | Name | Type | Default | Description |
32
+ | --- | --- | --- | --- |
33
+ | [visible] | <code>boolean</code> | <code>true</code> | Is the loader visible to user ? |
34
+
35
+ <a name="Panoramax.components.ui.Loader+isVisible"></a>
36
+
37
+ ### loader.isVisible() ⇒ <code>boolean</code>
38
+ Is the loader currently visible ?
39
+
40
+ **Kind**: instance method of [<code>Loader</code>](#Panoramax.components.ui.Loader)
41
+ **Returns**: <code>boolean</code> - True if visible
42
+ <a name="Panoramax.components.ui.Loader+dismiss"></a>
43
+
44
+ ### loader.dismiss([err], [errMeaningful], [next])
45
+ Dismiss loader, or show error
46
+
47
+ **Kind**: instance method of [<code>Loader</code>](#Panoramax.components.ui.Loader)
48
+
49
+ | Param | Type | Default | Description |
50
+ | --- | --- | --- | --- |
51
+ | [err] | <code>object</code> | <code></code> | Optional error object to show in browser console |
52
+ | [errMeaningful] | <code>str</code> | <code></code> | Optional error message to show to user |
53
+ | [next] | <code>fct</code> | <code></code> | Optional function to run after loader dismiss |
54
+
@@ -0,0 +1,214 @@
1
+ <a name="Panoramax.components.ui.Map"></a>
2
+
3
+ ## Panoramax.components.ui.Map ⇐ <code>[maplibregl.Map](https://maplibre.org/maplibre-gl-js/docs/API/classes/Map/)</code>
4
+ **Kind**: static class of <code>Panoramax.components.ui</code>
5
+ **Extends**: <code>[maplibregl.Map](https://maplibre.org/maplibre-gl-js/docs/API/classes/Map/)</code>
6
+ **Emits**: [<code>background-changed</code>](#Panoramax.components.ui.Map+event_background-changed), [<code>users-changed</code>](#Panoramax.components.ui.Map+event_users-changed), [<code>sequence-hover</code>](#Panoramax.components.ui.Map+event_sequence-hover), [<code>sequence-click</code>](#Panoramax.components.ui.Map+event_sequence-click), [<code>picture-click</code>](#Panoramax.components.ui.Map+event_picture-click)
7
+
8
+ * [.Map](#Panoramax.components.ui.Map) ⇐ <code>[maplibregl.Map](https://maplibre.org/maplibre-gl-js/docs/API/classes/Map/)</code>
9
+ * [new Map(parent, container, [options])](#new_Panoramax.components.ui.Map_new)
10
+ * [.destroy()](#Panoramax.components.ui.Map+destroy)
11
+ * [.waitForEnoughMapLoaded()](#Panoramax.components.ui.Map+waitForEnoughMapLoaded) ⇒ <code>Promise</code>
12
+ * [.reloadVectorTiles()](#Panoramax.components.ui.Map+reloadVectorTiles)
13
+ * [.hasTwoBackgrounds()](#Panoramax.components.ui.Map+hasTwoBackgrounds) ⇒ <code>boolean</code>
14
+ * [.getBackground()](#Panoramax.components.ui.Map+getBackground) ⇒ <code>string</code>
15
+ * [.setBackground(bg)](#Panoramax.components.ui.Map+setBackground)
16
+ * [.getVisibleUsers()](#Panoramax.components.ui.Map+getVisibleUsers) ⇒ <code>Array.&lt;string&gt;</code>
17
+ * [.setVisibleUsers(visibleIds)](#Panoramax.components.ui.Map+setVisibleUsers)
18
+ * [.filterUserLayersContent(dataType, filter)](#Panoramax.components.ui.Map+filterUserLayersContent)
19
+ * [.displayPictureMarker(lon, lat, heading, [skipCenter])](#Panoramax.components.ui.Map+displayPictureMarker)
20
+ * [.reloadLayersStyles()](#Panoramax.components.ui.Map+reloadLayersStyles)
21
+ * ["background-changed"](#Panoramax.components.ui.Map+event_background-changed)
22
+ * ["users-changed"](#Panoramax.components.ui.Map+event_users-changed)
23
+ * ["sequence-hover"](#Panoramax.components.ui.Map+event_sequence-hover)
24
+ * ["sequence-click"](#Panoramax.components.ui.Map+event_sequence-click)
25
+ * ["picture-click"](#Panoramax.components.ui.Map+event_picture-click)
26
+
27
+ <a name="new_Panoramax.components.ui.Map_new"></a>
28
+
29
+ ### new Map(parent, container, [options])
30
+ Map is the component showing pictures and sequences geolocation.
31
+
32
+ Note that all functions of [MapLibre GL JS class Map](https://maplibre.org/maplibre-gl-js/docs/API/classes/Map/) are also available.
33
+
34
+ A more complete version of Map (with filters & themes) is available through [MapMore class](MapMore.md/#Panoramax.components.ui.MapMore)
35
+
36
+ ⚠️ This class doesn't inherit from [EventTarget](https://developer.mozilla.org/fr/docs/Web/API/EventTarget), so it doesn't have `addEventListener` and `dispatchEvent` functions.
37
+ It uses instead [`on`](https://maplibre.org/maplibre-gl-js/docs/API/classes/Map/#on) and `fire` functions from MapLibre Map class.
38
+ `fire` function doesn't take directly [`Event`](https://developer.mozilla.org/fr/docs/Web/API/Event) objects, but a string and object data.
39
+
40
+
41
+ | Param | Type | Default | Description |
42
+ | --- | --- | --- | --- |
43
+ | parent | [<code>Basic</code>](../core/Basic.md/#Panoramax.components.core.Basic) | | The parent view |
44
+ | container | <code>Element</code> | | The DOM element to create into |
45
+ | [options] | <code>object</code> | | The map options (any of [MapLibre GL settings](https://maplibre.org/maplibre-gl-js-docs/api/map/#map-parameters) or any supplementary option defined here) |
46
+ | [options.raster] | <code>object</code> | | The MapLibre raster source for aerial background. This must be a JSON object following [MapLibre raster source definition](https://maplibre.org/maplibre-style-spec/sources/#raster). |
47
+ | [options.background] | <code>string</code> | <code>&quot;streets&quot;</code> | Choose default map background to display (streets or aerial, if raster aerial background available). Defaults to street. |
48
+
49
+ **Example**
50
+ ```js
51
+ const map = new Panoramax.components.ui.Map(viewer, mapNode, {center: {lat: 48.7, lng: -1.7}});
52
+ ```
53
+ <a name="Panoramax.components.ui.Map+destroy"></a>
54
+
55
+ ### map.destroy()
56
+ Destroy any form of life in this component
57
+
58
+ **Kind**: instance method of [<code>Map</code>](#Panoramax.components.ui.Map)
59
+ <a name="Panoramax.components.ui.Map+waitForEnoughMapLoaded"></a>
60
+
61
+ ### map.waitForEnoughMapLoaded() ⇒ <code>Promise</code>
62
+ Helper to know when enough map background and Panoramax tiles are loaded for a proper display.
63
+
64
+ **Kind**: instance method of [<code>Map</code>](#Panoramax.components.ui.Map)
65
+ **Returns**: <code>Promise</code> - Resolves when enough is loaded
66
+ <a name="Panoramax.components.ui.Map+reloadVectorTiles"></a>
67
+
68
+ ### map.reloadVectorTiles()
69
+ Force refresh of vector tiles data
70
+
71
+ **Kind**: instance method of [<code>Map</code>](#Panoramax.components.ui.Map)
72
+ <a name="Panoramax.components.ui.Map+hasTwoBackgrounds"></a>
73
+
74
+ ### map.hasTwoBackgrounds() ⇒ <code>boolean</code>
75
+ Check if map offers aerial imagery as well as streets rendering.
76
+
77
+ **Kind**: instance method of [<code>Map</code>](#Panoramax.components.ui.Map)
78
+ **Returns**: <code>boolean</code> - True if aerial imagery is available for display
79
+ <a name="Panoramax.components.ui.Map+getBackground"></a>
80
+
81
+ ### map.getBackground() ⇒ <code>string</code>
82
+ Get the currently selected map background
83
+
84
+ **Kind**: instance method of [<code>Map</code>](#Panoramax.components.ui.Map)
85
+ **Returns**: <code>string</code> - aerial or streets
86
+ <a name="Panoramax.components.ui.Map+setBackground"></a>
87
+
88
+ ### map.setBackground(bg)
89
+ Change the shown background in map.
90
+
91
+ **Kind**: instance method of [<code>Map</code>](#Panoramax.components.ui.Map)
92
+ **Throws**:
93
+
94
+ - <code>Error</code> If not aerial imagery is available
95
+
96
+
97
+ | Param | Type | Description |
98
+ | --- | --- | --- |
99
+ | bg | <code>string</code> | The new background to display (aerial or streets) |
100
+
101
+ <a name="Panoramax.components.ui.Map+getVisibleUsers"></a>
102
+
103
+ ### map.getVisibleUsers() ⇒ <code>Array.&lt;string&gt;</code>
104
+ Get the currently visible users
105
+
106
+ **Kind**: instance method of [<code>Map</code>](#Panoramax.components.ui.Map)
107
+ **Returns**: <code>Array.&lt;string&gt;</code> - List of visible users
108
+ <a name="Panoramax.components.ui.Map+setVisibleUsers"></a>
109
+
110
+ ### map.setVisibleUsers(visibleIds)
111
+ Make given user layers visible on map, and hide all others (if any)
112
+
113
+ **Kind**: instance method of [<code>Map</code>](#Panoramax.components.ui.Map)
114
+
115
+ | Param | Type | Description |
116
+ | --- | --- | --- |
117
+ | visibleIds | <code>string</code> \| <code>Array.&lt;string&gt;</code> | The user layers IDs to display |
118
+
119
+ <a name="Panoramax.components.ui.Map+filterUserLayersContent"></a>
120
+
121
+ ### map.filterUserLayersContent(dataType, filter)
122
+ Filter the visible data content in all visible map layers
123
+
124
+ **Kind**: instance method of [<code>Map</code>](#Panoramax.components.ui.Map)
125
+
126
+ | Param | Type | Description |
127
+ | --- | --- | --- |
128
+ | dataType | <code>string</code> | sequences or pictures |
129
+ | filter | <code>object</code> | The MapLibre GL filter rule to apply |
130
+
131
+ <a name="Panoramax.components.ui.Map+displayPictureMarker"></a>
132
+
133
+ ### map.displayPictureMarker(lon, lat, heading, [skipCenter])
134
+ Shows on map a picture position and heading.
135
+
136
+ **Kind**: instance method of [<code>Map</code>](#Panoramax.components.ui.Map)
137
+
138
+ | Param | Type | Default | Description |
139
+ | --- | --- | --- | --- |
140
+ | lon | <code>number</code> | | The longitude |
141
+ | lat | <code>number</code> | | The latitude |
142
+ | heading | <code>number</code> | | The heading |
143
+ | [skipCenter] | <code>boolean</code> | <code>false</code> | Set to true to avoid map centering on marker |
144
+
145
+ <a name="Panoramax.components.ui.Map+reloadLayersStyles"></a>
146
+
147
+ ### map.reloadLayersStyles()
148
+ Forces reload of pictures/sequences layer styles.
149
+ This is useful after a map theme change.
150
+
151
+ **Kind**: instance method of [<code>Map</code>](#Panoramax.components.ui.Map)
152
+ <a name="Panoramax.components.ui.Map+event_background-changed"></a>
153
+
154
+ ### "background-changed"
155
+ Event for map background changes
156
+
157
+ **Kind**: event emitted by [<code>Map</code>](#Panoramax.components.ui.Map)
158
+ **Properties**
159
+
160
+ | Name | Type | Description |
161
+ | --- | --- | --- |
162
+ | [background] | <code>string</code> | The new selected background (aerial, streets) |
163
+
164
+ <a name="Panoramax.components.ui.Map+event_users-changed"></a>
165
+
166
+ ### "users-changed"
167
+ Event for visible users changes
168
+
169
+ **Kind**: event emitted by [<code>Map</code>](#Panoramax.components.ui.Map)
170
+ **Properties**
171
+
172
+ | Name | Type | Description |
173
+ | --- | --- | --- |
174
+ | [usersIds] | <code>Array.&lt;string&gt;</code> | The list of newly selected users |
175
+
176
+ <a name="Panoramax.components.ui.Map+event_sequence-hover"></a>
177
+
178
+ ### "sequence-hover"
179
+ Event when a sequence on map is hovered (not selected)
180
+
181
+ **Kind**: event emitted by [<code>Map</code>](#Panoramax.components.ui.Map)
182
+ **Properties**
183
+
184
+ | Name | Type | Description |
185
+ | --- | --- | --- |
186
+ | seqId | <code>string</code> | The hovered sequence ID |
187
+
188
+ <a name="Panoramax.components.ui.Map+event_sequence-click"></a>
189
+
190
+ ### "sequence-click"
191
+ Event when a sequence on map is clicked
192
+
193
+ **Kind**: event emitted by [<code>Map</code>](#Panoramax.components.ui.Map)
194
+ **Properties**
195
+
196
+ | Name | Type | Description |
197
+ | --- | --- | --- |
198
+ | seqId | <code>string</code> | The clicked sequence ID |
199
+ | coordinates | <code>maplibregl.LngLat</code> | The coordinates of user click |
200
+
201
+ <a name="Panoramax.components.ui.Map+event_picture-click"></a>
202
+
203
+ ### "picture-click"
204
+ Event when a picture on map is clicked
205
+
206
+ **Kind**: event emitted by [<code>Map</code>](#Panoramax.components.ui.Map)
207
+ **Properties**
208
+
209
+ | Name | Type | Description |
210
+ | --- | --- | --- |
211
+ | picId | <code>string</code> | The clicked picture ID |
212
+ | seqId | <code>string</code> | The clicked picture's sequence ID |
213
+ | feature | <code>object</code> | The GeoJSON feature of the picture |
214
+