@teipublisher/pb-components 1.44.2 → 2.0.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 (72) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/demo/demos.json +2 -1
  3. package/dist/demo/pb-browse-docs.html +2 -1
  4. package/dist/demo/pb-combo-box.html +1 -1
  5. package/dist/demo/pb-document.html +2 -2
  6. package/dist/demo/pb-load.html +2 -2
  7. package/dist/demo/pb-select-feature.html +1 -1
  8. package/dist/demo/pb-select-feature2.html +10 -3
  9. package/dist/demo/pb-select-feature3.html +1 -1
  10. package/dist/demo/pb-select-odd.html +1 -1
  11. package/dist/demo/pb-table-grid.html +1 -1
  12. package/dist/demo/pb-tabs.html +8 -2
  13. package/dist/demo/pb-toggle-feature.html +2 -2
  14. package/dist/demo/pb-toggle-feature2.html +2 -2
  15. package/dist/demo/pb-toggle-feature3.html +2 -2
  16. package/dist/demo/pb-view.html +1 -1
  17. package/dist/demo/pb-view4.html +86 -0
  18. package/dist/pb-code-editor.js +1 -1
  19. package/dist/pb-component-docs.js +33 -33
  20. package/dist/pb-components-bundle.js +173 -173
  21. package/dist/pb-edit-app.js +6 -6
  22. package/dist/pb-elements.json +93 -27
  23. package/dist/{pb-i18n-3963b098.js → pb-i18n-8a90c591.js} +1 -1
  24. package/dist/pb-leaflet-map.js +1 -1
  25. package/dist/pb-mixin-8a593923.js +158 -0
  26. package/dist/pb-odd-editor.js +47 -47
  27. package/dist/{vaadin-element-mixin-08cf11b5.js → vaadin-element-mixin-672938e3.js} +18 -18
  28. package/i18n/common/en.json +9 -1
  29. package/package.json +4 -3
  30. package/pb-elements.json +93 -27
  31. package/src/dts-client.js +14 -14
  32. package/src/dts-select-endpoint.js +5 -5
  33. package/src/pb-ajax.js +4 -4
  34. package/src/pb-authority-lookup.js +2 -2
  35. package/src/pb-autocomplete.js +9 -11
  36. package/src/pb-blacklab-highlight.js +3 -3
  37. package/src/pb-browse-docs.js +44 -27
  38. package/src/pb-browse.js +9 -3
  39. package/src/pb-combo-box.js +2 -2
  40. package/src/pb-document.js +15 -1
  41. package/src/pb-download.js +2 -2
  42. package/src/pb-edit-app.js +2 -2
  43. package/src/pb-edit-xml.js +2 -2
  44. package/src/pb-events.js +26 -18
  45. package/src/pb-grid.js +55 -53
  46. package/src/pb-lang.js +2 -2
  47. package/src/pb-link.js +10 -16
  48. package/src/pb-load.js +35 -25
  49. package/src/pb-login.js +2 -2
  50. package/src/pb-manage-odds.js +2 -2
  51. package/src/pb-markdown.js +2 -2
  52. package/src/pb-mei.js +2 -2
  53. package/src/pb-mixin.js +103 -196
  54. package/src/pb-odd-editor.js +2 -2
  55. package/src/pb-page.js +30 -21
  56. package/src/pb-paginate.js +24 -19
  57. package/src/pb-print-preview.js +2 -2
  58. package/src/pb-repeat.js +2 -1
  59. package/src/pb-search.js +34 -8
  60. package/src/pb-select-feature.js +62 -39
  61. package/src/pb-select-odd.js +8 -7
  62. package/src/pb-select-template.js +5 -4
  63. package/src/pb-select.js +31 -28
  64. package/src/pb-split-list.js +18 -11
  65. package/src/pb-table-grid.js +9 -8
  66. package/src/pb-tabs.js +29 -12
  67. package/src/pb-toggle-feature.js +51 -55
  68. package/src/pb-upload.js +10 -3
  69. package/src/pb-view.js +118 -95
  70. package/src/theming.js +148 -149
  71. package/src/urls.js +233 -0
  72. package/dist/pb-mixin-88125cb2.js +0 -158
