@teipublisher/pb-components 2.11.1 → 2.12.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 +7 -0
- package/dist/demo/demos.json +1 -2
- package/dist/demo/pb-mei.html +3 -3
- package/dist/{iron-form-89b60473.js → iron-form-a25b58de.js} +1 -1
- package/dist/paper-checkbox-c9177e35.js +1596 -0
- package/dist/paper-icon-button-be4dc644.js +398 -0
- package/dist/paper-listbox-1fc346ac.js +1463 -0
- package/dist/pb-components-bundle.js +264 -402
- package/dist/pb-edit-app.js +1 -1
- package/dist/pb-elements.json +30 -3
- package/dist/pb-mei.js +139 -0
- package/dist/pb-odd-editor.js +1 -1
- package/dist/vaadin-element-mixin-660b2157.js +516 -0
- package/lib/web-midi-player/index.js +1 -0
- package/package.json +5 -3
- package/pb-elements.json +30 -3
- package/src/pb-components.js +0 -1
- package/src/pb-mei.js +67 -33
- package/dist/paper-checkbox-56ead3d4.js +0 -3069
- package/dist/vaadin-element-mixin-67c5648d.js +0 -913
- package/lib/openseadragon.min.js +0 -9
package/dist/pb-edit-app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./paper-checkbox-
|
|
1
|
+
import"./paper-checkbox-c9177e35.js";import"./paper-listbox-1fc346ac.js";import{p as e,L as t,w as p,h as o,c as i}from"./pb-mixin-d61c06b6.js";import{t as a}from"./pb-i18n-9000294c.js";import"./iron-form-a25b58de.js";class n extends(e(t)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{error:{type:String},url:{type:String},templates:{type:Array},odds:{type:Array}})}constructor(){super(),this.templates=[],this.odds=[]}connectedCallback(){super.connectedCallback()}firstUpdated(){const e=this.shadowRoot.getElementById("form"),t=this.shadowRoot.getElementById("defaultView"),o=this.shadowRoot.getElementById("index"),i=this.shadowRoot.getElementById("template");this.subscribeTo("pb-i18n-update",e=>{const t=this.shadowRoot.querySelector("#defaultView paper-listbox");let p=t.selected;t.selected=void 0,t.selected=p;const o=this.shadowRoot.querySelector("#index paper-listbox");p=o.selected,o.selected=void 0,o.selected=p},[]),p("pb-page-ready",e=>{let t;t=this.minApiVersion("1.0.0")?e.endpoint+"/api/templates":e.endpoint+"/modules/lib/components-list-templates.xql",fetch(t,{method:"GET",mode:"cors",credentials:"same-origin"}).then(e=>e.json()).then(e=>{this.templates=e}),t=this.minApiVersion("1.0.0")?e.endpoint+"/api/odd":e.endpoint+"/modules/lib/components-list-odds.xql",fetch(t,{method:"GET",mode:"cors",credentials:"same-origin"}).then(e=>e.json()).then(e=>{this.odds=e});const p=this.shadowRoot.querySelector("form");this.minApiVersion("1.0.0")?p.action=e.endpoint+"/api/apps/generate":p.action=e.endpoint+"/modules/components-generate.xql"}),e.addEventListener("iron-form-presubmit",(function(){const e=t.selectedItem.getAttribute("value");this.request.body["default-view"]=e,this.request.body.index=o.selectedItem.getAttribute("value"),this.request.body.template=i.selectedItem.getAttribute("value")})),e.addEventListener("iron-form-response",e=>{console.log(e),e.detail.completes.then(e=>{this.emitTo("pb-end-update");const t=e.parseResponse();if(console.log("<pb-edit-app> Received response: %o",t),t.target){const e=window.location.href.replace(/^(.*)\/tei-publisher\/.*/,"$1");this.url=e+"/"+this.shadowRoot.querySelector("paper-input[name=abbrev]").value,this.error=null}else this.error=t.description;this.shadowRoot.getElementById("dialog").open()})}),e.addEventListener("iron-form-error",e=>{this.emitTo("pb-end-update"),console.log("<pb-edit-app> Received response: %o",e.detail.request.response),this.error=e.detail.request.response.description,this.shadowRoot.getElementById("dialog").open()}),e.addEventListener("iron-form-invalid",()=>this.emitTo("pb-end-update"))}_doSubmit(){this.emitTo("pb-start-update");this.shadowRoot.getElementById("form").submit()}render(){return o`
|
|
2
2
|
<iron-form id="form">
|
|
3
3
|
<form method="POST" accept="application/json" enctype="application/json">
|
|
4
4
|
<fieldset>
|
package/dist/pb-elements.json
CHANGED
|
@@ -6808,11 +6808,16 @@
|
|
|
6808
6808
|
{
|
|
6809
6809
|
"name": "pb-mei",
|
|
6810
6810
|
"path": "./src/pb-mei.js",
|
|
6811
|
-
"description": "A viewer and player for MEI musical notation based on [Verovio](https://www.verovio.org/).\nSupports optional MIDI playback using [web-midi-player](https://midi.yvesgurcan.com/).\nBoth libraries are loaded dynamically when the component is used the first time.\n\nViewing options to be selected by the user can be defined via nested `pb-option` elements:\n\n```html\n<pb-mei id=\"viewer\" player url=\"http://www.marenzio.org/mei/M-06-5/M_06_5_01_S_io_parto_i_moro_e_pur_partir_conviene.mei\" \n footer=\"none\">\n <pb-option name=\"appXPath\" on=\"./rdg[contains(@label, 'original')]\" off=\"\">Original Clefs</pb-option>\n
|
|
6811
|
+
"description": "A viewer and player for MEI musical notation based on [Verovio](https://www.verovio.org/).\nSupports optional MIDI playback using [web-midi-player](https://midi.yvesgurcan.com/).\nBoth libraries are loaded dynamically when the component is used the first time.\n\nViewing options to be selected by the user can be defined via nested `pb-option` elements:\n\n```html\n<pb-mei id=\"viewer\" player url=\"http://www.marenzio.org/mei/M-06-5/M_06_5_01_S_io_parto_i_moro_e_pur_partir_conviene.mei\" \n footer=\"none\">\n <pb-option name=\"appXPath\" on=\"./rdg[contains(@label, 'original')]\" off=\"\">Original Clefs</pb-option>\n</pb-mei>\n```\n\nThe MEI document to display can either be given directly in the `data` property or loaded from an URL\nspecified in `url`.",
|
|
6812
6812
|
"attributes": [
|
|
6813
|
+
{
|
|
6814
|
+
"name": "data",
|
|
6815
|
+
"description": "MEI data to display specified as a string. This should represent a complete\nMEI document.",
|
|
6816
|
+
"type": "string"
|
|
6817
|
+
},
|
|
6813
6818
|
{
|
|
6814
6819
|
"name": "url",
|
|
6815
|
-
"description": "URL of the MEI file to load.
|
|
6820
|
+
"description": "URL of the MEI file to load. Will be used if no `data` property is present. \nA relative URL would be resolved relative to the TEI Publisher endpoint.",
|
|
6816
6821
|
"type": "string"
|
|
6817
6822
|
},
|
|
6818
6823
|
{
|
|
@@ -6891,10 +6896,16 @@
|
|
|
6891
6896
|
}
|
|
6892
6897
|
],
|
|
6893
6898
|
"properties": [
|
|
6899
|
+
{
|
|
6900
|
+
"name": "data",
|
|
6901
|
+
"attribute": "data",
|
|
6902
|
+
"description": "MEI data to display specified as a string. This should represent a complete\nMEI document.",
|
|
6903
|
+
"type": "string"
|
|
6904
|
+
},
|
|
6894
6905
|
{
|
|
6895
6906
|
"name": "url",
|
|
6896
6907
|
"attribute": "url",
|
|
6897
|
-
"description": "URL of the MEI file to load.
|
|
6908
|
+
"description": "URL of the MEI file to load. Will be used if no `data` property is present. \nA relative URL would be resolved relative to the TEI Publisher endpoint.",
|
|
6898
6909
|
"type": "string"
|
|
6899
6910
|
},
|
|
6900
6911
|
{
|
|
@@ -6985,6 +6996,22 @@
|
|
|
6985
6996
|
"type": "boolean",
|
|
6986
6997
|
"default": "false"
|
|
6987
6998
|
}
|
|
6999
|
+
],
|
|
7000
|
+
"cssProperties": [
|
|
7001
|
+
{
|
|
7002
|
+
"name": "--pb-mei-min-width",
|
|
7003
|
+
"description": "minimal width"
|
|
7004
|
+
}
|
|
7005
|
+
],
|
|
7006
|
+
"cssParts": [
|
|
7007
|
+
{
|
|
7008
|
+
"name": "toolbar",
|
|
7009
|
+
"description": "toolbar with pagination and midi player controls"
|
|
7010
|
+
},
|
|
7011
|
+
{
|
|
7012
|
+
"name": "music",
|
|
7013
|
+
"description": "the music output area"
|
|
7014
|
+
}
|
|
6988
7015
|
]
|
|
6989
7016
|
},
|
|
6990
7017
|
{
|