@panoramax/web-viewer 4.0.3-develop-3cfb244a → 4.0.3-develop-e6749fd4
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.
- package/CHANGELOG.md +0 -5
- package/build/index.css +1 -1
- package/build/index.css.map +1 -1
- package/build/index.js +73 -60
- package/build/index.js.map +1 -1
- package/docs/reference/components/ui/widgets/PictureLegendActions.md +32 -0
- package/docs/reference.md +1 -0
- package/mkdocs.yml +1 -0
- package/package.json +1 -1
- package/src/components/core/Basic.css +1 -1
- package/src/components/menus/PictureLegend.js +21 -8
- package/src/components/menus/Share.js +2 -51
- package/src/components/styles.js +1 -1
- package/src/components/ui/widgets/PictureLegendActions.js +99 -0
- package/src/components/ui/widgets/index.js +1 -0
- package/src/translations/en.json +0 -1
- package/src/translations/eo.json +20 -1
- package/src/translations/fr.json +0 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.widgets.PictureLegendActions"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.widgets.PictureLegendActions ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui.widgets</code>
|
|
5
|
+
**Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
6
|
+
**Element**: pnx-picture-legend-actions
|
|
7
|
+
|
|
8
|
+
* [.PictureLegendActions](#Panoramax.components.ui.widgets.PictureLegendActions) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
9
|
+
* [new PictureLegendActions()](#new_Panoramax.components.ui.widgets.PictureLegendActions_new)
|
|
10
|
+
* [.properties](#Panoramax.components.ui.widgets.PictureLegendActions+properties) : <code>Object</code>
|
|
11
|
+
|
|
12
|
+
<a name="new_Panoramax.components.ui.widgets.PictureLegendActions_new"></a>
|
|
13
|
+
|
|
14
|
+
### new PictureLegendActions()
|
|
15
|
+
Picture Legend Actions is a menu showing up complementary actions for picture legend.
|
|
16
|
+
|
|
17
|
+
**Example**
|
|
18
|
+
```html
|
|
19
|
+
<pnx-picture-legend-actions _parent=${viewer} />
|
|
20
|
+
```
|
|
21
|
+
<a name="Panoramax.components.ui.widgets.PictureLegendActions+properties"></a>
|
|
22
|
+
|
|
23
|
+
### pictureLegendActions.properties : <code>Object</code>
|
|
24
|
+
Component properties.
|
|
25
|
+
|
|
26
|
+
**Kind**: instance property of [<code>PictureLegendActions</code>](#Panoramax.components.ui.widgets.PictureLegendActions)
|
|
27
|
+
**Properties**
|
|
28
|
+
|
|
29
|
+
| Name | Type | Default | Description |
|
|
30
|
+
| --- | --- | --- | --- |
|
|
31
|
+
| [full] | <code>boolean</code> | <code>false</code> | Show advanced actions |
|
|
32
|
+
|
package/docs/reference.md
CHANGED
|
@@ -71,6 +71,7 @@ More complex UI components (but not menus):
|
|
|
71
71
|
- [MapFiltersButton](./reference/components/ui/widgets/MapFiltersButton.md) : a togglable map filters button & menu.
|
|
72
72
|
- [MapLayersButton](./reference/components/ui/widgets/MapLayersButton.md) : a togglable map layers button & menu.
|
|
73
73
|
- [OSMEditors](./reference/components/ui/widgets/OSMEditors.md) : shortcuts for OpenStreetMap editing tools.
|
|
74
|
+
- [PictureLegendActions](./reference/components/ui/widgets/PictureLegendActions.md) : various actions from picture legend.
|
|
74
75
|
- [Player](./reference/components/ui/widgets/Player.md) : the previous/next/play/pause toolbar.
|
|
75
76
|
- [Zoom](./reference/components/ui/widgets/Zoom.md) : the +/- zoom toolbar.
|
|
76
77
|
|
package/mkdocs.yml
CHANGED
|
@@ -84,6 +84,7 @@ nav:
|
|
|
84
84
|
- MapFiltersButton: 'reference/components/ui/widgets/MapFiltersButton.md'
|
|
85
85
|
- MapLayersButton: 'reference/components/ui/widgets/MapLayersButton.md'
|
|
86
86
|
- OSMEditors: 'reference/components/ui/widgets/OSMEditors.md'
|
|
87
|
+
- PictureLegendActions: 'reference/components/ui/widgets/PictureLegendActions.md'
|
|
87
88
|
- Player: 'reference/components/ui/widgets/Player.md'
|
|
88
89
|
- Zoom: 'reference/components/ui/widgets/Zoom.md'
|
|
89
90
|
- Button: 'reference/components/ui/Button.md'
|
package/package.json
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
--widget-font: var(--grey-dark);
|
|
35
35
|
--widget-font-active: var(--white);
|
|
36
36
|
--widget-font-direct: var(--blue);
|
|
37
|
-
--widget-font-warn: #
|
|
37
|
+
--widget-font-warn: #BF360C;
|
|
38
38
|
--font-family: "Atkinson Hyperlegible Next", sans-serif;
|
|
39
39
|
overscroll-behavior-y: contain;
|
|
40
40
|
}
|
|
@@ -47,6 +47,11 @@ export default class PictureLegend extends LitElement {
|
|
|
47
47
|
justify-content: space-between;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
.headline-buttons {
|
|
51
|
+
display: flex;
|
|
52
|
+
gap: 5px;
|
|
53
|
+
}
|
|
54
|
+
|
|
50
55
|
/* Address line */
|
|
51
56
|
#pic-legend-addr {
|
|
52
57
|
line-height: 1.2em;
|
|
@@ -211,14 +216,22 @@ export default class PictureLegend extends LitElement {
|
|
|
211
216
|
${this._addr?.length > 0 ? this._addr : html`<span class="pnx-placeholder-loading"> </span>`}
|
|
212
217
|
</div>
|
|
213
218
|
|
|
214
|
-
<
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
219
|
+
<div class="headline-buttons">
|
|
220
|
+
<pnx-button
|
|
221
|
+
size="sm"
|
|
222
|
+
class=${hiddenExpanded}
|
|
223
|
+
title=${this._parent?._t.pnx.share}
|
|
224
|
+
@click=${() => this._parent._showShareOptions()}
|
|
225
|
+
>
|
|
226
|
+
${fa(faShareNodes)}
|
|
227
|
+
</pnx-button>
|
|
228
|
+
|
|
229
|
+
<pnx-picture-legend-actions
|
|
230
|
+
@click=${e => e.stopPropagation()}
|
|
231
|
+
._parent=${this._parent}
|
|
232
|
+
?full=${this._expanded}
|
|
233
|
+
></pnx-picture-legend-actions>
|
|
234
|
+
</div>
|
|
222
235
|
</div>
|
|
223
236
|
|
|
224
237
|
<div id="pic-legend-info" class=${hiddenExpanded}>
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { LitElement, css, html
|
|
1
|
+
import { LitElement, css, html } from "lit";
|
|
2
2
|
import { fa } from "../../utils/widgets";
|
|
3
3
|
import { faSvg, textarea, titles, input } from "../styles";
|
|
4
4
|
import { faMap } from "@fortawesome/free-solid-svg-icons/faMap";
|
|
5
5
|
import { faCircleInfo } from "@fortawesome/free-solid-svg-icons/faCircleInfo";
|
|
6
6
|
import { faShareAlt } from "@fortawesome/free-solid-svg-icons/faShareAlt";
|
|
7
7
|
import { faLink } from "@fortawesome/free-solid-svg-icons/faLink";
|
|
8
|
-
import { faFileDownload } from "@fortawesome/free-solid-svg-icons/faFileDownload";
|
|
9
|
-
import { faPrint } from "@fortawesome/free-solid-svg-icons/faPrint";
|
|
10
|
-
import { faRssSquare } from "@fortawesome/free-solid-svg-icons/faRssSquare";
|
|
11
8
|
|
|
12
9
|
/**
|
|
13
10
|
* Share Menu displays links for quick picture sharing.
|
|
@@ -28,16 +25,6 @@ export default class ShareMenu extends LitElement {
|
|
|
28
25
|
.links {
|
|
29
26
|
display: flex;
|
|
30
27
|
gap: 5px;
|
|
31
|
-
align-items: center;
|
|
32
|
-
margin-bottom: 10px;
|
|
33
|
-
}
|
|
34
|
-
.cta-links {
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-wrap: nowrap;
|
|
37
|
-
gap: 5px;
|
|
38
|
-
}
|
|
39
|
-
.cta-links pnx-link-button {
|
|
40
|
-
flex: 1;
|
|
41
28
|
}
|
|
42
29
|
.embed {
|
|
43
30
|
display: flex;
|
|
@@ -50,7 +37,6 @@ export default class ShareMenu extends LitElement {
|
|
|
50
37
|
/** @private */
|
|
51
38
|
static properties = {
|
|
52
39
|
_url: {state: true},
|
|
53
|
-
_meta: { state: true },
|
|
54
40
|
};
|
|
55
41
|
|
|
56
42
|
constructor() {
|
|
@@ -64,11 +50,6 @@ export default class ShareMenu extends LitElement {
|
|
|
64
50
|
this._parent?.onceReady().then(() => {
|
|
65
51
|
this._onUrlChange();
|
|
66
52
|
this._parent.urlHandler.addEventListener("url-changed", this._onUrlChange.bind(this));
|
|
67
|
-
|
|
68
|
-
this._meta = this._parent.psv.getPictureMetadata();
|
|
69
|
-
this._parent.psv.addEventListener("picture-loaded", () => {
|
|
70
|
-
this._meta = this._parent.psv.getPictureMetadata();
|
|
71
|
-
});
|
|
72
53
|
});
|
|
73
54
|
}
|
|
74
55
|
|
|
@@ -78,12 +59,6 @@ export default class ShareMenu extends LitElement {
|
|
|
78
59
|
this._url = this._parent?.urlHandler?.nextShortLink(baseUrl) || baseUrl;
|
|
79
60
|
}
|
|
80
61
|
|
|
81
|
-
/** @private */
|
|
82
|
-
_onPrint() {
|
|
83
|
-
this._parent?.setPopup(false);
|
|
84
|
-
window.print();
|
|
85
|
-
}
|
|
86
|
-
|
|
87
62
|
/** @private */
|
|
88
63
|
render() {
|
|
89
64
|
const iframe = `<iframe src="${this._url}" style="border: none; width: 500px; height: 300px"></iframe>`;
|
|
@@ -91,36 +66,12 @@ export default class ShareMenu extends LitElement {
|
|
|
91
66
|
return html`
|
|
92
67
|
<h4>${fa(faShareAlt)} ${this._parent?._t.pnx.share}</h4>
|
|
93
68
|
<pnx-tabs>
|
|
94
|
-
<h4 slot="title">${fa(faLink)} ${this._parent?._t.pnx.
|
|
69
|
+
<h4 slot="title">${fa(faLink)} ${this._parent?._t.pnx.share_page}</h4>
|
|
95
70
|
<div slot="content">
|
|
96
71
|
<div class="links">
|
|
97
|
-
<div>${this._parent?._t.pnx.share_page}</div>
|
|
98
72
|
<input type="text" readonly value=${this._url} style="flex: 2" />
|
|
99
73
|
<pnx-copy-button ._t=${this._parent?._t} text=${this._url}></pnx-copy-button>
|
|
100
74
|
</div>
|
|
101
|
-
<div class="cta-links">
|
|
102
|
-
<pnx-link-button
|
|
103
|
-
download
|
|
104
|
-
target="_blank"
|
|
105
|
-
href=${this._meta?.panorama?.hdUrl}
|
|
106
|
-
@click=${this._closeGroup}
|
|
107
|
-
>${fa(faFileDownload)} ${this._parent?._t.pnx.share_image}</pnx-link-button>
|
|
108
|
-
|
|
109
|
-
${this._parent.isWidthSmall() ? nothing : html`<pnx-link-button @click=${this._onPrint}>
|
|
110
|
-
${fa(faPrint)} ${this._parent?._t.pnx.share_print}
|
|
111
|
-
</pnx-link-button>`}
|
|
112
|
-
|
|
113
|
-
${this._parent?.api?.getRSSURL() && html`
|
|
114
|
-
<pnx-link-button
|
|
115
|
-
target="_blank"
|
|
116
|
-
href=${this._parent?.api.getRSSURL(this._parent?.map?.getBounds?.())}
|
|
117
|
-
title=${this._parent?._t.pnx.share_rss_title}
|
|
118
|
-
@click=${this._closeGroup}
|
|
119
|
-
>
|
|
120
|
-
${fa(faRssSquare)} ${this._parent?._t.pnx.share_rss}
|
|
121
|
-
</pnx-link-button>
|
|
122
|
-
`}
|
|
123
|
-
</div>
|
|
124
75
|
</div>
|
|
125
76
|
|
|
126
77
|
<h4 slot="title">${fa(faMap)} ${this._parent?._t.pnx.share_embed}</h4>
|
package/src/components/styles.js
CHANGED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { LitElement, html, nothing, css } from "lit";
|
|
2
|
+
import { fa } from "../../../utils/widgets";
|
|
3
|
+
import { faEllipsisV } from "@fortawesome/free-solid-svg-icons/faEllipsisV";
|
|
4
|
+
import { noprint } from "../../styles";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Picture Legend Actions is a menu showing up complementary actions for picture legend.
|
|
8
|
+
* @class Panoramax.components.ui.widgets.PictureLegendActions
|
|
9
|
+
* @element pnx-picture-legend-actions
|
|
10
|
+
* @extends [lit.LitElement](https://lit.dev/docs/api/LitElement/)
|
|
11
|
+
* @example
|
|
12
|
+
* ```html
|
|
13
|
+
* <pnx-picture-legend-actions _parent=${viewer} />
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export default class PictureLegendActions extends LitElement {
|
|
17
|
+
/** @private */
|
|
18
|
+
static styles = [ noprint, css`
|
|
19
|
+
pnx-togglable-group::part(menu) {
|
|
20
|
+
border-radius: 5px;
|
|
21
|
+
min-width: unset;
|
|
22
|
+
}
|
|
23
|
+
`];
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Component properties.
|
|
27
|
+
* @memberof Panoramax.components.ui.widgets.PictureLegendActions#
|
|
28
|
+
* @type {Object}
|
|
29
|
+
* @property {boolean} [full=false] Show advanced actions
|
|
30
|
+
*/
|
|
31
|
+
static properties = {
|
|
32
|
+
full: { type: Boolean },
|
|
33
|
+
_meta: { state: true },
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
constructor() {
|
|
37
|
+
super();
|
|
38
|
+
this.full = false;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** @private */
|
|
42
|
+
connectedCallback() {
|
|
43
|
+
super.connectedCallback();
|
|
44
|
+
|
|
45
|
+
this._parent?.onceReady().then(() => {
|
|
46
|
+
this._meta = this._parent.psv.getPictureMetadata();
|
|
47
|
+
this._parent.psv.addEventListener("picture-loaded", () => {
|
|
48
|
+
this._meta = this._parent.psv.getPictureMetadata();
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** @private */
|
|
54
|
+
_onPrint() {
|
|
55
|
+
this._closeGroup();
|
|
56
|
+
window.print();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** @private */
|
|
60
|
+
_closeGroup() {
|
|
61
|
+
this.renderRoot.querySelector("#pic-legend-headline-menu").close();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** @private */
|
|
65
|
+
render() {
|
|
66
|
+
return html`<pnx-togglable-group padded="false" id="pic-legend-headline-menu" ._parent=${this._parent}>
|
|
67
|
+
<pnx-button slot="button" kind="inline">${fa(faEllipsisV)}</pnx-button>
|
|
68
|
+
<pnx-list-group class="pnx-print-hidden" @click=${this._closeMenu}>
|
|
69
|
+
${this._meta ? html`<pnx-copy-button ._t=${this._parent?._t} text=${this._meta.id} unstyled>
|
|
70
|
+
${this._parent?._t.pnx.metadata_general_copy_picid}
|
|
71
|
+
</pnx-copy-button>` : nothing}
|
|
72
|
+
|
|
73
|
+
<a
|
|
74
|
+
download
|
|
75
|
+
target="_blank"
|
|
76
|
+
href=${this._meta?.panorama?.hdUrl}
|
|
77
|
+
@click=${this._closeGroup}
|
|
78
|
+
>${this._parent?._t.pnx.share_image}</a>
|
|
79
|
+
|
|
80
|
+
${this._parent.isWidthSmall() ? nothing : html`<button @click=${this._onPrint}>
|
|
81
|
+
${this._parent?._t.pnx.share_print}
|
|
82
|
+
</button>`}
|
|
83
|
+
|
|
84
|
+
${this._parent?.api?.getRSSURL() && html`
|
|
85
|
+
<a
|
|
86
|
+
target="_blank"
|
|
87
|
+
href=${this._parent?.api.getRSSURL(this._parent?.map?.getBounds?.())}
|
|
88
|
+
title=${this._parent?._t.pnx.share_rss_title}
|
|
89
|
+
@click=${this._closeGroup}
|
|
90
|
+
>
|
|
91
|
+
${this._parent?._t.pnx.share_rss}
|
|
92
|
+
</a>
|
|
93
|
+
`}
|
|
94
|
+
</pnx-list-group>
|
|
95
|
+
</pnx-togglable-group>`;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
customElements.define("pnx-picture-legend-actions", PictureLegendActions);
|
|
@@ -9,5 +9,6 @@ export {default as Legend} from "./Legend";
|
|
|
9
9
|
export {default as MapFiltersButton} from "./MapFiltersButton";
|
|
10
10
|
export {default as MapLayersButton} from "./MapLayersButton";
|
|
11
11
|
export {default as OSMEditors} from "./OSMEditors";
|
|
12
|
+
export {default as PictureLegendActions} from "./PictureLegendActions";
|
|
12
13
|
export {default as Player} from "./Player";
|
|
13
14
|
export {default as Zoom} from "./Zoom";
|
package/src/translations/en.json
CHANGED
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
"share": "Share",
|
|
34
34
|
"share_links": "Links",
|
|
35
35
|
"share_page": "Link to this picture",
|
|
36
|
-
"share_picture": "Picture",
|
|
37
36
|
"share_image": "HD Image",
|
|
38
37
|
"share_rss": "RSS feed",
|
|
39
38
|
"share_rss_title": "RSS feed of new sequences in the currently visible map area",
|
package/src/translations/eo.json
CHANGED
|
@@ -199,7 +199,26 @@
|
|
|
199
199
|
"metadata_location_coordinates": "Koordinatoj (longitudo, latitudo)",
|
|
200
200
|
"metadata_location_copy": "Kopii {v}",
|
|
201
201
|
"metadata_location_copy_more": "Pli da ebloj por kopii koordinatojn",
|
|
202
|
-
"whats_panoramax": "Panoramax estas la geokomunaĵo por teritoriaj fotoj."
|
|
202
|
+
"whats_panoramax": "Panoramax estas la geokomunaĵo por teritoriaj fotoj.",
|
|
203
|
+
"semantics_features_subtitle": "{nb} asociitaj atributoj",
|
|
204
|
+
"semantics_tags_picture_none": "Ankoraŭ neniuj atributoj estas difinitaj por ĉi tiu foto.",
|
|
205
|
+
"semantics_hide_all_tags": "Maski la atributojn",
|
|
206
|
+
"semantics_key": "Ŝlosilo",
|
|
207
|
+
"semantics_value": "Valoro",
|
|
208
|
+
"semantics_show_all_tags": "Vidi ĉiujn atributojn",
|
|
209
|
+
"semantics_tags_picture": "Foto-atributoj",
|
|
210
|
+
"semantics_value_doc": "Lernu pli pri ĉi tiu atributo",
|
|
211
|
+
"semantics_qualifiers": "Kvalifikiloj",
|
|
212
|
+
"semantics_hide_annotations": "Maski bildajn komentojn",
|
|
213
|
+
"semantics_wikidata_properties": {
|
|
214
|
+
"P279": "subklaso de",
|
|
215
|
+
"P361": "parto de",
|
|
216
|
+
"P31": "instanco de"
|
|
217
|
+
},
|
|
218
|
+
"share_picture": "Foto",
|
|
219
|
+
"semantics_annotation_tooltip": "Alklaku por vidi la detalojn",
|
|
220
|
+
"semantics_show_annotations": "Montri bildajn komentojn",
|
|
221
|
+
"semantics_key_doc": "Lernu pli pri ĉi tiu ŝlosilo"
|
|
203
222
|
},
|
|
204
223
|
"maplibre": {
|
|
205
224
|
"GeolocateControl.FindMyLocation": "Trovi mian pozicion",
|
package/src/translations/fr.json
CHANGED
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
"search_address": "Rechercher une adresse, ville…",
|
|
32
32
|
"search_user": "Rechercher un nom d'utilisateur…",
|
|
33
33
|
"share": "Partager",
|
|
34
|
-
"share_picture": "Photo",
|
|
35
34
|
"share_links": "Liens utiles",
|
|
36
35
|
"share_page": "Lien de la photo",
|
|
37
36
|
"share_image": "Image HD",
|