@teipublisher/pb-components 2.25.2 → 2.25.4
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/.github/workflows/main.yml +3 -3
- package/.github/workflows/node.js.yml +2 -2
- package/.github/workflows/release.js.yml +3 -2
- package/.releaserc.json +8 -1
- package/CHANGELOG.md +14 -0
- package/css/leaflet/images/layers.png +0 -0
- package/dist/{es-global-bridge-4240f389.js → es-global-bridge-d8ce175d.js} +1 -1
- package/dist/{iron-form-a25b58de.js → iron-form-7b5c5d03.js} +1 -1
- package/dist/jinn-codemirror-da0e2d1f.js +1 -0
- package/dist/{paper-checkbox-c9177e35.js → paper-checkbox-4f410b1f.js} +33 -32
- package/dist/{paper-icon-button-c15eb1cf.js → paper-icon-button-0fb125c4.js} +4 -4
- package/dist/{paper-listbox-1fc346ac.js → paper-listbox-5f42cff5.js} +1 -1
- package/dist/pb-code-editor.js +3 -3
- package/dist/pb-component-docs.js +19 -8
- package/dist/pb-components-bundle.js +93 -93
- package/dist/pb-edit-app.js +5 -5
- package/dist/pb-elements.json +17 -16
- package/dist/{pb-i18n-b62828ba.js → pb-i18n-0611135a.js} +1 -1
- package/dist/pb-leaflet-map.js +2 -2
- package/dist/pb-mei.js +6 -6
- package/dist/pb-odd-editor.js +32 -32
- package/dist/pb-tify.js +3 -3
- package/dist/{vaadin-element-mixin-96dff806.js → vaadin-element-mixin-859a0132.js} +38 -29
- package/package.json +5 -5
- package/pb-elements.json +17 -16
- package/src/pb-leaflet-map.js +1 -1
- package/src/pb-timeline.js +1 -1
- package/dist/jinn-codemirror-63cf45e9.js +0 -1
- /package/dist/{pb-mixin-e1183270.js → pb-mixin-b1caa22e.js} +0 -0
package/pb-elements.json
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
{
|
|
@@ -6975,7 +6975,7 @@
|
|
|
6975
6975
|
{
|
|
6976
6976
|
"name": "pb-mei",
|
|
6977
6977
|
"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
|
|
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`.",
|
|
6979
6979
|
"attributes": [
|
|
6980
6980
|
{
|
|
6981
6981
|
"name": "data",
|
|
@@ -8368,7 +8368,7 @@
|
|
|
8368
8368
|
},
|
|
8369
8369
|
{
|
|
8370
8370
|
"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
|
|
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```",
|
|
8372
8372
|
"type": "boolean",
|
|
8373
8373
|
"default": "true"
|
|
8374
8374
|
},
|
|
@@ -8496,7 +8496,7 @@
|
|
|
8496
8496
|
{
|
|
8497
8497
|
"name": "unresolved",
|
|
8498
8498
|
"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
|
|
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```",
|
|
8500
8500
|
"type": "boolean",
|
|
8501
8501
|
"default": "true"
|
|
8502
8502
|
},
|
|
@@ -8995,7 +8995,7 @@
|
|
|
8995
8995
|
{
|
|
8996
8996
|
"name": "pb-popover",
|
|
8997
8997
|
"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
|
|
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.",
|
|
8999
8999
|
"attributes": [
|
|
9000
9000
|
{
|
|
9001
9001
|
"name": "remote",
|
|
@@ -9918,7 +9918,7 @@
|
|
|
9918
9918
|
{
|
|
9919
9919
|
"name": "pb-select-feature",
|
|
9920
9920
|
"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
|
|
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`).",
|
|
9922
9922
|
"attributes": [
|
|
9923
9923
|
{
|
|
9924
9924
|
"name": "name",
|
|
@@ -10287,7 +10287,7 @@
|
|
|
10287
10287
|
{
|
|
10288
10288
|
"name": "pb-select",
|
|
10289
10289
|
"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
|
|
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",
|
|
10291
10291
|
"attributes": [
|
|
10292
10292
|
{
|
|
10293
10293
|
"name": "label",
|
|
@@ -10451,7 +10451,7 @@
|
|
|
10451
10451
|
{
|
|
10452
10452
|
"name": "pb-split-list",
|
|
10453
10453
|
"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
|
|
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&view=correspondents&search='>Abegg-Arter, Carl</a><span class='dates'> (1836–1912)</span></span>\",\n \"<span><a href='Abegg Hans Heinrich?category=A&view=correspondents&search='>Abegg, Hans Heinrich</a><span class='dates'> (1805–1874)</span></span>\",\n \"<span><a href='Abegg Jakob?category=A&view=correspondents&search='>Abegg, Jakob</a><span class='dates'> (1801–1871)</span></span>\",\n \"<span><a href='Abys Raget?category=A&view=correspondents&search='>Abys, Raget</a><span class='dates'> (1790–1861)</span></span>\",\n \"<span><a href='Aebli Johann Peter?category=A&view=correspondents&search='>Aebli, Johann Peter</a><span class='dates'> (1804–1879)</span></span>\",\n \"<span><a href='Aepli Arnold Otto?category=A&view=correspondents&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
10455
|
"attributes": [
|
|
10456
10456
|
{
|
|
10457
10457
|
"name": "url",
|
|
@@ -11116,7 +11116,7 @@
|
|
|
11116
11116
|
{
|
|
11117
11117
|
"name": "pb-timeline",
|
|
11118
11118
|
"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
|
|
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",
|
|
11120
11120
|
"attributes": [
|
|
11121
11121
|
{
|
|
11122
11122
|
"name": "start-date",
|
|
@@ -11375,7 +11375,7 @@
|
|
|
11375
11375
|
{
|
|
11376
11376
|
"name": "pb-toggle-feature",
|
|
11377
11377
|
"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
|
|
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```",
|
|
11379
11379
|
"attributes": [
|
|
11380
11380
|
{
|
|
11381
11381
|
"name": "name",
|
|
@@ -11768,7 +11768,7 @@
|
|
|
11768
11768
|
"attributes": [
|
|
11769
11769
|
{
|
|
11770
11770
|
"name": "key",
|
|
11771
|
-
"description": "Configures the default annotation property containing the key for authority entries.\nDefault: 'ref', corresponding to TEI attribute
|
|
11771
|
+
"description": "Configures the default annotation property containing the key for authority entries.\nDefault: 'ref', corresponding to TEI attribute",
|
|
11772
11772
|
"type": "string",
|
|
11773
11773
|
"default": "\"ref\""
|
|
11774
11774
|
},
|
|
@@ -11946,12 +11946,13 @@
|
|
|
11946
11946
|
],
|
|
11947
11947
|
"properties": [
|
|
11948
11948
|
{
|
|
11949
|
-
"name": "annotations"
|
|
11949
|
+
"name": "annotations",
|
|
11950
|
+
"type": "array"
|
|
11950
11951
|
},
|
|
11951
11952
|
{
|
|
11952
11953
|
"name": "key",
|
|
11953
11954
|
"attribute": "key",
|
|
11954
|
-
"description": "Configures the default annotation property containing the key for authority entries.\nDefault: 'ref', corresponding to TEI attribute
|
|
11955
|
+
"description": "Configures the default annotation property containing the key for authority entries.\nDefault: 'ref', corresponding to TEI attribute",
|
|
11955
11956
|
"type": "string",
|
|
11956
11957
|
"default": "\"ref\""
|
|
11957
11958
|
},
|
|
@@ -12278,7 +12279,7 @@
|
|
|
12278
12279
|
{
|
|
12279
12280
|
"name": "pb-view",
|
|
12280
12281
|
"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
|
|
12282
|
+
"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
12283
|
"attributes": [
|
|
12283
12284
|
{
|
|
12284
12285
|
"name": "odd",
|
package/src/pb-leaflet-map.js
CHANGED
|
@@ -451,7 +451,7 @@ export class PbLeafletMap extends pbMixin(LitElement) {
|
|
|
451
451
|
}).addTo(this._map);
|
|
452
452
|
return;
|
|
453
453
|
}
|
|
454
|
-
const layers = L.control.layers(null, null, { collapsed:
|
|
454
|
+
const layers = L.control.layers(null, null, { collapsed: true });
|
|
455
455
|
this._layers.forEach(config => {
|
|
456
456
|
let layer;
|
|
457
457
|
switch (config.type) {
|
package/src/pb-timeline.js
CHANGED
|
@@ -442,7 +442,7 @@ export class PbTimeline extends pbMixin(LitElement) {
|
|
|
442
442
|
if (this.dataObj.data.length === 1) {
|
|
443
443
|
return this.dataObj.data[0].category;
|
|
444
444
|
}
|
|
445
|
-
return `${this.dataObj.data[0].
|
|
445
|
+
return `${this.dataObj.data[0].selectionStart} – ${this.dataObj.data[this.dataObj.data.length - 1].selectionEnd}`;
|
|
446
446
|
}
|
|
447
447
|
|
|
448
448
|
getSelectedStartDateStr() {
|