@teipublisher/pb-components 2.25.2 → 2.26.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 (38) hide show
  1. package/.github/workflows/main.yml +3 -3
  2. package/.github/workflows/node.js.yml +2 -2
  3. package/.github/workflows/release.js.yml +3 -2
  4. package/.releaserc.json +1 -1
  5. package/CHANGELOG.md +21 -0
  6. package/css/pb-styles.css +51 -0
  7. package/dist/demo/demos.json +3 -0
  8. package/dist/demo/pb-dialog.html +28 -0
  9. package/dist/demo/pb-i18n.html +29 -29
  10. package/dist/demo/pb-login.html +2 -0
  11. package/dist/{es-global-bridge-4240f389.js → es-global-bridge-d8ce175d.js} +1 -1
  12. package/dist/{iron-form-a25b58de.js → iron-form-7b5c5d03.js} +1 -1
  13. package/dist/jinn-codemirror-da0e2d1f.js +1 -0
  14. package/dist/{paper-checkbox-c9177e35.js → paper-checkbox-4f410b1f.js} +33 -32
  15. package/dist/{paper-icon-button-c15eb1cf.js → paper-icon-button-0fb125c4.js} +4 -4
  16. package/dist/{paper-listbox-1fc346ac.js → paper-listbox-5f42cff5.js} +1 -1
  17. package/dist/pb-code-editor.js +3 -3
  18. package/dist/pb-component-docs.js +19 -8
  19. package/dist/pb-components-bundle.js +145 -171
  20. package/dist/pb-edit-app.js +5 -5
  21. package/dist/pb-elements.json +137 -27
  22. package/dist/{pb-i18n-b62828ba.js → pb-i18n-0611135a.js} +1 -1
  23. package/dist/pb-leaflet-map.js +1 -1
  24. package/dist/pb-mei.js +6 -6
  25. package/dist/pb-odd-editor.js +32 -32
  26. package/dist/pb-tify.js +3 -3
  27. package/dist/{vaadin-element-mixin-96dff806.js → vaadin-element-mixin-859a0132.js} +38 -29
  28. package/package.json +5 -5
  29. package/pb-elements.json +137 -27
  30. package/src/assets/pb-styles.css +51 -0
  31. package/src/pb-dialog.js +78 -0
  32. package/src/pb-lang.js +18 -33
  33. package/src/pb-light-dom.js +40 -0
  34. package/src/pb-login.js +52 -76
  35. package/src/pb-navigation.js +15 -2
  36. package/src/pb-timeline.js +1 -1
  37. package/dist/jinn-codemirror-63cf45e9.js +0 -1
  38. /package/dist/{pb-mixin-e1183270.js → pb-mixin-b1caa22e.js} +0 -0
@@ -1,9 +1,9 @@
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-e1183270.js";import{t as a}from"./pb-i18n-b62828ba.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`
1
+ import{p as e,w as t,h as p,c as o,L as i}from"./pb-mixin-b1caa22e.js";import{t as a}from"./pb-i18n-0611135a.js";import"./paper-listbox-5f42cff5.js";import"./paper-checkbox-4f410b1f.js";import"./iron-form-7b5c5d03.js";class n extends(e(i)){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"),p=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},[]),t("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=p.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 p`
2
2
  <iron-form id="form">
3
3
  <form method="POST" accept="application/json" enctype="application/json">
4
4
  <fieldset>
5
5
  <legend>${a("document.selectODD")}</legend>
6
- ${this.odds.map(e=>o`<paper-checkbox name="odd" value="${e.name}">${e.label}</paper-checkbox>`)}
6
+ ${this.odds.map(e=>p`<paper-checkbox name="odd" value="${e.name}">${e.label}</paper-checkbox>`)}
7
7
  </fieldset>
8
8
  <paper-input name="uri" type="url" required placeholder="https://e-editiones.org/apps/my-simple-app"
9
9
  label="${a("appgen.uri")}" auto-validate></paper-input>
