@teipublisher/pb-components 1.44.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +76 -0
- package/dist/demo/demos.json +6 -1
- package/dist/demo/pb-browse-docs.html +2 -1
- package/dist/demo/pb-combo-box.html +1 -1
- package/dist/demo/pb-document.html +2 -2
- package/dist/demo/pb-image-strip-standalone.html +94 -0
- package/dist/demo/pb-image-strip-view.html +92 -0
- package/dist/demo/pb-load.html +2 -2
- package/dist/demo/pb-select-feature.html +1 -1
- package/dist/demo/pb-select-feature2.html +10 -3
- package/dist/demo/pb-select-feature3.html +1 -1
- package/dist/demo/pb-select-odd.html +1 -1
- package/dist/demo/pb-table-grid.html +1 -1
- package/dist/demo/pb-tabs.html +8 -2
- package/dist/demo/pb-toggle-feature.html +2 -2
- package/dist/demo/pb-toggle-feature2.html +2 -2
- package/dist/demo/pb-toggle-feature3.html +2 -2
- package/dist/demo/pb-view.html +1 -1
- package/dist/demo/pb-view4.html +86 -0
- package/dist/pb-code-editor.js +1 -1
- package/dist/pb-component-docs.js +33 -33
- package/dist/pb-components-bundle.js +271 -261
- package/dist/pb-edit-app.js +6 -6
- package/dist/pb-elements.json +248 -29
- package/dist/{pb-i18n-3963b098.js → pb-i18n-8a90c591.js} +1 -1
- package/dist/pb-leaflet-map.js +1 -1
- package/dist/pb-mixin-8a593923.js +158 -0
- package/dist/pb-odd-editor.js +47 -47
- package/dist/{vaadin-element-mixin-08cf11b5.js → vaadin-element-mixin-672938e3.js} +18 -18
- package/i18n/common/en.json +9 -1
- package/package.json +4 -3
- package/pb-elements.json +248 -29
- package/src/dts-client.js +14 -14
- package/src/dts-select-endpoint.js +5 -5
- package/src/pb-ajax.js +4 -4
- package/src/pb-authority-lookup.js +2 -2
- package/src/pb-autocomplete.js +9 -11
- package/src/pb-blacklab-highlight.js +3 -3
- package/src/pb-browse-docs.js +44 -27
- package/src/pb-browse.js +9 -3
- package/src/pb-combo-box.js +2 -2
- package/src/pb-components.js +1 -0
- package/src/pb-document.js +15 -1
- package/src/pb-download.js +2 -2
- package/src/pb-edit-app.js +2 -2
- package/src/pb-edit-xml.js +2 -2
- package/src/pb-events.js +26 -18
- package/src/pb-facs-link.js +33 -9
- package/src/pb-facsimile.js +34 -31
- package/src/pb-grid.js +55 -53
- package/src/pb-image-strip.js +97 -0
- package/src/pb-lang.js +2 -2
- package/src/pb-link.js +10 -16
- package/src/pb-load.js +35 -25
- package/src/pb-login.js +2 -2
- package/src/pb-manage-odds.js +2 -2
- package/src/pb-markdown.js +2 -2
- package/src/pb-mei.js +2 -2
- package/src/pb-mixin.js +103 -196
- package/src/pb-odd-editor.js +2 -2
- package/src/pb-page.js +30 -21
- package/src/pb-paginate.js +24 -19
- package/src/pb-print-preview.js +2 -2
- package/src/pb-repeat.js +2 -1
- package/src/pb-search.js +34 -8
- package/src/pb-select-feature.js +62 -39
- package/src/pb-select-odd.js +8 -7
- package/src/pb-select-template.js +5 -4
- package/src/pb-select.js +31 -28
- package/src/pb-split-list.js +18 -11
- package/src/pb-table-grid.js +9 -8
- package/src/pb-tabs.js +29 -12
- package/src/pb-toggle-feature.js +51 -55
- package/src/pb-upload.js +10 -3
- package/src/pb-view.js +118 -95
- package/src/theming.js +148 -149
- package/src/urls.js +233 -0
- package/dist/pb-mixin-88125cb2.js +0 -158
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,79 @@
|
|
|
1
|
+
# [2.1.0](https://github.com/eeditiones/tei-publisher-components/compare/v2.0.0...v2.1.0) (2023-03-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **pb-facs-link:** wait for pb-facsimile or pb-image-strip to be ready ([93da282](https://github.com/eeditiones/tei-publisher-components/commit/93da282ddcafd9c28bc87bb4efeefd13ecf73a51))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **pb-facsimile:** respect facs-link order ([8754768](https://github.com/eeditiones/tei-publisher-components/commit/87547680da8c4a539a13e3283d234d121bec6571))
|
|
12
|
+
* **pb-image-strip:** reverse default order ([ea12409](https://github.com/eeditiones/tei-publisher-components/commit/ea12409fed2051ac2ed9132b81c5644a679e4296))
|
|
13
|
+
* pb-facs-link, pb-image-strip ([f667176](https://github.com/eeditiones/tei-publisher-components/commit/f667176b7561a824c63ecacdb8ee0ed454997907))
|
|
14
|
+
* ** pb-image-strip:** sort items by order ([d0baa51](https://github.com/eeditiones/tei-publisher-components/commit/d0baa5193b6f6cb1ea1abe54a27f811aa272d4cc))
|
|
15
|
+
* **pb-image-strip:** add new component ([9143856](https://github.com/eeditiones/tei-publisher-components/commit/9143856b5877da9d896ca6c4cef8e3f8deff8c97)), closes [#85](https://github.com/eeditiones/tei-publisher-components/issues/85)
|
|
16
|
+
|
|
17
|
+
# [2.0.0](https://github.com/eeditiones/tei-publisher-components/compare/v1.44.2...v2.0.0) (2023-03-16)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **pb-ajax:** partial fix for test failure ([2699c4c](https://github.com/eeditiones/tei-publisher-components/commit/2699c4c684068f4384811b724e4dbd4c380f85cd))
|
|
23
|
+
* **pb-browse:** respect history property to disable pushing to history ([b5f8c28](https://github.com/eeditiones/tei-publisher-components/commit/b5f8c28a3ad343f0f1f18bbbba593414eb2de33e))
|
|
24
|
+
* **pb-browse-docs:** add history support ([5698237](https://github.com/eeditiones/tei-publisher-components/commit/569823737cf4d40c992eaae5b70776ec222b957a))
|
|
25
|
+
* **pb-browse-docs:** pick up facets when connected ([a4eb4f2](https://github.com/eeditiones/tei-publisher-components/commit/a4eb4f238d569c5d94a4d1327307f0f773364c44))
|
|
26
|
+
* **pb-events:** defaultChannel handling ([a16ce6f](https://github.com/eeditiones/tei-publisher-components/commit/a16ce6f87fe017497076044074da894d820f2d45))
|
|
27
|
+
* **pb-events:** subscribe to defaultChannel if channel is null or empty array ([5c59613](https://github.com/eeditiones/tei-publisher-components/commit/5c5961377891419ea5027420195b28bc78c7a1c4))
|
|
28
|
+
* **pb-grid:** do not use es6 operator ([dedbf14](https://github.com/eeditiones/tei-publisher-components/commit/dedbf14edb8007fa47be6ddc0767be0c6aa96428))
|
|
29
|
+
* **pb-load:** also pass content in pb-results-received ([2947281](https://github.com/eeditiones/tei-publisher-components/commit/2947281c13da3c374522d08cd5a8aeb68db73916))
|
|
30
|
+
* **pb-load:** subscribe to browser history only if enabled by user ([3771c27](https://github.com/eeditiones/tei-publisher-components/commit/3771c27c86027910253d1447497c69954e97a3c7))
|
|
31
|
+
* **pb-mixin:** add defaultChannel constant ([ab84bea](https://github.com/eeditiones/tei-publisher-components/commit/ab84beaca9bbd1b5487269ab41f0dab838e74c06))
|
|
32
|
+
* **pb-search:** browser history navigation ([4aa9b76](https://github.com/eeditiones/tei-publisher-components/commit/4aa9b76d88c907c780960c005dc28ad6e6b02ab6))
|
|
33
|
+
* **pb-search:** strip out the 'autocomplete-custom-template' parameter added by the autcomplete subcomponent ([12e1e5c](https://github.com/eeditiones/tei-publisher-components/commit/12e1e5c0cc09712b6e711a0422d387616f4f7e61))
|
|
34
|
+
* **pb-search,pb-paginate:** pb-search now keeps track of pagination position ([1700af0](https://github.com/eeditiones/tei-publisher-components/commit/1700af053dc0227de41bfcf6782014cf3d78c8fa))
|
|
35
|
+
* **pb-select:** use correct string function ([13ebfbb](https://github.com/eeditiones/tei-publisher-components/commit/13ebfbbbd9e49a0b5360c14744069a24e03729df))
|
|
36
|
+
* **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))
|
|
37
|
+
* **pb-select-feature:** update to mirror pb-toggle-feature ([9606688](https://github.com/eeditiones/tei-publisher-components/commit/96066880d4fafd99f7b629f7a1cf50695dfca62a))
|
|
38
|
+
* **pb-split-list,pb-table-grid:** update to support browser history ([1b72351](https://github.com/eeditiones/tei-publisher-components/commit/1b723516a97c15ce93a3dc308f397beb5983e51d))
|
|
39
|
+
* **pb-tabs:** update to support browser history ([e205279](https://github.com/eeditiones/tei-publisher-components/commit/e20527914037addd6a49040d79f76105c3202633))
|
|
40
|
+
* **pb-toggle-feature:** refactor for history support ([27d7638](https://github.com/eeditiones/tei-publisher-components/commit/27d7638c78bcfb62be9fb10a23001a373ab44cb8))
|
|
41
|
+
* **pb-view:** fix on-update ([814f4bb](https://github.com/eeditiones/tei-publisher-components/commit/814f4bbf08bd0bdb34c00782dbdd58fd6b607892))
|
|
42
|
+
* **pb-view:** ignore external params if property is specified as attribute ([77851d2](https://github.com/eeditiones/tei-publisher-components/commit/77851d2f038c97c1050b9dfa5fad79f517d37a02))
|
|
43
|
+
* **theming:** add polyfill for constructable stylesheets ([0056e94](https://github.com/eeditiones/tei-publisher-components/commit/0056e94bc29bd46b4c7183704b74a2f4ca12d9c9))
|
|
44
|
+
* **theming:** line endings ([cf029ed](https://github.com/eeditiones/tei-publisher-components/commit/cf029ede1490c283627ffef9a799e9d410ad5875))
|
|
45
|
+
* **urls:** improve warning message ([9832a53](https://github.com/eeditiones/tei-publisher-components/commit/9832a53150dd46f619b03dbf0d88b4b82c72b4f1))
|
|
46
|
+
* drop url-templates in favour of simpler mechanism ([d0f6d01](https://github.com/eeditiones/tei-publisher-components/commit/d0f6d01d920220147d53a70e511ede14ad4a2b7f))
|
|
47
|
+
* state should be saved by subscribed, not emitted channels ([1f93be9](https://github.com/eeditiones/tei-publisher-components/commit/1f93be9a19e6678e2e6f0f8d3fa57e1e2ae31a1f))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Code Refactoring
|
|
51
|
+
|
|
52
|
+
* **pb-mixin:** remove unused methods ([b21bfae](https://github.com/eeditiones/tei-publisher-components/commit/b21bfae717052167ac3e539216e4de20cc73ab57))
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Features
|
|
56
|
+
|
|
57
|
+
* **dts-client:** use URL registry ([cea7336](https://github.com/eeditiones/tei-publisher-components/commit/cea733680aaf3d52b9fc42445eca8d26bf0b1b86))
|
|
58
|
+
* **dts-select-endpoint:** use URL registry ([b6df38f](https://github.com/eeditiones/tei-publisher-components/commit/b6df38f4cb4064eb105a424ef9070d7ffd129eba))
|
|
59
|
+
* **pb-browse-docs:** use URL registry ([07a20ff](https://github.com/eeditiones/tei-publisher-components/commit/07a20ffd83e49468acfb62e3d93a8c3af4a9fc82))
|
|
60
|
+
* **pb-load:** use new URL registry ([5e8030d](https://github.com/eeditiones/tei-publisher-components/commit/5e8030de30d634ea37812b3731bf0f67f0b6ebe8))
|
|
61
|
+
* **pb-select-template:** use URL registry ([82fc98b](https://github.com/eeditiones/tei-publisher-components/commit/82fc98b85b42ec576a5b8e1bae3a5607b7567410))
|
|
62
|
+
* **pb-upload:** make the event emitted on finish configurable ([f1a0aca](https://github.com/eeditiones/tei-publisher-components/commit/f1a0aca552324ef972443c890ffa50d2372c1dcb))
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### BREAKING CHANGES
|
|
66
|
+
|
|
67
|
+
* **pb-mixin:** Several methods are no longer used since the
|
|
68
|
+
introduction of the URL registry.
|
|
69
|
+
|
|
70
|
+
- getParameterValues
|
|
71
|
+
- setParameter
|
|
72
|
+
- setParameters
|
|
73
|
+
- getParametersMatching
|
|
74
|
+
- setPath
|
|
75
|
+
- pushHistory
|
|
76
|
+
|
|
1
77
|
## [1.44.2](https://github.com/eeditiones/tei-publisher-components/compare/v1.44.1...v1.44.2) (2023-03-15)
|
|
2
78
|
|
|
3
79
|
|
package/dist/demo/demos.json
CHANGED
|
@@ -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"
|
|
@@ -41,6 +42,10 @@
|
|
|
41
42
|
"demo/pb-facsimile.html": "Demo",
|
|
42
43
|
"demo/pb-facsimile-2.html": "Align text page with facsimile"
|
|
43
44
|
},
|
|
45
|
+
"pb-image-strip": {
|
|
46
|
+
"demo/pb-image-strip-view.html": "Demo with pb-view",
|
|
47
|
+
"demo/pb-image-strip-standalone.html": "Standalone Demo"
|
|
48
|
+
},
|
|
44
49
|
"pb-grid": {
|
|
45
50
|
"demo/pb-grid.html": "Demo"
|
|
46
51
|
},
|
|
@@ -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-
|
|
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>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes" />
|
|
6
|
+
|
|
7
|
+
<title>pb-document Demo</title>
|
|
8
|
+
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@2.4.3/webcomponents-loader.js"></script><script type="module" src="../pb-components-bundle.js"></script>
|
|
9
|
+
</head>
|
|
10
|
+
|
|
11
|
+
<body>
|
|
12
|
+
<pb-demo-snippet>
|
|
13
|
+
<template>
|
|
14
|
+
<style type="text/css">
|
|
15
|
+
main {
|
|
16
|
+
display: grid;
|
|
17
|
+
grid-template-columns: 1fr 1fr;
|
|
18
|
+
}
|
|
19
|
+
pb-facsimile {
|
|
20
|
+
min-width: 50px;
|
|
21
|
+
height: 40vh;
|
|
22
|
+
--pb-facsimile-border: 4px solid rgba(0, 128, 90, 0.5);
|
|
23
|
+
display:block;
|
|
24
|
+
}
|
|
25
|
+
pb-image-strip {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: row;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
[slot="after"] {
|
|
31
|
+
margin-top: 5px;
|
|
32
|
+
padding-top: 10px;
|
|
33
|
+
border-top: 1px solid #606060;
|
|
34
|
+
}
|
|
35
|
+
[slot="before"] {
|
|
36
|
+
padding-bottom: 10px;
|
|
37
|
+
margin-bottom: 5px;
|
|
38
|
+
border-bottom: 1px solid #606060;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
<pb-page endpoint="https://teipublisher.com/exist/apps/tei-publisher">
|
|
42
|
+
<!-- Display facsimile -->
|
|
43
|
+
<main>
|
|
44
|
+
<div>
|
|
45
|
+
<pb-facsimile base-uri="https://apps.existsolutions.com/cantaloupe/iiif/2/"
|
|
46
|
+
default-zoom-level="0" show-navigator
|
|
47
|
+
show-navigation-control show-home-control show-rotation-control>
|
|
48
|
+
</pb-facsimile>
|
|
49
|
+
<div>
|
|
50
|
+
<pb-image-strip base-uri="https://apps.existsolutions.com/cantaloupe/iiif/2/"></pb-image-strip></h3>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<aside>
|
|
54
|
+
<ul>
|
|
55
|
+
<li>
|
|
56
|
+
<pb-facs-link order="3" facs="15929_000_IDL5772_BOss12034_IIIp79.jpg" label="a label">Page 79</pb-facs-link>, first page
|
|
57
|
+
</li>
|
|
58
|
+
<li>
|
|
59
|
+
<pb-facs-link order="2" facs="15929_000_IDL5772_BOss12034_IIIp80.jpg" label="the second">Page 80</pb-facs-link>
|
|
60
|
+
</li>
|
|
61
|
+
<li>
|
|
62
|
+
<pb-facs-link order="1" facs="15929_000_IDL5772_BOss12034_IIIp81.jpg" label="something">Page 81</pb-facs-link>
|
|
63
|
+
</li>
|
|
64
|
+
<li>
|
|
65
|
+
<pb-facs-link order="4" facs="15929_000_IDL5772_BOss12034_IIIp82.jpg" label="completely">Page 82</pb-facs-link>
|
|
66
|
+
</li>
|
|
67
|
+
<li>
|
|
68
|
+
<pb-facs-link order="5" facs="15929_000_IDL5772_BOss12034_IIIp82.jpg"
|
|
69
|
+
coordinates="[59,1796,429,1027]">Fragment on page 82</pb-facs-link>
|
|
70
|
+
</li>
|
|
71
|
+
<li>
|
|
72
|
+
<pb-facs-link facs="does-not-exist.jpg" label="completely">Missing image: hide viewer</pb-facs-link>
|
|
73
|
+
</li>
|
|
74
|
+
</ul>
|
|
75
|
+
</aside>
|
|
76
|
+
</main>
|
|
77
|
+
<script>
|
|
78
|
+
window.addEventListener('load', () => {
|
|
79
|
+
const viewer = document.querySelector('pb-facsimile');
|
|
80
|
+
window.pbEvents.subscribe('pb-facsimile-status', null, (ev) => {
|
|
81
|
+
if (ev.detail.status === 'fail') {
|
|
82
|
+
viewer.style.visibility = 'hidden';
|
|
83
|
+
} else {
|
|
84
|
+
viewer.style.visibility = 'visible';
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
</script>
|
|
89
|
+
</pb-page>
|
|
90
|
+
</template>
|
|
91
|
+
</pb-demo-snippet>
|
|
92
|
+
</body>
|
|
93
|
+
|
|
94
|
+
</html>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes" />
|
|
6
|
+
|
|
7
|
+
<title>pb-document Demo</title>
|
|
8
|
+
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@2.4.3/webcomponents-loader.js"></script><script type="module" src="../pb-components-bundle.js"></script>
|
|
9
|
+
</head>
|
|
10
|
+
|
|
11
|
+
<body>
|
|
12
|
+
<pb-demo-snippet>
|
|
13
|
+
<template>
|
|
14
|
+
<style type="text/css">
|
|
15
|
+
pb-page {
|
|
16
|
+
height: calc(100vh - 180px);
|
|
17
|
+
}
|
|
18
|
+
main {
|
|
19
|
+
display: grid;
|
|
20
|
+
grid-template-columns: auto auto;
|
|
21
|
+
grid-column-gap: 4rem;
|
|
22
|
+
height: calc(100vh - 360px);
|
|
23
|
+
}
|
|
24
|
+
pb-view {
|
|
25
|
+
overflow-y: auto;
|
|
26
|
+
}
|
|
27
|
+
pb-facsimile {
|
|
28
|
+
--pb-facsimile-border: 4px solid rgba(0, 128, 90, 0.5);
|
|
29
|
+
display: block;
|
|
30
|
+
}
|
|
31
|
+
pb-image-strip {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: row;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[slot="after"] {
|
|
37
|
+
margin-top: 5px;
|
|
38
|
+
padding-top: 10px;
|
|
39
|
+
border-top: 1px solid #606060;
|
|
40
|
+
}
|
|
41
|
+
[slot="before"] {
|
|
42
|
+
padding-bottom: 10px;
|
|
43
|
+
margin-bottom: 5px;
|
|
44
|
+
border-bottom: 1px solid #606060;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
47
|
+
<pb-page endpoint="https://teipublisher.com/exist/apps/tei-publisher">
|
|
48
|
+
<!-- Display facsimile -->
|
|
49
|
+
<pb-document id="document1" path="test/cortes_to_dantiscus.xml"></pb-document>
|
|
50
|
+
<main>
|
|
51
|
+
<pb-view id="view1" src="document1" view="single"
|
|
52
|
+
load-css="transform/dantiscus.css"
|
|
53
|
+
></pb-view>
|
|
54
|
+
<pb-facsimile base-uri="https://apps.existsolutions.com/cantaloupe/iiif/2/"
|
|
55
|
+
default-zoom-level="0" show-navigator
|
|
56
|
+
show-navigation-control show-home-control show-rotation-control>
|
|
57
|
+
<pb-image-strip slot="before" base-uri="https://apps.existsolutions.com/cantaloupe/iiif/2/"></pb-image-strip>
|
|
58
|
+
<div slot="after">Status: <span id="status"></span></div>
|
|
59
|
+
</pb-facsimile>
|
|
60
|
+
</main>
|
|
61
|
+
<script>
|
|
62
|
+
window.addEventListener('load', () => {
|
|
63
|
+
const viewer = document.querySelector('pb-facsimile');
|
|
64
|
+
const status = document.getElementById('status');
|
|
65
|
+
// only for debugging to check
|
|
66
|
+
// if events are fired in document order
|
|
67
|
+
// window.pbEvents.subscribe('pb-load-facsimile', null, (ev) => {
|
|
68
|
+
// const viewShadow = ev.target
|
|
69
|
+
// const links = Array.from(viewShadow.shadowRoot.querySelectorAll('pb-facs-link'))
|
|
70
|
+
// console.log(links)
|
|
71
|
+
// const source = ev.detail._source
|
|
72
|
+
// const facs = source.getAttribute('facs')
|
|
73
|
+
// const index = links.indexOf(source)
|
|
74
|
+
// console.log('pb-load-facsimile', source, index, facs, links)
|
|
75
|
+
// });
|
|
76
|
+
|
|
77
|
+
window.pbEvents.subscribe('pb-facsimile-status', null, (ev) => {
|
|
78
|
+
if (ev.detail.status === 'fail') {
|
|
79
|
+
viewer.style.visibility = 'hidden';
|
|
80
|
+
} else {
|
|
81
|
+
viewer.style.visibility = 'visible';
|
|
82
|
+
status.innerHTML = ev.detail.status;
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
</script>
|
|
87
|
+
</pb-page>
|
|
88
|
+
</template>
|
|
89
|
+
</pb-demo-snippet>
|
|
90
|
+
</body>
|
|
91
|
+
|
|
92
|
+
</html>
|
package/dist/demo/pb-load.html
CHANGED
|
@@ -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"
|
|
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>
|
|
@@ -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>
|
package/dist/demo/pb-tabs.html
CHANGED
|
@@ -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">
|
|
17
|
-
<paper-tab slot="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="
|
|
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="
|
|
64
|
+
<pb-toggle-feature name="translation" default="off"
|
|
65
65
|
properties-on='{"xpath": "//text[@type='translation']", "odd": "teipublisher", "nodeId": null, "view": "single"}'
|
|
66
66
|
properties-off='{"xpath": "//text[@type='source']", "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="
|
|
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="
|
|
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="
|
|
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>
|
package/dist/demo/pb-view.html
CHANGED
|
@@ -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>
|
package/dist/pb-code-editor.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as e,L as t,h as i,c as r}from"./pb-mixin-
|
|
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`
|