@teipublisher/pb-components 2.10.6 → 2.11.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.
- package/CHANGELOG.md +14 -0
- package/dist/demo/pb-facsimile-2.html +1 -1
- package/dist/es-global-bridge-4240f389.js +5 -0
- package/dist/pb-components-bundle.js +119 -119
- package/dist/pb-elements.json +2 -13
- package/dist/pb-leaflet-map.js +1 -1
- package/dist/pb-odd-editor.js +60 -60
- package/i18n/common/de.json +3 -0
- package/i18n/common/en.json +3 -0
- package/package.json +8 -7
- package/pb-elements.json +2 -13
- package/src/pb-facsimile.js +4 -6
- package/src/pb-odd-editor.js +34 -4
- package/src/pb-view.js +6 -3
- package/dist/es-global-bridge-5c039c0b.js +0 -5
package/dist/pb-elements.json
CHANGED
|
@@ -4145,11 +4145,6 @@
|
|
|
4145
4145
|
"type": "number",
|
|
4146
4146
|
"default": "0.2"
|
|
4147
4147
|
},
|
|
4148
|
-
{
|
|
4149
|
-
"name": "src",
|
|
4150
|
-
"type": "string",
|
|
4151
|
-
"default": "\"\""
|
|
4152
|
-
},
|
|
4153
4148
|
{
|
|
4154
4149
|
"name": "prefix-url",
|
|
4155
4150
|
"description": "Path pointing to the location of openseadragon user interface images.",
|
|
@@ -4293,12 +4288,6 @@
|
|
|
4293
4288
|
"type": "number",
|
|
4294
4289
|
"default": "0.2"
|
|
4295
4290
|
},
|
|
4296
|
-
{
|
|
4297
|
-
"name": "src",
|
|
4298
|
-
"attribute": "src",
|
|
4299
|
-
"type": "string",
|
|
4300
|
-
"default": "\"\""
|
|
4301
|
-
},
|
|
4302
4291
|
{
|
|
4303
4292
|
"name": "prefixUrl",
|
|
4304
4293
|
"attribute": "prefix-url",
|
|
@@ -4357,8 +4346,8 @@
|
|
|
4357
4346
|
"description": "When received, resets the facsimile viewer"
|
|
4358
4347
|
},
|
|
4359
4348
|
{
|
|
4360
|
-
"name": "pb-
|
|
4361
|
-
"description": "
|
|
4349
|
+
"name": "pb-load-facsimile",
|
|
4350
|
+
"description": "When received, adds an image to the current image sequence. Emitted by \n`pb-facs-link`. The event detail should contain an object with the properties `url`, `order` and `element`,\nwhere `url` is the relative or absolute URL to the image, `order` is an integer specifying the position at which\nthe image should be inserted in the list, and `element` points to the `pb-facs-link` element triggering the event."
|
|
4362
4351
|
},
|
|
4363
4352
|
{
|
|
4364
4353
|
"name": "pb-show-annotation",
|
package/dist/pb-leaflet-map.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{L as t,p as e,r as i,h as s,c as a}from"./pb-mixin-d61c06b6.js";import"./es-global-bridge-
|
|
1
|
+
import{L as t,p as e,r as i,h as s,c as a}from"./pb-mixin-d61c06b6.js";import"./es-global-bridge-4240f389.js";const o=["type","url","label","base","show"];class r extends t{static get properties(){return{type:{type:String},url:{type:String},base:{type:Boolean},show:{type:Boolean},label:{type:String},attribution:{type:String},minZoom:{type:Number,attribute:"min-zoom"},maxZoom:{type:Number,attribute:"max-zoom"},zoomOffset:{type:Number,attribute:"zoom-offset"},opacity:{type:Number},tileSize:{type:Number},id:{type:String},accessToken:{type:String,attribute:"access-token"}}}constructor(){super(),this.type="tile",this.url=null}get options(){const t={};return Object.keys(r.properties).forEach(e=>{o.indexOf(e)<0&&this[e]&&(t[e]=this[e])}),console.log("<pb-leaflet-map-layer> Options: %o",t),t}async data(){return new Promise(t=>{fetch(this.url).then(t=>t.json()).then(e=>t(e))})}}function l(t,e){try{return t.split(/\s*,\s*/).map(t=>parseInt(t,10))}catch(e){return console.error("<pb-map-icon> Invalid size specified: "+t),null}}customElements.define("pb-map-layer",r);class n extends t{static get properties(){return{name:{type:String},iconUrl:{type:String,attribute:"icon-url"},iconSize:{type:Array,converter:l,attribute:"icon-size"},iconAnchor:{type:Array,converter:l,attribute:"icon-anchor"},shadowUrl:{type:String,attribute:"shadow-url"},shadowSize:{type:Array,converter:l,attribute:"shadow-size"},shadowAnchor:{type:Array,converter:l,attribute:"shadow-anchor"},popupAncor:{type:Array,converter:l,attribute:"popup-anchor"}}}constructor(){super(),this.name="default",this.type="image",this.iconUrl=null}get options(){const t={};return Object.keys(n.properties).forEach(e=>{this[e]&&(t[e]=this[e])}),console.log("<pb-map-icon> Options: %o",t),t}}customElements.define("pb-map-icon",n);class c extends(e(t)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{latitude:{type:Number},longitude:{type:Number},zoom:{type:Number},crs:{type:String},fitMarkers:{type:Boolean,attribute:"fit-markers"},cluster:{type:Boolean},disableClusteringAt:{type:Number,attribute:"disable-clustering-at"},noScroll:{type:Boolean,attribute:"no-scroll"},accessToken:{type:String,attribute:"access-token"},toggle:{type:Boolean},imagesPath:{type:String,attribute:"images-path"},cssPath:{type:String,attribute:"css-path"},_map:{type:Object}})}constructor(){super(),this.latitude=51.505,this.longitude=-.09,this.zoom=15,this.crs="EPSG3857",this.accessToken="",this.imagesPath="../images/leaflet/",this.cssPath="../css/leaflet",this.toggle=!1,this.noScroll=!1,this.disabled=!0,this.cluster=!1,this.fitMarkers=!1,this.disableClusteringAt=null,this._icons={}}connectedCallback(){super.connectedCallback(),this._layers=this.querySelectorAll("pb-map-layer"),this._markers=this.querySelectorAll("pb-map-icon"),this.subscribeTo("pb-update-map",t=>{this._markerLayer.clearLayers(),t.detail.forEach(t=>{const e=L.marker([t.latitude,t.longitude]);t.label&&e.bindTooltip(t.label),e.addEventListener("click",()=>{this.emitTo("pb-leaflet-marker-click",t)}),e.bindTooltip(t.label),this.setMarkerIcon(e),this._markerLayer.addLayer(e)}),this._fitBounds()}),this.subscribeTo("pb-update",t=>{this._markerLayer.clearLayers();t.detail.root.querySelectorAll("pb-geolocation").forEach(t=>{const e=L.latLng(t.latitude,t.longitude),i=L.marker(e).addTo(this._markerLayer);t.label&&i.bindTooltip(t.label),t.popup&&i.bindPopup(t.popup),i.addEventListener("click",()=>{this.emitTo("pb-leaflet-marker-click",t)}),this.setMarkerIcon(i)}),this._fitBounds()}),this.subscribeTo("pb-geolocation",t=>{if(t.detail.coordinates){if(this.latitude=t.detail.coordinates.latitude,this.longitude=t.detail.coordinates.longitude,this._hasMarker(this.latitude,this.longitude))console.log("<pb-leaflet-map> Marker already added to map");else{const e=L.marker([this.latitude,this.longitude]);e.addEventListener("click",()=>{this.emitTo("pb-leaflet-marker-click",t.detail.element)}),t.detail.label&&e.bindTooltip(t.detail.label),t.detail.popup&&e.bindPopup(t.detail.popup),this.setMarkerIcon(e),e.addTo(this._markerLayer),t.detail.fitBounds&&this._fitBounds(),console.log("<pb-leaflet-map> added marker")}this.toggle&&(this.disabled=!1);const e=t.detail.event;this._locationChanged(this.latitude,this.longitude,t.detail.zoom,e)}})}get map(){return this._map}setMarkerIcon(t){this._icons&&this._icons.default&&t.setIcon(this._icons.default)}firstUpdated(){this.toggle||(this.disabled=!1),window.ESGlobalBridge.requestAvailability();const t=i("../lib/leaflet-src.js"),e=i("../lib/leaflet.markercluster-src.js");window.ESGlobalBridge.instance.load("leaflet",t).then(()=>window.ESGlobalBridge.instance.load("plugin",e)),window.addEventListener("es-bridge-plugin-loaded",this._initMap.bind(this),{once:!0})}render(){const t=i(this.cssPath);return s`
|
|
2
2
|
<link rel="Stylesheet" href="${t}/leaflet.css">
|
|
3
3
|
<link rel="Stylesheet" href="${t}/MarkerCluster.Default.css">
|
|
4
4
|
<div id="map" style="height: 100%; width: 100%"></div>
|