@@ -17,7 +17,7 @@ import"./paper-checkbox-c9177e35.js";import"./paper-listbox-1fc346ac.js";import{
17
17
  <legend>${a("appgen.template.help")}</legend>
18
18
  <paper-dropdown-menu id="template" label="${a("appgen.template.label")}" name="template">
19
19
  <paper-listbox slot="dropdown-content" class="dropdown-content" attr-for-selected="value" selected="view.html">
20
- ${this.templates.map(e=>o`<paper-item value="${e.name}">${e.title}</paper-item>`)}
20
+ ${this.templates.map(e=>p`<paper-item value="${e.name}">${e.title}</paper-item>`)}
21
21
  </paper-listbox>
22
22
  </paper-dropdown-menu>
23
23
  </fieldset>
@@ -52,7 +52,7 @@ import"./paper-checkbox-c9177e35.js";import"./paper-listbox-1fc346ac.js";import{
52
52
  <paper-dialog id="dialog">
53
53
  <h2>${a("appgen.dialog.title")}</h2>
54
54
  <div id="dialogContent">
55
- ${this.error?o`<div id="error">${this.error}</div>`:o`<a href="${this.url}" target="_blank">
55
+ ${this.error?p`<div id="error">${this.error}</div>`:p`<a href="${this.url}" target="_blank">
56
56
  <paper-button><iron-icon icon="icons:open-in-new"></iron-icon> ${a("appgen.open")}</paper-button>
57
57
  </a>
58
58
  <p>${a("appgen.success")}</p>`}
@@ -61,7 +61,7 @@ import"./paper-checkbox-c9177e35.js";import"./paper-listbox-1fc346ac.js";import{
61
61
  <paper-button dialog-dismiss autofocus>${a("dialogs.close")}</paper-button>
62
62
  </div>
63
63
  </paper-dialog>
64
- `}static get styles(){return i`
64
+ `}static get styles(){return o`
65
65
  :host {
66
66
  display: block;
67
67
  }
@@ -2585,7 +2585,7 @@
2585
2585
  {
2586
2586
  "name": "pb-collapse",
2587
2587
  "path": "./src/pb-collapse.js",
2588
- "description": "A collapsible block: in collapsed state it only shows a header and expands if clicked.\nThe header should go into slot `collapse-trigger`, the content into `collapse-content`.\nExample:\n\n```html\n<pb-collapse>\n <div slot=\"collapse-trigger\">\n Metadata\n </div>\n <pb-view slot=\"collapse-content\" src=\"document1\" subscribe=\"transcription\" xpath=\"//teiHeader\"></pb-view>\n</pb-collapse>\n```\n\nBy adding a CSS 'icon-right' to a `pb-collapse` the icon can be placed on the right side\n```\n<pb-collapse class='icon-right'>\n```",
2588
+ "description": "A collapsible block: in collapsed state it only shows a header and expands if clicked.\nThe header should go into slot `collapse-trigger`, the content into `collapse-content`.\nExample:\n\n```html\n<pb-collapse>\n <div slot=\"collapse-trigger\">\n Metadata\n </div>\n <pb-view slot=\"collapse-content\" src=\"document1\" subscribe=\"transcription\" xpath=\"//teiHeader\"></pb-view>\n</pb-collapse>\n```\n\nBy adding a CSS 'icon-right' to a `pb-collapse` the icon can be placed on the right side\n```\n<pb-collapse class='icon-right'>\n```",
2589
2589
  "attributes": [
2590
2590
  {
2591
2591
  "name": "horizontal",
@@ -2780,7 +2780,7 @@
2780
2780
  "attributes": [
2781
2781
  {
2782
2782
  "name": "source",
2783
- "description": "A remote data source to use. The component will pass the text entered by the user\nin parameter `query`. It expects a JSON array of objects with each object describing\none item:\n\n```json\n{\n \"text\": \"Text to show as label\",\n \"value\": \"value-to-use\"\n}\n```",
2783
+ "description": "A remote data source to use. The component will pass the text entered by the user\nin parameter `query`. It expects a JSON array of objects with each object describing\none item:\n\n```json\n{\n \"text\": \"Text to show as label\",\n \"value\": \"value-to-use\"\n}\n```",
2784
2784
  "type": "string"
2785
2785
  },
2786
2786
  {
@@ -2863,7 +2863,7 @@
2863
2863
  {
2864
2864
  "name": "source",
2865
2865
  "attribute": "source",
2866
- "description": "A remote data source to use. The component will pass the text entered by the user\nin parameter `query`. It expects a JSON array of objects with each object describing\none item:\n\n```json\n{\n \"text\": \"Text to show as label\",\n \"value\": \"value-to-use\"\n}\n```",
2866
+ "description": "A remote data source to use. The component will pass the text entered by the user\nin parameter `query`. It expects a JSON array of objects with each object describing\none item:\n\n```json\n{\n \"text\": \"Text to show as label\",\n \"value\": \"value-to-use\"\n}\n```",
2867
2867
  "type": "string"
2868
2868
  },
2869
2869
  {
@@ -3254,6 +3254,125 @@
3254
3254
  }
3255
3255
  ]
3256
3256
  },
3257
+ {
3258
+ "name": "pb-dialog",
3259
+ "path": "./src/pb-dialog.js",
3260
+ "description": "A simple dialog component using the HTML5 <dialog> element (no shadow DOM).",
3261
+ "attributes": [
3262
+ {
3263
+ "name": "open",
3264
+ "type": "boolean",
3265
+ "default": "false"
3266
+ },
3267
+ {
3268
+ "name": "modal",
3269
+ "type": "boolean",
3270
+ "default": "true"
3271
+ },
3272
+ {
3273
+ "name": "subscribe",
3274
+ "description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
3275
+ "type": "string"
3276
+ },
3277
+ {
3278
+ "name": "subscribe-config",
3279
+ "description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to listen to.",
3280
+ "type": "object"
3281
+ },
3282
+ {
3283
+ "name": "emit",
3284
+ "description": "The name of the channel to send events to.",
3285
+ "type": "string"
3286
+ },
3287
+ {
3288
+ "name": "emit-config",
3289
+ "description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to be dispatched.",
3290
+ "type": "object"
3291
+ },
3292
+ {
3293
+ "name": "wait-for",
3294
+ "description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.",
3295
+ "type": "string"
3296
+ },
3297
+ {
3298
+ "name": "disabled",
3299
+ "description": "Common property to disable the functionality associated with a component.\n`pb-highlight` and `pb-popover` react to this.",
3300
+ "type": "boolean",
3301
+ "default": "false"
3302
+ }
3303
+ ],
3304
+ "properties": [
3305
+ {
3306
+ "name": "open",
3307
+ "attribute": "open",
3308
+ "type": "boolean",
3309
+ "default": "false"
3310
+ },
3311
+ {
3312
+ "name": "modal",
3313
+ "attribute": "modal",
3314
+ "type": "boolean",
3315
+ "default": "true"
3316
+ },
3317
+ {
3318
+ "name": "subscribe",
3319
+ "attribute": "subscribe",
3320
+ "description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
3321
+ "type": "string"
3322
+ },
3323
+ {
3324
+ "name": "subscribeConfig",
3325
+ "attribute": "subscribe-config",
3326
+ "description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to listen to.",
3327
+ "type": "object"
3328
+ },
3329
+ {
3330
+ "name": "emit",
3331
+ "attribute": "emit",
3332
+ "description": "The name of the channel to send events to.",
3333
+ "type": "string"
3334
+ },
3335
+ {
3336
+ "name": "emitConfig",
3337
+ "attribute": "emit-config",
3338
+ "description": "Configuration object to define a channel/event mapping. Every property\nin the object is interpreted as the name of a channel and its value should\nbe an array of event names to be dispatched.",
3339
+ "type": "object"
3340
+ },
3341
+ {
3342
+ "name": "waitFor",
3343
+ "attribute": "wait-for",
3344
+ "description": "A selector pointing to other components this component depends on.\nWhen method `wait` is called, it will wait until all referenced\ncomponents signal with a `pb-ready` event that they are ready and listening\nto events.",
3345
+ "type": "string"
3346
+ },
3347
+ {
3348
+ "name": "disabled",
3349
+ "attribute": "disabled",
3350
+ "description": "Common property to disable the functionality associated with a component.\n`pb-highlight` and `pb-popover` react to this.",
3351
+ "type": "boolean",
3352
+ "default": "false"
3353
+ }
3354
+ ],
3355
+ "events": [
3356
+ {
3357
+ "name": "pb-dialog-opened",
3358
+ "description": "Fired when the dialog is opened"
3359
+ },
3360
+ {
3361
+ "name": "pb-dialog-closed",
3362
+ "description": "Fired when the dialog is closed"
3363
+ }
3364
+ ],
3365
+ "slots": [
3366
+ {
3367
+ "name": "",
3368
+ "description": "Content of the dialog"
3369
+ },
3370
+ {
3371
+ "name": "title",
3372
+ "description": "Title of the dialog"
3373
+ }
3374
+ ]
3375
+ },
3257
3376
  {
3258
3377
  "name": "pb-document",
3259
3378
  "path": "./src/pb-document.js",
@@ -5494,17 +5613,7 @@
5494
5613
  "slots": [
5495
5614
  {
5496
5615
  "name": "",
5497
- "description": "unnamed default slot for dropdown menu options"
5498
- }
5499
- ],
5500
- "cssProperties": [
5501
- {
5502
- "name": "--pb-lang-input-color",
5503
- "description": "Color of the text in the language field"
5504
- },
5505
- {
5506
- "name": "--pb-lang-label-color",
5507
- "description": "Color of the language field label"
5616
+ "description": "unnamed default slot for dropdown menu options given as <option> elements"
5508
5617
  }
5509
5618
  ]
5510
5619
  },
@@ -6975,7 +7084,7 @@
6975
7084
  {
6976
7085
  "name": "pb-mei",
6977
7086
  "path": "./src/pb-mei.js",
6978
- "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`.",
7087
+ "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`.",
6979
7088
  "attributes": [
6980
7089
  {
6981
7090
  "name": "data",
@@ -8368,7 +8477,7 @@
8368
8477
  },
8369
8478
  {
8370
8479
  "name": "unresolved",
8371
- "description": "Will be set while the component is loading and unset when\nit is fully loaded. Use to avoid flash of unstyled content\nvia CSS: set `unresolved` on `pb-page` in the HTML and\nadd a CSS rule like:\n\n```css\npb-page[unresolved] {\n display: none;\n}\n```",
8480
+ "description": "Will be set while the component is loading and unset when\nit is fully loaded. Use to avoid flash of unstyled content\nvia CSS: set `unresolved` on `pb-page` in the HTML and\nadd a CSS rule like:\n\n```css\npb-page[unresolved] {\n display: none;\n}\n```",
8372
8481
  "type": "boolean",
8373
8482
  "default": "true"
8374
8483
  },
@@ -8496,7 +8605,7 @@
8496
8605
  {
8497
8606
  "name": "unresolved",
8498
8607
  "attribute": "unresolved",
8499
- "description": "Will be set while the component is loading and unset when\nit is fully loaded. Use to avoid flash of unstyled content\nvia CSS: set `unresolved` on `pb-page` in the HTML and\nadd a CSS rule like:\n\n```css\npb-page[unresolved] {\n display: none;\n}\n```",
8608
+ "description": "Will be set while the component is loading and unset when\nit is fully loaded. Use to avoid flash of unstyled content\nvia CSS: set `unresolved` on `pb-page` in the HTML and\nadd a CSS rule like:\n\n```css\npb-page[unresolved] {\n display: none;\n}\n```",
8500
8609
  "type": "boolean",
8501
8610
  "default": "true"
8502
8611
  },
@@ -8995,7 +9104,7 @@
8995
9104
  {
8996
9105
  "name": "pb-popover",
8997
9106
  "path": "./src/pb-popover.js",
8998
- "description": "Show a popover. It may either \n\n1. be attached to another element on the page which serves as a trigger. For this the\n`for` property must be specified and should contain the ID of the trigger element. \nThe whole content of the `pb-popover` element will be shown in the popup.\n\n2. if no `for` property is specified, the `pb-popover` acts itself as the trigger. The trigger\ntext is either taken from a slot named `default` - or the default slot (i.e. the content of the element).\nThe content to show in the popup should be supplied in a slot named `alternate`. It is recommended to use an\nHTML `template` to specify the alternate, so it is ignored by the browser:\n\n```html\n<pb-popover theme=\"material\">\n <span slot=\"default\">ipsum dolor sit amet</span>\n <template slot=\"alternate\">\n <p>At vero eos et <strong>accusam</strong> et justo duo dolores<br>\n et ea rebum.</p>\n </template>\n</pb-popover>\n```\n\nIf you would like popovers to contain nested popovers, choose approach 1 above and use `for`.\n\nIf property `persistent` is true, the popover will be shown\non click. Otherwise display a tooltip on mouseover.\n\n`pb-popover` uses the tippy.js library for the popup.\n\n## Styling\n\nWhen showing the popup, the popup content will either be added to the parent shadow DOM - if the `pb-popover`\nis located inside the shadow DOM of another element like `pb-view`; or the document body. This has an\neffect on where CSS styles can be defined: within a `pb-view`, only the styles specified inside the\nCSS attached to the ODD are applied.",
9107
+ "description": "Show a popover. It may either \n\n1. be attached to another element on the page which serves as a trigger. For this the\n`for` property must be specified and should contain the ID of the trigger element. \nThe whole content of the `pb-popover` element will be shown in the popup.\n\n2. if no `for` property is specified, the `pb-popover` acts itself as the trigger. The trigger\ntext is either taken from a slot named `default` - or the default slot (i.e. the content of the element).\nThe content to show in the popup should be supplied in a slot named `alternate`. It is recommended to use an\nHTML `template` to specify the alternate, so it is ignored by the browser:\n\n```html\n<pb-popover theme=\"material\">\n <span slot=\"default\">ipsum dolor sit amet</span>\n <template slot=\"alternate\">\n <p>At vero eos et <strong>accusam</strong> et justo duo dolores<br>\n et ea rebum.</p>\n </template>\n</pb-popover>\n```\n\nIf you would like popovers to contain nested popovers, choose approach 1 above and use `for`.\n\nIf property `persistent` is true, the popover will be shown\non click. Otherwise display a tooltip on mouseover.\n\n`pb-popover` uses the tippy.js library for the popup.\n\n## Styling\n\nWhen showing the popup, the popup content will either be added to the parent shadow DOM - if the `pb-popover`\nis located inside the shadow DOM of another element like `pb-view`; or the document body. This has an\neffect on where CSS styles can be defined: within a `pb-view`, only the styles specified inside the\nCSS attached to the ODD are applied.",
8999
9108
  "attributes": [
9000
9109
  {
9001
9110
  "name": "remote",
@@ -9918,7 +10027,7 @@
9918
10027
  {
9919
10028
  "name": "pb-select-feature",
9920
10029
  "path": "./src/pb-select-feature.js",
9921
- "description": "Similar to `pb-toggle-feature` but allows you to choose from a list of defined states instead of a simple\non/off toggle. Like `pb-toggle-feature` it can change state server-side as well as client-side. \n\nThe list of states is passed as a JSON array to property `items`:\n\n# Server-side\n\nProperties to be passed to the server are specified as follows:\n\n```javascript\n[\n {\"name\": \"Diplomatic View\", \"properties\": {\"mode\": \"diplomatic\", \"view\": \"page\"}},\n {\"name\": \"Normalized View\", \"properties\": {\"mode\": \"norm\", \"view\": \"single\"}}\n]\n```\n\nIf the `name` property references the path to a translated label, the translation will be used instead.\n# Client-side\n\n```javascript\n[\n {\"name\": \"Diplomatic View\", \"selectors\": [{\"selector\": \".choice,.choice-alternate,br\", \"state\": false},{\"selector\": \".tei-foreign,pb-highlight,pb-popover\", \"command\": \"disable\"}]},\n {\"name\": \"Normalized View\", \"selectors\": [{\"selector\": \".choice,.choice-alternate,br\", \"state\": true},{\"selector\": \".tei-foreign,pb-highlight,pb-popover\", \"command\": \"disable\"}]},\n {\"name\": \"Plain Reading View\", \"selectors\": [{\"selector\": \".choice,.choice-alternate,br\", \"state\": true}, {\"selector\": \".tei-foreign,pb-highlight,pb-popover\", \"command\": \"disable\", \"state\": true}]}\n]\n```\n\nEach item in the `selectors` property above defines either a state or a command. *state* will simply add\na css class `.toggle` to the target element when true. If *command* is set to 'disable', it will entirely disable\nthe functionality of selected elements - provided that they are\npublisher components implementing the corresponding `command` method of `pb-mixin`.\n\nClient-side you may also pass an optional property `\"global\": true` to toggle the state of elements which reside\nin the surrounding HTML context below `pb-page` (means: elements which are not inside a `pb-view` or `pb-load`).",
10030
+ "description": "Similar to `pb-toggle-feature` but allows you to choose from a list of defined states instead of a simple\non/off toggle. Like `pb-toggle-feature` it can change state server-side as well as client-side. \n\nThe list of states is passed as a JSON array to property `items`:\n\n# Server-side\n\nProperties to be passed to the server are specified as follows:\n\n```javascript\n[\n {\"name\": \"Diplomatic View\", \"properties\": {\"mode\": \"diplomatic\", \"view\": \"page\"}},\n {\"name\": \"Normalized View\", \"properties\": {\"mode\": \"norm\", \"view\": \"single\"}}\n]\n```\n\nIf the `name` property references the path to a translated label, the translation will be used instead.\n# Client-side\n\n```javascript\n[\n {\"name\": \"Diplomatic View\", \"selectors\": [{\"selector\": \".choice,.choice-alternate,br\", \"state\": false},{\"selector\": \".tei-foreign,pb-highlight,pb-popover\", \"command\": \"disable\"}]},\n {\"name\": \"Normalized View\", \"selectors\": [{\"selector\": \".choice,.choice-alternate,br\", \"state\": true},{\"selector\": \".tei-foreign,pb-highlight,pb-popover\", \"command\": \"disable\"}]},\n {\"name\": \"Plain Reading View\", \"selectors\": [{\"selector\": \".choice,.choice-alternate,br\", \"state\": true}, {\"selector\": \".tei-foreign,pb-highlight,pb-popover\", \"command\": \"disable\", \"state\": true}]}\n]\n```\n\nEach item in the `selectors` property above defines either a state or a command. *state* will simply add\na css class `.toggle` to the target element when true. If *command* is set to 'disable', it will entirely disable\nthe functionality of selected elements - provided that they are\npublisher components implementing the corresponding `command` method of `pb-mixin`.\n\nClient-side you may also pass an optional property `\"global\": true` to toggle the state of elements which reside\nin the surrounding HTML context below `pb-page` (means: elements which are not inside a `pb-view` or `pb-load`).",
9922
10031
  "attributes": [
9923
10032
  {
9924
10033
  "name": "name",
@@ -10287,7 +10396,7 @@
10287
10396
  {
10288
10397
  "name": "pb-select",
10289
10398
  "path": "./src/pb-select.js",
10290
- "description": "Replacement for an HTML select element with additional features:\n\n1. item list can be loaded from remote endpoint via AJAX\n2. may contain additional nested form in the slot\n named `subform`, whose values will be sent with the AJAX request",
10399
+ "description": "Replacement for an HTML select element with additional features:\n\n1. item list can be loaded from remote endpoint via AJAX\n2. may contain additional nested form in the slot\n named `subform`, whose values will be sent with the AJAX request",
10291
10400
  "attributes": [
10292
10401
  {
10293
10402
  "name": "label",
@@ -10451,7 +10560,7 @@
10451
10560
  {
10452
10561
  "name": "pb-split-list",
10453
10562
  "path": "./src/pb-split-list.js",
10454
- "description": "Implements a list which is split into different categories \n(e.g. letters of the alphabet, countries ...).\nOnly one category is shown at a time unless the server reports\nno categories (e.g. if the number of items to display goes below\na defined threshold).\n\nThe server-side API endpoint should return a JSON object with two\nproperties:\n\n+ `categories`: an array of category descriptions: each item should \n be an object with two properties: `category` - containing the name of the category\n and `count` - containing a count of items available under this category.\n+ `items`: an array with the items to be shown for the currently selected\n category. Those may contain HTML markup.\n\nSample JSON object for pb-split-list\n```javascript\n{\n \"items\": [\n \"<span><a href='Abegg-Arter Carl?category=A&amp;view=correspondents&amp;search='>Abegg-Arter, Carl</a><span class='dates'> (1836–1912)</span></span>\",\n \"<span><a href='Abegg Hans Heinrich?category=A&amp;view=correspondents&amp;search='>Abegg, Hans Heinrich</a><span class='dates'> (1805–1874)</span></span>\",\n \"<span><a href='Abegg Jakob?category=A&amp;view=correspondents&amp;search='>Abegg, Jakob</a><span class='dates'> (1801–1871)</span></span>\",\n \"<span><a href='Abys Raget?category=A&amp;view=correspondents&amp;search='>Abys, Raget</a><span class='dates'> (1790–1861)</span></span>\",\n \"<span><a href='Aebli Johann Peter?category=A&amp;view=correspondents&amp;search='>Aebli, Johann Peter</a><span class='dates'> (1804–1879)</span></span>\",\n \"<span><a href='Aepli Arnold Otto?category=A&amp;view=correspondents&amp;search='>Aepli, Arnold Otto</a><span class='dates'> (1816–1897)</span></span>\",\n ...\n ],\n \"categories\": [\n {\n \"category\": \"A\",\n \"count\": 22\n },\n {\n \"category\": \"B\",\n \"count\": 77\n },\n {\n \"category\": \"C\",\n \"count\": 19\n },\n ...\n ]\n}\n```\n\nSample Usage \n```xml\n<pb-split-list url=\"api/people\" subforms=\"#options\" selected=\"A\" emit=\"transcription\" subscribe=\"transcription\"></pb-split-list>\n```\nSee https://www.briefedition.alfred-escher.ch/kontexte/personen/?category=A&search=&view=correspondents for a running sample. The source code of the webpage is here: https://github.com/stazh/briefedition-escher. Relevant files are: \n- [templates/index.html](https://github.com/stazh/briefedition-escher/blob/master/templates/index.html#L223) - usage of pb-timeline\n- [modules/custom-api.json](https://github.com/stazh/briefedition-escher/blob/master/modules/custom-api.json#L1098) - `/api/people` endpoint delivering required JSON object",
10563
+ "description": "Implements a list which is split into different categories \n(e.g. letters of the alphabet, countries ...).\nOnly one category is shown at a time unless the server reports\nno categories (e.g. if the number of items to display goes below\na defined threshold).\n\nThe server-side API endpoint should return a JSON object with two\nproperties:\n\n+ `categories`: an array of category descriptions: each item should \n be an object with two properties: `category` - containing the name of the category\n and `count` - containing a count of items available under this category.\n+ `items`: an array with the items to be shown for the currently selected\n category. Those may contain HTML markup.\n\nSample JSON object for pb-split-list\n```javascript\n{\n \"items\": [\n \"<span><a href='Abegg-Arter Carl?category=A&amp;view=correspondents&amp;search='>Abegg-Arter, Carl</a><span class='dates'> (1836–1912)</span></span>\",\n \"<span><a href='Abegg Hans Heinrich?category=A&amp;view=correspondents&amp;search='>Abegg, Hans Heinrich</a><span class='dates'> (1805–1874)</span></span>\",\n \"<span><a href='Abegg Jakob?category=A&amp;view=correspondents&amp;search='>Abegg, Jakob</a><span class='dates'> (1801–1871)</span></span>\",\n \"<span><a href='Abys Raget?category=A&amp;view=correspondents&amp;search='>Abys, Raget</a><span class='dates'> (1790–1861)</span></span>\",\n \"<span><a href='Aebli Johann Peter?category=A&amp;view=correspondents&amp;search='>Aebli, Johann Peter</a><span class='dates'> (1804–1879)</span></span>\",\n \"<span><a href='Aepli Arnold Otto?category=A&amp;view=correspondents&amp;search='>Aepli, Arnold Otto</a><span class='dates'> (1816–1897)</span></span>\",\n ...\n ],\n \"categories\": [\n {\n \"category\": \"A\",\n \"count\": 22\n },\n {\n \"category\": \"B\",\n \"count\": 77\n },\n {\n \"category\": \"C\",\n \"count\": 19\n },\n ...\n ]\n}\n```\n\nSample Usage \n```xml\n<pb-split-list url=\"api/people\" subforms=\"#options\" selected=\"A\" emit=\"transcription\" subscribe=\"transcription\"></pb-split-list>\n```\nSee https://www.briefedition.alfred-escher.ch/kontexte/personen/?category=A&search=&view=correspondents for a running sample. The source code of the webpage is here: https://github.com/stazh/briefedition-escher. Relevant files are: \n- [templates/index.html](https://github.com/stazh/briefedition-escher/blob/master/templates/index.html#L223) - usage of pb-timeline\n- [modules/custom-api.json](https://github.com/stazh/briefedition-escher/blob/master/modules/custom-api.json#L1098) - `/api/people` endpoint delivering required JSON object",
10455
10564
  "attributes": [
10456
10565
  {
10457
10566
  "name": "url",
@@ -11116,7 +11225,7 @@
11116
11225
  {
11117
11226
  "name": "pb-timeline",
11118
11227
  "path": "./src/pb-timeline.js",
11119
- "description": "A timeline component to display time series data in a bar chart like view.\n\nTime series data can be displayed in one of 6 different scales:\n\n- by decade (10Y)\n- by 5 years (5Y)\n- by years (Y)\n- by month (M)\n- by week (W)\n- by day (D)\n\nThe endpoint is expected to return a JSON object. Each property should either be a date or the special\nmarker `?`, which indicates undated resources.\nThe value associated with each entry\nshould either correspond to a count of resources or an object with properties `count` and `info`. \n`info` should be an array, containing HTML to be shown in a list within the tooltips.\nExpected JSON: \n```javascript\n{\n \"1852-01-14\": {\n \"count\": 1,\n \"info\": [\n \"<a href='/briefe/B0977' part='tooltip-link'>Alfred Escher an Joseph Wolfgang von Deschwanden, Belvoir (Enge, Zürich), Mittwoch, 14. Januar 1852</a>\"\n ]\n },\n\"1874-01-25\": {\n \"count\": 3,\n \"info\": [\n \"<a href='/briefe/B8140' part='tooltip-link'>Alfred Escher an Gustav von Mevissen, Zürich, Sonntag, 25. Januar 1874</a>\",\n \"<a href='/briefe/B8139' part='tooltip-link'>Alfred Escher an Theodor Weishaupt, Zürich, Sonntag, 25. Januar 1874</a>\",\n \"<a href='/briefe/B8143' part='tooltip-link'>Alfred Escher an Ludwig August Parcus, Zürich, Sonntag, 25. Januar 1874</a>\"\n ]\n }\n}\n```\nSample Usage:\n```xml\n<pb-timeline url=\"api/timeline\" scopes=\"['D', 'M', 'Y', '5Y', '10Y']\"\n resettable=\"\"\n subscribe=\"docs\" emit=\"timeline\">\n <span slot=\"label\">Angezeigter Zeitraum: </span>\n</pb-timeline>\n```\nSee https://www.briefedition.alfred-escher.ch/briefe/ for a running sample. The source code of the webpage is here: https://github.com/stazh/briefedition-escher. Relevant files are: \n- [templates/people.html](https://github.com/stazh/briefedition-escher/blob/master/templates/people.html#L91) - usage of pb-timeline\n- [modules/custom-api.json](https://github.com/stazh/briefedition-escher/blob/master/modules/custom-api.json#L1080) - `/api/timeline` endpoint delivering required JSON object",
11228
+ "description": "A timeline component to display time series data in a bar chart like view.\n\nTime series data can be displayed in one of 6 different scales:\n\n- by decade (10Y)\n- by 5 years (5Y)\n- by years (Y)\n- by month (M)\n- by week (W)\n- by day (D)\n\nThe endpoint is expected to return a JSON object. Each property should either be a date or the special\nmarker `?`, which indicates undated resources.\nThe value associated with each entry\nshould either correspond to a count of resources or an object with properties `count` and `info`. \n`info` should be an array, containing HTML to be shown in a list within the tooltips.\nExpected JSON: \n```javascript\n{\n \"1852-01-14\": {\n \"count\": 1,\n \"info\": [\n \"<a href='/briefe/B0977' part='tooltip-link'>Alfred Escher an Joseph Wolfgang von Deschwanden, Belvoir (Enge, Zürich), Mittwoch, 14. Januar 1852</a>\"\n ]\n },\n\"1874-01-25\": {\n \"count\": 3,\n \"info\": [\n \"<a href='/briefe/B8140' part='tooltip-link'>Alfred Escher an Gustav von Mevissen, Zürich, Sonntag, 25. Januar 1874</a>\",\n \"<a href='/briefe/B8139' part='tooltip-link'>Alfred Escher an Theodor Weishaupt, Zürich, Sonntag, 25. Januar 1874</a>\",\n \"<a href='/briefe/B8143' part='tooltip-link'>Alfred Escher an Ludwig August Parcus, Zürich, Sonntag, 25. Januar 1874</a>\"\n ]\n }\n}\n```\nSample Usage:\n```xml\n<pb-timeline url=\"api/timeline\" scopes=\"['D', 'M', 'Y', '5Y', '10Y']\"\n resettable=\"\"\n subscribe=\"docs\" emit=\"timeline\">\n <span slot=\"label\">Angezeigter Zeitraum: </span>\n</pb-timeline>\n```\nSee https://www.briefedition.alfred-escher.ch/briefe/ for a running sample. The source code of the webpage is here: https://github.com/stazh/briefedition-escher. Relevant files are: \n- [templates/people.html](https://github.com/stazh/briefedition-escher/blob/master/templates/people.html#L91) - usage of pb-timeline\n- [modules/custom-api.json](https://github.com/stazh/briefedition-escher/blob/master/modules/custom-api.json#L1080) - `/api/timeline` endpoint delivering required JSON object",
11120
11229
  "attributes": [
11121
11230
  {
11122
11231
  "name": "start-date",
@@ -11375,7 +11484,7 @@
11375
11484
  {
11376
11485
  "name": "pb-toggle-feature",
11377
11486
  "path": "./src/pb-toggle-feature.js",
11378
- "description": "Enable or disable a particular display feature by setting a predefined or custom parameter.\nToggling display features can be done server-side or client-side.\n\nIt is important that `pb-toggle-feature` emits and subscribes to the same channel as the target `pb-view`.\n\n# Server side toggling\n\nYou may set the following view parameters which correspond to the properties supported by `pb-view`:\n\n| Parameter | Description |\n| ----------------|-------------|\n| odd | the ODD to use |\n| view | the view type: 'page', 'div' or 'single' |\n| columnSeparator | CSS selector to find elements to use as column separator |\n| xpath | XPath expression to select a portion of the text for display |\n\nFor example, one may switch between page-by-page and by-division view using\n\n```html\n<pb-toggle-feature emit=\"transcription\" name=\"view\" on=\"page\" off=\"div\">Page View</pb-toggle-feature>\n```\n\nIt is also possible to set custom parameters, which will be passed to the ODD as user-defined parameters.\nThis can be used e.g. to implement different views on the text, e.g. a 'diplomatic' and a 'normalized' mode. Both\nviews would be backed by the same ODD and processing model, while the passed in parameter\ncan be used to distinguish the modes.\n\nFor example, the following snippet would result in a custom parameter called `mode` with\neither a value of `dipl` or `norm`. Within processing model predicates it could be queried as\n`$parameters?mode='norm'` to check if the normalized version should be output.\n\n```html\n<pb-toggle-feature name=\"mode\" on=\"diplomatic\" off=\"norm\">Diplomatic View</pb-toggle-feature>\n```\n\nBesides setting a single parameter, you may also set multiple\nproperties on the target `pb-view` via the `properties-on` and `properties-off`\nattributes (as an alternative to `on` and `off`). For example, in 'on' state, you may\nwant to use a different ODD and switch the view to 'page' at the same time:\n\n```html\n<pb-toggle-feature properties-on='{\"odd\": \"myodd\", \"view\": \"page\"}' properties-off='{\"odd\": \"myodd-diplomatic\", \"view\": \"div\"}'>\n Diplomatic View\n</pb-toggle-feature>\n```\n\n# Client side toggling\n\nThe component can also be used to toggle features client-side, i.e. without requiring a server-roundtrip.\nTo enable this, the `selector` property should be set to a CSS3 selector targetting the HTML elements\nto toggle. In `on` state, the selected elements will be assigned a class `.toggled`.\n\n```html\n<pb-toggle-feature name=\"normalized\" selector=\".choice,.choice-alternate,br\">Normalized View</pb-toggle-feature>\n```\n\nNote that the name attribute is still required: it is used to determine if the feature is in on or off state by\nlooking at request parameters.\n\nInstead of toggling the class, you can also completely disable the elements selected - provided that they are\npublisher components implementing the corresponding `command` method of `pb-mixin`. To disable elements instead of\ntoggling, set the `action` property to *disable*.\n\n```html\n<pb-toggle-feature name=\"plain\" selector=\".tei-foreign,pb-highlight,pb-popover\" action=\"disable\" default=\"off\">Plain Reading View</pb-toggle-feature>\n```",
11487
+ "description": "Enable or disable a particular display feature by setting a predefined or custom parameter.\nToggling display features can be done server-side or client-side.\n\nIt is important that `pb-toggle-feature` emits and subscribes to the same channel as the target `pb-view`.\n\n# Server side toggling\n\nYou may set the following view parameters which correspond to the properties supported by `pb-view`:\n\n| Parameter | Description |\n| ----------------|-------------|\n| odd | the ODD to use |\n| view | the view type: 'page', 'div' or 'single' |\n| columnSeparator | CSS selector to find elements to use as column separator |\n| xpath | XPath expression to select a portion of the text for display |\n\nFor example, one may switch between page-by-page and by-division view using\n\n```html\n<pb-toggle-feature emit=\"transcription\" name=\"view\" on=\"page\" off=\"div\">Page View</pb-toggle-feature>\n```\n\nIt is also possible to set custom parameters, which will be passed to the ODD as user-defined parameters.\nThis can be used e.g. to implement different views on the text, e.g. a 'diplomatic' and a 'normalized' mode. Both\nviews would be backed by the same ODD and processing model, while the passed in parameter\ncan be used to distinguish the modes.\n\nFor example, the following snippet would result in a custom parameter called `mode` with\neither a value of `dipl` or `norm`. Within processing model predicates it could be queried as\n`$parameters?mode='norm'` to check if the normalized version should be output.\n\n```html\n<pb-toggle-feature name=\"mode\" on=\"diplomatic\" off=\"norm\">Diplomatic View</pb-toggle-feature>\n```\n\nBesides setting a single parameter, you may also set multiple\nproperties on the target `pb-view` via the `properties-on` and `properties-off`\nattributes (as an alternative to `on` and `off`). For example, in 'on' state, you may\nwant to use a different ODD and switch the view to 'page' at the same time:\n\n```html\n<pb-toggle-feature properties-on='{\"odd\": \"myodd\", \"view\": \"page\"}' properties-off='{\"odd\": \"myodd-diplomatic\", \"view\": \"div\"}'>\n Diplomatic View\n</pb-toggle-feature>\n```\n\n# Client side toggling\n\nThe component can also be used to toggle features client-side, i.e. without requiring a server-roundtrip.\nTo enable this, the `selector` property should be set to a CSS3 selector targetting the HTML elements\nto toggle. In `on` state, the selected elements will be assigned a class `.toggled`.\n\n```html\n<pb-toggle-feature name=\"normalized\" selector=\".choice,.choice-alternate,br\">Normalized View</pb-toggle-feature>\n```\n\nNote that the name attribute is still required: it is used to determine if the feature is in on or off state by\nlooking at request parameters.\n\nInstead of toggling the class, you can also completely disable the elements selected - provided that they are\npublisher components implementing the corresponding `command` method of `pb-mixin`. To disable elements instead of\ntoggling, set the `action` property to *disable*.\n\n```html\n<pb-toggle-feature name=\"plain\" selector=\".tei-foreign,pb-highlight,pb-popover\" action=\"disable\" default=\"off\">Plain Reading View</pb-toggle-feature>\n```",
11379
11488
  "attributes": [
11380
11489
  {
11381
11490
  "name": "name",
@@ -11768,7 +11877,7 @@
11768
11877
  "attributes": [
11769
11878
  {
11770
11879
  "name": "key",
11771
- "description": "Configures the default annotation property containing the key for authority entries.\nDefault: 'ref', corresponding to TEI attribute @ref. Change to 'corresp' or 'key' when\nusing those attributes instead.\n\nYou can also define a custom mapping of annotation types to key properties, e.g. if you would\nlike to use @key for some elements, but @corresp for others.",
11880
+ "description": "Configures the default annotation property containing the key for authority entries.\nDefault: 'ref', corresponding to TEI attribute",
11772
11881
  "type": "string",
11773
11882
  "default": "\"ref\""
11774
11883
  },
@@ -11946,12 +12055,13 @@
11946
12055
  ],
11947
12056
  "properties": [
11948
12057
  {
11949
- "name": "annotations"
12058
+ "name": "annotations",
12059
+ "type": "array"
11950
12060
  },
11951
12061
  {
11952
12062
  "name": "key",
11953
12063
  "attribute": "key",
11954
- "description": "Configures the default annotation property containing the key for authority entries.\nDefault: 'ref', corresponding to TEI attribute @ref. Change to 'corresp' or 'key' when\nusing those attributes instead.\n\nYou can also define a custom mapping of annotation types to key properties, e.g. if you would\nlike to use @key for some elements, but @corresp for others.",
12064
+ "description": "Configures the default annotation property containing the key for authority entries.\nDefault: 'ref', corresponding to TEI attribute",
11955
12065
  "type": "string",
11956
12066
  "default": "\"ref\""
11957
12067
  },
@@ -12278,7 +12388,7 @@
12278
12388
  {
12279
12389
  "name": "pb-view",
12280
12390
  "path": "./src/pb-view.js",
12281
- "description": "This is the main component for viewing text which has been transformed via an ODD.\nThe document to be viewed is determined by the `pb-document` element the property\n`src` points to. If not overwritten, `pb-view` will use the settings defined by\nthe connected document, like view type, ODD etc.\n\n`pb-view` can display an entire document or just a fragment of it\nas defined by the properties `xpath`, `xmlId` or `nodeId`. The most common use case\nis to set `xpath` to point to a specific part of a document.\n\nNavigating to the next or previous fragment would usually be triggered by a separate\n`pb-navigation` element, which sends a `pb-navigate` event to the `pb-view`. However,\n`pb-view` also implements automatic loading of next/previous fragments if the user\nscrolls the page beyond the current viewport boudaries. To enable this, set property\n`infinite-scroll`.\n\nYou may also define optional parameters to be passed to the ODD in nested `pb-param`\ntags. These parameters can be accessed within the ODD via the `$parameters` map. For\nexample, the following snippet is being used to output breadcrumbs above the main text\nin the documentation view:\n\n```xml\n<section class=\"breadcrumbs\">\n <pb-view id=\"title-view1\" src=\"document1\" subscribe=\"transcription\">\n <pb-param name=\"mode\" value=\"breadcrumbs\"/>\n </pb-view>\n</section>\n```",
12391
+ "description": "This is the main component for viewing text which has been transformed via an ODD.\nThe document to be viewed is determined by the `pb-document` element the property\n`src` points to. If not overwritten, `pb-view` will use the settings defined by\nthe connected document, like view type, ODD etc.\n\n`pb-view` can display an entire document or just a fragment of it\nas defined by the properties `xpath`, `xmlId` or `nodeId`. The most common use case\nis to set `xpath` to point to a specific part of a document.\n\nNavigating to the next or previous fragment would usually be triggered by a separate\n`pb-navigation` element, which sends a `pb-navigate` event to the `pb-view`. However,\n`pb-view` also implements automatic loading of next/previous fragments if the user\nscrolls the page beyond the current viewport boudaries. To enable this, set property\n`infinite-scroll`.\n\nYou may also define optional parameters to be passed to the ODD in nested `pb-param`\ntags. These parameters can be accessed within the ODD via the `$parameters` map. For\nexample, the following snippet is being used to output breadcrumbs above the main text\nin the documentation view:\n\n```xml\n<section class=\"breadcrumbs\">\n <pb-view id=\"title-view1\" src=\"document1\" subscribe=\"transcription\">\n <pb-param name=\"mode\" value=\"breadcrumbs\"/>\n </pb-view>\n</section>\n```",
12282
12392
  "attributes": [
12283
12393
  {
12284
12394
  "name": "odd",
@@ -1 +1 @@
1
- import{f as t,L as e,N as n,A as s}from"./pb-mixin-e1183270.js";const i=new Map;let a;function o(t){a=t}function r(t){return t instanceof n?t.startNode.isConnected:t instanceof s?t.committer.element.isConnected:t.element.isConnected}function c(){Object.keys(i).forEach(t=>{r(t)||i.delete(t)})}function l(t){"requestIdleCallback"in window?window.requestIdleCallback(t):setTimeout(t)}function d(t,e){const n=e();t.value!==n&&(t.setValue(n),t.commit())}function u(t){a=t.t,i.forEach((t,e)=>{r(e)&&d(e,t)})}function p(t,e){return a?a(t,e):t}const h=t(t=>e=>{i.set(e,t),d(e,t)}),f=(t,e)=>h(()=>p(t,e));document.addEventListener("pb-i18n-update",t=>{u(t.detail)}),setInterval(()=>l(()=>c()),6e4);class b extends e{static get properties(){return Object.assign(Object.assign({},super.properties),{},{key:{type:String},options:{type:Object},_translated:{type:String}})}constructor(){super(),this.key="missing-key",this._options=null,this._translated=null}connectedCallback(){super.connectedCallback(),this._fallback=this.innerHTML,document.addEventListener("pb-i18n-update",this._translate.bind(this)),this._translate()}set options(t){this._options=t,this._translate()}_translate(){const t=p(this.key,this._options);t&&t!==this.key?this._translated=t:this._translated=null}render(){return this._translated?this._translated:this._fallback}createRenderRoot(){return this}}customElements.define("pb-i18n",b);export{p as g,o as i,f as t};
1
+ import{L as t,N as e,A as n,f as s}from"./pb-mixin-b1caa22e.js";const i=new Map;let a;function o(t){a=t}function r(t){return t instanceof e?t.startNode.isConnected:t instanceof n?t.committer.element.isConnected:t.element.isConnected}function c(){Object.keys(i).forEach(t=>{r(t)||i.delete(t)})}function l(t){"requestIdleCallback"in window?window.requestIdleCallback(t):setTimeout(t)}function d(t,e){const n=e();t.value!==n&&(t.setValue(n),t.commit())}function u(t){a=t.t,i.forEach((t,e)=>{r(e)&&d(e,t)})}function p(t,e){return a?a(t,e):t}const h=s(t=>e=>{i.set(e,t),d(e,t)}),b=(t,e)=>h(()=>p(t,e));document.addEventListener("pb-i18n-update",t=>{u(t.detail)}),setInterval(()=>l(()=>c()),6e4);class f extends t{static get properties(){return Object.assign(Object.assign({},super.properties),{},{key:{type:String},options:{type:Object},_translated:{type:String}})}constructor(){super(),this.key="missing-key",this._options=null,this._translated=null}connectedCallback(){super.connectedCallback(),this._fallback=this.innerHTML,document.addEventListener("pb-i18n-update",this._translate.bind(this)),this._translate()}set options(t){this._options=t,this._translate()}_translate(){const t=p(this.key,this._options);t&&t!==this.key?this._translated=t:this._translated=null}render(){return this._translated?this._translated:this._fallback}createRenderRoot(){return this}}customElements.define("pb-i18n",f);export{p as g,o as i,b as t};
@@ -1,4 +1,4 @@
1
- import{L as t,p as e,r as i,h as o,c as s}from"./pb-mixin-e1183270.js";import{g as a}from"./pb-i18n-b62828ba.js";import"./es-global-bridge-4240f389.js";const r=["type","url","label","base","show"];class n 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(n.properties).forEach(e=>{r.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",n);class c 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(c.properties).forEach(e=>{this[e]&&(t[e]=this[e])}),console.log("<pb-map-icon> Options: %o",t),t}}customElements.define("pb-map-icon",c);class h 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"},geoCoding:{type:Boolean,attribute:"geo-coding"},_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={},this.geoCoding=!1}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",{element: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",{element: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,t.detail.clear&&this._markerLayer.clearLayers(),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)}),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(){if(this.toggle||(this.disabled=!1),void 0!==window.L)return void this._initMap();window.ESGlobalBridge.requestAvailability();const t=i("../lib/leaflet-src.js"),e=i("../lib/leaflet.markercluster-src.js"),o=i("../lib/Control.Geocoder.min.js");window.ESGlobalBridge.instance.load("leaflet",t).then(()=>{window.ESGlobalBridge.instance.load("plugin",e).then(()=>{this.geoCoding?window.ESGlobalBridge.instance.load("geocoding",o).then(this._initMap.bind(this)):this._initMap()})})}render(){const t=i(this.cssPath);return o`
1
+ import{L as t,p as e,r as i,h as o,c as s}from"./pb-mixin-b1caa22e.js";import"./es-global-bridge-d8ce175d.js";import{g as a}from"./pb-i18n-0611135a.js";const r=["type","url","label","base","show"];class n 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(n.properties).forEach(e=>{r.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",n);class c 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(c.properties).forEach(e=>{this[e]&&(t[e]=this[e])}),console.log("<pb-map-icon> Options: %o",t),t}}customElements.define("pb-map-icon",c);class h 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"},geoCoding:{type:Boolean,attribute:"geo-coding"},_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={},this.geoCoding=!1}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",{element: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",{element: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,t.detail.clear&&this._markerLayer.clearLayers(),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)}),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(){if(this.toggle||(this.disabled=!1),void 0!==window.L)return void this._initMap();window.ESGlobalBridge.requestAvailability();const t=i("../lib/leaflet-src.js"),e=i("../lib/leaflet.markercluster-src.js"),o=i("../lib/Control.Geocoder.min.js");window.ESGlobalBridge.instance.load("leaflet",t).then(()=>{window.ESGlobalBridge.instance.load("plugin",e).then(()=>{this.geoCoding?window.ESGlobalBridge.instance.load("geocoding",o).then(this._initMap.bind(this)):this._initMap()})})}render(){const t=i(this.cssPath);return o`
2
2
  <link rel="Stylesheet" href="${t}/leaflet.css">
3
3
  <link rel="Stylesheet" href="${t}/MarkerCluster.Default.css">
4
4
  ${this.geoCoding?o`<link rel="Stylesheet" href="${t}/Control.Geocoder.css">`:null}