package/CHANGELOG.md CHANGED
@@ -1,3 +1,63 @@
1
+ # [2.0.0](https://github.com/eeditiones/tei-publisher-components/compare/v1.44.2...v2.0.0) (2023-03-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **pb-ajax:** partial fix for test failure ([2699c4c](https://github.com/eeditiones/tei-publisher-components/commit/2699c4c684068f4384811b724e4dbd4c380f85cd))
7
+ * **pb-browse:** respect history property to disable pushing to history ([b5f8c28](https://github.com/eeditiones/tei-publisher-components/commit/b5f8c28a3ad343f0f1f18bbbba593414eb2de33e))
8
+ * **pb-browse-docs:** add history support ([5698237](https://github.com/eeditiones/tei-publisher-components/commit/569823737cf4d40c992eaae5b70776ec222b957a))
9
+ * **pb-browse-docs:** pick up facets when connected ([a4eb4f2](https://github.com/eeditiones/tei-publisher-components/commit/a4eb4f238d569c5d94a4d1327307f0f773364c44))
10
+ * **pb-events:** defaultChannel handling ([a16ce6f](https://github.com/eeditiones/tei-publisher-components/commit/a16ce6f87fe017497076044074da894d820f2d45))
11
+ * **pb-events:** subscribe to defaultChannel if channel is null or empty array ([5c59613](https://github.com/eeditiones/tei-publisher-components/commit/5c5961377891419ea5027420195b28bc78c7a1c4))
12
+ * **pb-grid:** do not use es6 operator ([dedbf14](https://github.com/eeditiones/tei-publisher-components/commit/dedbf14edb8007fa47be6ddc0767be0c6aa96428))
13
+ * **pb-load:** also pass content in pb-results-received ([2947281](https://github.com/eeditiones/tei-publisher-components/commit/2947281c13da3c374522d08cd5a8aeb68db73916))
14
+ * **pb-load:** subscribe to browser history only if enabled by user ([3771c27](https://github.com/eeditiones/tei-publisher-components/commit/3771c27c86027910253d1447497c69954e97a3c7))
15
+ * **pb-mixin:** add defaultChannel constant ([ab84bea](https://github.com/eeditiones/tei-publisher-components/commit/ab84beaca9bbd1b5487269ab41f0dab838e74c06))
16
+ * **pb-search:** browser history navigation ([4aa9b76](https://github.com/eeditiones/tei-publisher-components/commit/4aa9b76d88c907c780960c005dc28ad6e6b02ab6))
17
+ * **pb-search:** strip out the 'autocomplete-custom-template' parameter added by the autcomplete subcomponent ([12e1e5c](https://github.com/eeditiones/tei-publisher-components/commit/12e1e5c0cc09712b6e711a0422d387616f4f7e61))
18
+ * **pb-search,pb-paginate:** pb-search now keeps track of pagination position ([1700af0](https://github.com/eeditiones/tei-publisher-components/commit/1700af053dc0227de41bfcf6782014cf3d78c8fa))
19
+ * **pb-select:** use correct string function ([13ebfbb](https://github.com/eeditiones/tei-publisher-components/commit/13ebfbbbd9e49a0b5360c14744069a24e03729df))
20
+ * **pb-select-feature:** (re-)allow state to be toggled on elements which reside in the HTML context, but are not part of a pb-view or pb-load ([1260e9b](https://github.com/eeditiones/tei-publisher-components/commit/1260e9bb1f4aa8107cfa173c74dac12300cb1240))
21
+ * **pb-select-feature:** update to mirror pb-toggle-feature ([9606688](https://github.com/eeditiones/tei-publisher-components/commit/96066880d4fafd99f7b629f7a1cf50695dfca62a))
22
+ * **pb-split-list,pb-table-grid:** update to support browser history ([1b72351](https://github.com/eeditiones/tei-publisher-components/commit/1b723516a97c15ce93a3dc308f397beb5983e51d))
23
+ * **pb-tabs:** update to support browser history ([e205279](https://github.com/eeditiones/tei-publisher-components/commit/e20527914037addd6a49040d79f76105c3202633))
24
+ * **pb-toggle-feature:** refactor for history support ([27d7638](https://github.com/eeditiones/tei-publisher-components/commit/27d7638c78bcfb62be9fb10a23001a373ab44cb8))
25
+ * **pb-view:** fix on-update ([814f4bb](https://github.com/eeditiones/tei-publisher-components/commit/814f4bbf08bd0bdb34c00782dbdd58fd6b607892))
26
+ * **pb-view:** ignore external params if property is specified as attribute ([77851d2](https://github.com/eeditiones/tei-publisher-components/commit/77851d2f038c97c1050b9dfa5fad79f517d37a02))
27
+ * **theming:** add polyfill for constructable stylesheets ([0056e94](https://github.com/eeditiones/tei-publisher-components/commit/0056e94bc29bd46b4c7183704b74a2f4ca12d9c9))
28
+ * **theming:** line endings ([cf029ed](https://github.com/eeditiones/tei-publisher-components/commit/cf029ede1490c283627ffef9a799e9d410ad5875))
29
+ * **urls:** improve warning message ([9832a53](https://github.com/eeditiones/tei-publisher-components/commit/9832a53150dd46f619b03dbf0d88b4b82c72b4f1))
30
+ * drop url-templates in favour of simpler mechanism ([d0f6d01](https://github.com/eeditiones/tei-publisher-components/commit/d0f6d01d920220147d53a70e511ede14ad4a2b7f))
31
+ * state should be saved by subscribed, not emitted channels ([1f93be9](https://github.com/eeditiones/tei-publisher-components/commit/1f93be9a19e6678e2e6f0f8d3fa57e1e2ae31a1f))
32
+
33
+
34
+ ### Code Refactoring
35
+
36
+ * **pb-mixin:** remove unused methods ([b21bfae](https://github.com/eeditiones/tei-publisher-components/commit/b21bfae717052167ac3e539216e4de20cc73ab57))
37
+
38
+
39
+ ### Features
40
+
41
+ * **dts-client:** use URL registry ([cea7336](https://github.com/eeditiones/tei-publisher-components/commit/cea733680aaf3d52b9fc42445eca8d26bf0b1b86))
42
+ * **dts-select-endpoint:** use URL registry ([b6df38f](https://github.com/eeditiones/tei-publisher-components/commit/b6df38f4cb4064eb105a424ef9070d7ffd129eba))
43
+ * **pb-browse-docs:** use URL registry ([07a20ff](https://github.com/eeditiones/tei-publisher-components/commit/07a20ffd83e49468acfb62e3d93a8c3af4a9fc82))
44
+ * **pb-load:** use new URL registry ([5e8030d](https://github.com/eeditiones/tei-publisher-components/commit/5e8030de30d634ea37812b3731bf0f67f0b6ebe8))
45
+ * **pb-select-template:** use URL registry ([82fc98b](https://github.com/eeditiones/tei-publisher-components/commit/82fc98b85b42ec576a5b8e1bae3a5607b7567410))
46
+ * **pb-upload:** make the event emitted on finish configurable ([f1a0aca](https://github.com/eeditiones/tei-publisher-components/commit/f1a0aca552324ef972443c890ffa50d2372c1dcb))
47
+
48
+
49
+ ### BREAKING CHANGES
50
+
51
+ * **pb-mixin:** Several methods are no longer used since the
52
+ introduction of the URL registry.
53
+
54
+ - getParameterValues
55
+ - setParameter
56
+ - setParameters
57
+ - getParametersMatching
58
+ - setPath
59
+ - pushHistory
60
+
1
61
  ## [1.44.2](https://github.com/eeditiones/tei-publisher-components/compare/v1.44.1...v1.44.2) (2023-03-15)
2
62
 
3
63
 
@@ -2,7 +2,8 @@
2
2
  "pb-view": {
3
3
  "demo/pb-view.html": "View TEI document",
4
4
  "demo/pb-view2.html": "Docbook document",
5
- "demo/pb-view3.html": "Manipulating content via JS"
5
+ "demo/pb-view3.html": "Manipulating content via JS",
6
+ "demo/pb-view4.html": "Navigating links"
6
7
  },
7
8
  "pb-document": {
8
9
  "demo/pb-document.html": "Demo"
@@ -69,7 +69,8 @@
69
69
  border-bottom: 1px solid #a0a0a0;
70
70
  }
71
71
  </style>
72
- <pb-page endpoint="https://teipublisher.com/exist/apps/tei-publisher">
72
+ <pb-page endpoint="https://teipublisher.com/exist/apps/tei-publisher"
73
+ url-doc="path|query" url-skip="lang," url-id="query|hash">
73
74
  <div class="toolbar">
74
75
  <pb-login id="login" group="tei"></pb-login>
75
76
  <pb-lang label="language" selected="en">
@@ -9,7 +9,7 @@
9
9
  <pb-demo-snippet>
10
10
  <template>
11
11
  <pb-page locales="../i18n/{{ns}}/{{lng}}.json" endpoint="https://teipublisher.com/exist/apps/tei-publisher">
12
- <h2>Using pb-multi-select with a standard HTML form</h2>
12
+ <h2>Using pb-combo-box with a standard HTML form</h2>
13
13
  <form id="form" action="">
14
14
  <fieldset>
15
15
  <p>Select single option from a remote data source</p>
@@ -24,12 +24,12 @@
24
24
  }
25
25
  </style>
26
26
  <pb-page endpoint="https://teipublisher.com/exist/apps/tei-publisher">
27
- <pb-document id="document1" path="test/kant_rvernunft_1781.TEI-P5.xml" odd="dta" view="page"></pb-document>
27
+ <pb-document id="document1" path="test/kant_rvernunft_1781.TEI-P5.xml" odd="dta" view="page" disable-history></pb-document>
28
28
  <pb-document id="document2" path="doc/documentation.xml" odd="docbook" view="div"></pb-document>
29
29
 
30
30
  <!-- Display two document views side by side -->
31
31
  <main>
32
- <pb-view id="view1" src="document1"></pb-view>
32
+ <pb-view id="view1" src="document1" disable-history></pb-view>
33
33
  <pb-view id="view2" src="document2"></pb-view>
34
34
  </main>
35
35
  </pb-page>
@@ -43,13 +43,13 @@
43
43
  }
44
44
  </style>
45
45
  <pb-page endpoint="https://teipublisher.com/exist/apps/tei-publisher">
46
- <pb-document id="document1" path="test/kant_rvernunft_1781.TEI-P5.xml" odd="dta"></pb-document>
46
+ <pb-document id="document1" path="test/kant_rvernunft_1781.TEI-P5.xml" odd="dta" view="page"></pb-document>
47
47
 
48
48
  <main>
49
49
  <pb-load url="api/document/{doc}/contents?target=transcription&icons=true" expand src="document1" auto>Loading table of
50
50
  contents...</pb-load>
51
51
  <div class="transcription">
52
- <pb-view src="document1" subscribe="transcription" view="page"></pb-view>
52
+ <pb-view src="document1" subscribe="transcription"></pb-view>
53
53
  </div>
54
54
  </main>
55
55
  </pb-page>
@@ -38,7 +38,7 @@
38
38
  <div class="toolbar">
39
39
  <pb-select-feature id="select-view1" name="view1" label="View" items='[
40
40
  {"name": "Diplomatic View", "properties": {"mode": "diplomatic", "view": "page"}},
41
- {"name": "Normalized View", "properties": {"mode": "norm", "view": "single"}}
41
+ {"name": "Normalized View", "properties": {"mode": "norm", "view": "single", "root": null}}
42
42
  ]'></pb-select-feature>
43
43
  <pb-navigation direction="backward" keyboard="left">
44
44
  <paper-icon-button icon="icons:chevron-left"></paper-icon-button>
@@ -28,6 +28,12 @@
28
28
  padding: 10px;
29
29
  background-color: #E0E0E0;
30
30
  }
31
+ .message {
32
+ display: none;
33
+ }
34
+ .message.toggle {
35
+ display: block;
36
+ }
31
37
  pb-toggle-feature {
32
38
  display: block;
33
39
  }
@@ -35,11 +41,12 @@
35
41
  <pb-page endpoint="https://teipublisher.com/exist/apps/tei-publisher">
36
42
  <pb-document id="document1" path="test/cortes_to_dantiscus.xml" odd="dantiscus"></pb-document>
37
43
 
44
+ <p class="message">You are viewing the text in plain reading view.</p>
38
45
  <div class="toolbar">
39
46
  <pb-select-feature id="select-view1" name="view1" label="View" items='[
40
- {"name": "Diplomatic View", "selectors": [{"selector": ".choice,.choice-alternate,br", "state": false},{"selector": ".tei-foreign,pb-highlight,pb-popover", "command": "disable"}]},
41
- {"name": "Normalized View", "selectors": [{"selector": ".choice,.choice-alternate,br", "state": true},{"selector": ".tei-foreign,pb-highlight,pb-popover", "command": "disable"}]},
42
- {"name": "Plain Reading View", "selectors": [{"selector": ".choice,.choice-alternate,br", "state": true}, {"selector": ".tei-foreign,pb-highlight,pb-popover", "command": "disable", "state": true}]}
47
+ {"name": "Diplomatic View", "selectors": [{"selector": ".choice,.choice-alternate,br", "state": false},{"selector": ".tei-foreign,pb-highlight,pb-popover", "command": "disable"}, {"selector": ".message", "state": false, "global": true}]},
48
+ {"name": "Normalized View", "selectors": [{"selector": ".choice,.choice-alternate,br", "state": true},{"selector": ".tei-foreign,pb-highlight,pb-popover", "command": "disable"}, {"selector": ".message", "state": false, "global": true}]},
49
+ {"name": "Plain Reading View", "selectors": [{"selector": ".choice,.choice-alternate,br", "state": true}, {"selector": ".tei-foreign,pb-highlight,pb-popover", "command": "disable", "state": true}, {"selector": ".message", "state": true, "global": true}]}
43
50
  ]' emit="ex2" subscribe="ex2"></pb-select-feature>
44
51
  <!-- Navigate to previous page -->
45
52
  <pb-navigation direction="backward" keyboard="left" emit="ex2" subscribe="ex2">
@@ -49,7 +49,7 @@
49
49
  </div>
50
50
  <main>
51
51
  <pb-load id="load" url="api/parts/{doc}/html?xpath=//text[@type='source']&view=single" expand
52
- src="document1" auto subscribe="loader" emit="loader">Loading document ...</pb-load>
52
+ src="document1" auto subscribe="loader" emit="loader" history>Loading document ...</pb-load>
53
53
  </main>
54
54
  </pb-page>
55
55
  </template>
@@ -32,4 +32,4 @@
32
32
  </pb-demo-snippet>
33
33
  </body>
34
34
 
35
- </html>
35
+ </html>
@@ -6,7 +6,7 @@
6
6
  <body>
7
7
  <h1>Using pb-table-grid</h1>
8
8
 
9
- <pb-page theme="components.css">
9
+ <pb-page theme="components.css" url-path="query">
10
10
  <pb-table-grid class="table-grid" source="./people.json" css-path="/css/gridjs" resizable>
11
11
  <pb-table-column label="Name" property="name"></pb-table-column>
12
12
  <pb-table-column label="Born" property="birth"></pb-table-column>
@@ -12,9 +12,11 @@
12
12
  <template>
13
13
  <!-- Display two document views side by side -->
14
14
  <main>
15
+ <pb-page endpoint="https://teipublisher.com/exist/apps/tei-publisher">
15
16
  <pb-tabs>
16
- <paper-tab slot="tab">Local Collection</paper-tab>
17
- <paper-tab slot="tab">Distributed Text Services (Experimental)</paper-tab>
17
+ <paper-tab slot="tab">Tab 1</paper-tab>
18
+ <paper-tab slot="tab">Tab 2</paper-tab>
19
+ <paper-tab slot="tab">Tab 3</paper-tab>
18
20
 
19
21
  <div slot="page">
20
22
  <p>This is the first tab.</p>
@@ -22,7 +24,11 @@
22
24
  <div slot="page">
23
25
  <p>And a second tab.</p>
24
26
  </div>
27
+ <div slot="page">
28
+ <p>The third tab.</p>
29
+ </div>
25
30
  </pb-tabs>
31
+ </pb-page>
26
32
  </main>
27
33
  </template>
28
34
  </pb-demo-snippet>
@@ -55,13 +55,13 @@
55
55
  <pb-document id="document1" path="test/cortes_to_dantiscus.xml" odd="dantiscus"></pb-document>
56
56
 
57
57
  <div class="toolbar">
58
- <pb-toggle-feature name="highlight1" selector=".tei-foreign,pb-highlight,pb-popover"
58
+ <pb-toggle-feature name="plain" selector=".tei-foreign,pb-highlight,pb-popover"
59
59
  action="disable" default="off">Plain Reading View</pb-toggle-feature>
60
60
  <!-- pass a parameter 'mode'. pb-view will forward this to the ODD as a user-defined parameter-->
61
61
  <pb-toggle-feature name="mode" on="diplomatic" off="norm">Diplomatic View</pb-toggle-feature>
62
62
  <!-- directly change properties of the pb-view -->
63
63
  <pb-toggle-feature name="view" on="page" off="single" default="off">Page View</pb-toggle-feature>
64
- <pb-toggle-feature name="xpath" default="off"
64
+ <pb-toggle-feature name="translation" default="off"
65
65
  properties-on='{"xpath": "//text[@type=&apos;translation&apos;]", "odd": "teipublisher", "nodeId": null, "view": "single"}'
66
66
  properties-off='{"xpath": "//text[@type=&apos;source&apos;]", "odd": "dantiscus"}'>
67
67
  Translation
@@ -54,9 +54,9 @@
54
54
  <pb-page endpoint="https://teipublisher.com/exist/apps/tei-publisher">
55
55
  <pb-document id="document2" path="test/cortes_to_dantiscus.xml" odd="dantiscus"></pb-document>
56
56
  <div class="toolbar">
57
- <pb-toggle-feature name="highlight2" selector=".tei-foreign,pb-highlight,pb-popover"
57
+ <pb-toggle-feature name="plain" selector=".tei-foreign,pb-highlight,pb-popover"
58
58
  action="disable" default="off" emit="ex2" subscribe="ex2">Plain Reading View</pb-toggle-feature>
59
- <pb-toggle-feature name="norm2" selector=".choice,.choice-alternate,br" emit="ex2" subscribe="ex2">
59
+ <pb-toggle-feature name="norm" selector=".choice,.choice-alternate,br" emit="ex2" subscribe="ex2">
60
60
  Normalized View</pb-toggle-feature>
61
61
  <!-- Navigate to previous page -->
62
62
  <pb-navigation direction="backward" keyboard="left" emit="ex2" subscribe="ex2">
@@ -47,12 +47,12 @@
47
47
  <!-- pass a parameter 'mode'. pb-view will forward this to the ODD as a user-defined parameter -->
48
48
  <!-- note that we have to prefix the parameter with 'user.' because that's how components.xql expects it -->
49
49
  <pb-toggle-feature id="toggle2" emit="loader" subscribe="loader" name="user.mode"
50
- on="diplomatic" off="norm" default="on">Diplomatic View</pb-toggle-feature>
50
+ on="diplomatic" off="norm" default="diplomatic">Diplomatic View</pb-toggle-feature>
51
51
  </div>
52
52
  <main>
53
53
  <!-- call components.xql to retrieve the full source text -->
54
54
  <pb-load url="api/parts/{doc}/html?xpath=//text[@type='source']&view=single" expand
55
- src="document3" auto subscribe="loader" emit="loader">Loading document ...</pb-load>
55
+ src="document3" auto subscribe="loader" emit="loader" history="history">Loading document ...</pb-load>
56
56
  </main>
57
57
  </pb-page>
58
58
  </template>
@@ -54,7 +54,7 @@
54
54
  <pb-progress subscribe="transcription"></pb-progress>
55
55
  <!-- Output the document title -->
56
56
  <pb-view src="document1" xpath="//teiHeader/fileDesc/titleStmt/title"
57
- subscribe="transcription">
57
+ subscribe="transcription" view="single">
58
58
  <pb-param name="header" value="short"/>
59
59
  </pb-view>
60
60
  <pb-view id="view1" src="document1" view="page" append-footnotes animation
@@ -0,0 +1,86 @@
1
+ <html>
2
+ <head>
3
+ <meta charset="utf-8"/>
4
+ <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes"/>
5
+
6
+ <title>pb-view Demo</title>
7
+ <script src="https://unpkg.com/@webcomponents/webcomponentsjs@2.4.3/webcomponents-loader.js"></script><script type="module" src="../pb-components-bundle.js"></script>
8
+ </head>
9
+
10
+ <body>
11
+ <pb-demo-snippet>
12
+ <template>
13
+ <style type="text/css">
14
+ pb-page {
15
+ position: relative;
16
+ }
17
+
18
+ main {
19
+ display: grid;
20
+ height: calc(100vh - 128px);
21
+ grid-template-columns: 360px 1fr;
22
+ grid-template-rows: 1fr auto;
23
+ }
24
+
25
+ ul {
26
+ grid-row: 1 / 2;
27
+ }
28
+
29
+ #view1 {
30
+ grid-column: 2 / 2;
31
+ grid-row: 1 / 1;
32
+ overflow: auto;
33
+ font-family: var(--pb-base-font-family);
34
+ font-size: 20px;
35
+ padding: 0;
36
+ }
37
+
38
+ footer {
39
+ grid-column: 2 / 2;
40
+ grid-row: 2 / 2;
41
+ background-color: var(--pb-toolbar-background-color);
42
+ }
43
+
44
+ footer pb-navigation[direction=forward] {
45
+ float: right;
46
+ }
47
+ </style>
48
+ <pb-page endpoint="https://teipublisher.com/exist/apps/tei-publisher">
49
+ <pb-document id="document1" path="doc/documentation.xml" odd="docbook" view="div"></pb-document>
50
+
51
+ <pb-progress></pb-progress>
52
+ <main>
53
+ <ul>
54
+ <li>
55
+ <pb-link class="docs" path="doc/documentation.xml" odd="docbook" view="div">Documentation</pb-link>
56
+ </li>
57
+ <li>
58
+ <pb-link path="test/kant_rvernunft_1781.TEI-P5.xml" odd="dta" view="page">Kant chapter</pb-link>
59
+ </li>
60
+ <li>
61
+ <pb-link class="docs" path="doc/documentation.xml" xml-id="pi-config" odd="docbook" view="div">Link by xml:id
62
+ </pb-link>
63
+ </li>
64
+ </ul>
65
+ <pb-view id="view1" src="document1" append-footnotes fix-links
66
+ load-css="odd/docbook.css"></pb-view>
67
+ <footer>
68
+ <!-- Navigate to next page -->
69
+ <pb-navigation direction="forward" keyboard="right">
70
+ <paper-button>
71
+ <iron-icon icon="icons:chevron-right"></iron-icon>
72
+ </paper-button>
73
+ </pb-navigation>
74
+ <!-- Navigate to previous page -->
75
+ <pb-navigation direction="backward" keyboard="left">
76
+ <paper-button>
77
+ <iron-icon icon="icons:chevron-left"></iron-icon>
78
+ </paper-button>
79
+ </pb-navigation>
80
+ </footer>
81
+ </main>
82
+ </pb-page>
83
+ </template>
84
+ </pb-demo-snippet>
85
+ </body>
86
+ </html>
@@ -1,4 +1,4 @@
1
- import{p as e,L as t,h as i,c as r}from"./pb-mixin-88125cb2.js";import{t as o}from"./pb-i18n-3963b098.js";import"./jinn-codemirror-9718e0e0.js";class s extends(e(t)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{code:{type:String,reflect:!0},mode:{type:String},label:{type:String},placeholder:{type:String},tabSize:{type:Number},linter:{attribute:!0}})}constructor(){super(),this.code="",this.mode="xml",this.placeholder="odd.editor.model.empty",this.tabSize=2,this.label="",this.linter="",this._editor=null}connectedCallback(){super.connectedCallback()}firstUpdated(){super.firstUpdated(),this._editor=this.shadowRoot.getElementById("editor")}render(){return i`
1
+ import{p as e,L as t,h as i,c as r}from"./pb-mixin-8a593923.js";import{t as o}from"./pb-i18n-8a90c591.js";import"./jinn-codemirror-9718e0e0.js";class s extends(e(t)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{code:{type:String,reflect:!0},mode:{type:String},label:{type:String},placeholder:{type:String},tabSize:{type:Number},linter:{attribute:!0}})}constructor(){super(),this.code="",this.mode="xml",this.placeholder="odd.editor.model.empty",this.tabSize=2,this.label="",this.linter="",this._editor=null}connectedCallback(){super.connectedCallback()}firstUpdated(){super.firstUpdated(),this._editor=this.shadowRoot.getElementById("editor")}render(){return i`
2
2
  <div class="label">${this.label}</div>
3
3
  <jinn-codemirror id="editor" mode="${this.mode}" code="${this.code}" placeholder="${o(this.placeholder)}"></jinn-codemirror>
4
4
  `}getSource(){return this._editor?this._editor.value:""}_setCode(){this.dispatchEvent(new CustomEvent("code-changed",{composed:!0,bubbles:!0,detail:{code:this.getSource()}}))}refresh(){}static get styles(){return r`