@teipublisher/pb-components 1.32.0 → 1.33.1
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 +37 -0
- package/dist/demo/demos.json +4 -1
- package/dist/demo/pb-timeline.html +122 -0
- package/dist/demo/pb-timeline2.html +94 -0
- package/dist/demo/timeline-dev-data.json +3 -0
- package/dist/pb-components-bundle.js +508 -252
- package/dist/pb-elements.json +275 -3
- package/dist/pb-leaflet-map.js +2 -2
- package/i18n/common/de.json +4 -0
- package/i18n/common/en.json +4 -0
- package/package.json +1 -1
- package/pb-elements.json +275 -3
- package/src/parse-date-service.js +266 -0
- package/src/pb-browse-docs.js +1 -0
- package/src/pb-components.js +1 -0
- package/src/pb-geolocation.js +12 -0
- package/src/pb-leaflet-map.js +45 -9
- package/src/pb-split-list.js +3 -3
- package/src/pb-timeline.js +741 -0
- package/src/search-result-service.js +521 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,40 @@
|
|
|
1
|
+
## [1.33.1](https://github.com/eeditiones/tei-publisher-components/compare/v1.33.0...v1.33.1) (2022-02-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **pb-timeline:** improve tooltip placement; show details for undated entries as well ([d1edea8](https://github.com/eeditiones/tei-publisher-components/commit/d1edea8e5833f9a641329974710016529ada59ec))
|
|
7
|
+
|
|
8
|
+
# [1.33.0](https://github.com/eeditiones/tei-publisher-components/compare/v1.32.2...v1.33.0) (2022-01-31)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **pb-timeline:** fix reported range ([fdbbc44](https://github.com/eeditiones/tei-publisher-components/commit/fdbbc445ede8a36631349e43ee6966804e03b819))
|
|
14
|
+
* **pb-timeline:** get timeline to work with facets ([71b3c4d](https://github.com/eeditiones/tei-publisher-components/commit/71b3c4da45c043f269e3114725370973180e2f44))
|
|
15
|
+
* **pb-timeline:** improve display, show current time range ([edc317e](https://github.com/eeditiones/tei-publisher-components/commit/edc317e7e880c2609b1df1f8156eb10d4e7851a1))
|
|
16
|
+
* **pb-timeline:** various fixes to support integration in publisher ([8fb1b7c](https://github.com/eeditiones/tei-publisher-components/commit/8fb1b7c63c3c33dda21b982310372590d0b55202))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* **pb-timeline:** show additional info in tooltip ([45dd690](https://github.com/eeditiones/tei-publisher-components/commit/45dd6907debc7c67db067eb6558304e3c6475972))
|
|
22
|
+
|
|
23
|
+
## [1.32.2](https://github.com/eeditiones/tei-publisher-components/compare/v1.32.1...v1.32.2) (2022-01-26)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* **pb-leaflet-map:** when clustering markers, make sure to zoom the map so the marker becomes visible - unless user defined a fixed zoom level ([2e44a9a](https://github.com/eeditiones/tei-publisher-components/commit/2e44a9a872b9c3030aa2776793625ff4dab13617))
|
|
29
|
+
|
|
30
|
+
## [1.32.1](https://github.com/eeditiones/tei-publisher-components/compare/v1.32.0...v1.32.1) (2022-01-25)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
* **pb-geolocation:** allow a desired zoom level to be passed in via pb-geolocation event ([e0054f8](https://github.com/eeditiones/tei-publisher-components/commit/e0054f89d9f08d1e1b5ee5dd712f0eb354225e1e))
|
|
36
|
+
* **pb-split-list:** allow categories to wrap around if screen is too small ([53fb84d](https://github.com/eeditiones/tei-publisher-components/commit/53fb84dc7087fb85665ec250c0e6c6ec2f343a87))
|
|
37
|
+
|
|
1
38
|
# [1.32.0](https://github.com/eeditiones/tei-publisher-components/compare/v1.31.0...v1.32.0) (2022-01-25)
|
|
2
39
|
|
|
3
40
|
|
package/dist/demo/demos.json
CHANGED
|
@@ -109,6 +109,9 @@
|
|
|
109
109
|
"pb-tabs": {
|
|
110
110
|
"demo/pb-tabs.html": "Demo"
|
|
111
111
|
},
|
|
112
|
+
"pb-timeline": {
|
|
113
|
+
"demo/pb-timeline.html": "Demo"
|
|
114
|
+
},
|
|
112
115
|
"pb-toggle-feature": {
|
|
113
116
|
"demo/pb-toggle-feature.html": "Server-side with pb-view",
|
|
114
117
|
"demo/pb-toggle-feature2.html": "Client-side",
|
|
@@ -155,4 +158,4 @@
|
|
|
155
158
|
"pb-custom-form": {
|
|
156
159
|
"demo/pb-custom-form.html": "Demo"
|
|
157
160
|
}
|
|
158
|
-
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
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-timeline Demo</title>
|
|
7
|
+
<link rel="stylesheet" href="demo.css">
|
|
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
|
+
|
|
10
|
+
<style>
|
|
11
|
+
main{
|
|
12
|
+
padding: 50px;
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
pb-timeline{
|
|
16
|
+
padding: 2rem 0;
|
|
17
|
+
}
|
|
18
|
+
#start, #end, #scope{
|
|
19
|
+
display: block;
|
|
20
|
+
margin-bottom: 1rem;
|
|
21
|
+
}
|
|
22
|
+
.wraptl{
|
|
23
|
+
max-width: 60vw;
|
|
24
|
+
overflow-y:hidden;
|
|
25
|
+
overflow-x:auto;
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
28
|
+
</head>
|
|
29
|
+
|
|
30
|
+
<body>
|
|
31
|
+
<main>
|
|
32
|
+
<h1>Timeline Demo</h1>
|
|
33
|
+
<!--
|
|
34
|
+
<pb-demo-snippet>
|
|
35
|
+
<template>
|
|
36
|
+
-->
|
|
37
|
+
|
|
38
|
+
<label for="start">Start Date</label>
|
|
39
|
+
<input id="start" type="date" value="1891-05-18">
|
|
40
|
+
<label for="end">End Date</label>
|
|
41
|
+
<input id="end" type="date" value="1978-01-01">
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
<label for="scope">Scope</label>
|
|
45
|
+
<select id="scope">
|
|
46
|
+
<option value="D">Day</option>
|
|
47
|
+
<option value="W">Week</option>
|
|
48
|
+
<option value="M">Month</option>
|
|
49
|
+
<option value="Y" selected="selected">Year</option>
|
|
50
|
+
<option value="5Y">5 Years</option>
|
|
51
|
+
<option value="10Y">10 Years</option>
|
|
52
|
+
</select>
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
<div class="wraptl">
|
|
56
|
+
<pb-timeline scope="Y" auto
|
|
57
|
+
start-date="1891-05-18"
|
|
58
|
+
end-date="1978-01-01"
|
|
59
|
+
url="./timeline-dev-data.json"
|
|
60
|
+
resettable></pb-timeline>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<!-- <textarea id="logs"></textarea>-->
|
|
64
|
+
<!--
|
|
65
|
+
|
|
66
|
+
</template>
|
|
67
|
+
</pb-demo-snippet>
|
|
68
|
+
-->
|
|
69
|
+
|
|
70
|
+
</main>
|
|
71
|
+
</body>
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
<script type="module">
|
|
75
|
+
// import { jsonDataDev } from './timeline-dev-data.js';
|
|
76
|
+
import {SearchResultService} from "../src/search-result-service.js";
|
|
77
|
+
|
|
78
|
+
/*
|
|
79
|
+
const jsonData = jsonDataDev;
|
|
80
|
+
|
|
81
|
+
const dispatchPbTimelineDataLoadedEvent = (jsonData) => {
|
|
82
|
+
document.dispatchEvent(new CustomEvent('pb-timeline-data-loaded', {
|
|
83
|
+
bubbles: true,
|
|
84
|
+
detail: {
|
|
85
|
+
jsonData: jsonData,
|
|
86
|
+
}
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
document.addEventListener("DOMContentLoaded", () => {
|
|
92
|
+
// initDevControls();
|
|
93
|
+
|
|
94
|
+
const startInput = document.getElementById('start');
|
|
95
|
+
startInput.addEventListener('input', (e)=>{
|
|
96
|
+
const val = e.target.value;
|
|
97
|
+
const tl = document.querySelector('pb-timeline').startDate = val;
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
const endInput = document.getElementById('end');
|
|
101
|
+
endInput.addEventListener('input', (e)=>{
|
|
102
|
+
const val = e.target.value;
|
|
103
|
+
const tl = document.querySelector('pb-timeline').endDate = val;
|
|
104
|
+
});
|
|
105
|
+
const select = document.getElementById('scope');
|
|
106
|
+
select.addEventListener('change', (e)=>{
|
|
107
|
+
console.log('scope changed')
|
|
108
|
+
const val = e.target.value;
|
|
109
|
+
const tl = document.querySelector('pb-timeline').scope = val;
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
document.addEventListener('pb-timeline-date-changed', (e) =>{
|
|
113
|
+
console.log('date changed ', e.detail.date);
|
|
114
|
+
});
|
|
115
|
+
document.addEventListener('pb-timeline-daterange-changed', (e) =>{
|
|
116
|
+
console.log('daterange changed ', e.detail.startDateStr, e.detail.endDateStr);
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
</script>
|
|
122
|
+
</html>
|
|
@@ -0,0 +1,94 @@
|
|
|
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-timeline Demo</title>
|
|
7
|
+
<link rel="stylesheet" href="demo.css">
|
|
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
|
+
|
|
10
|
+
<style>
|
|
11
|
+
main{
|
|
12
|
+
padding: 50px;
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
pb-timeline{
|
|
16
|
+
padding: 2rem 0;
|
|
17
|
+
width: 100%;
|
|
18
|
+
}
|
|
19
|
+
#start, #end, #scope{
|
|
20
|
+
display: block;
|
|
21
|
+
margin-bottom: 1rem;
|
|
22
|
+
}
|
|
23
|
+
.wraptl{
|
|
24
|
+
max-width: 60vw;
|
|
25
|
+
overflow-y:hidden;
|
|
26
|
+
overflow-x:auto;
|
|
27
|
+
}
|
|
28
|
+
</style>
|
|
29
|
+
</head>
|
|
30
|
+
|
|
31
|
+
<body>
|
|
32
|
+
<main>
|
|
33
|
+
<h1>Timeline Demo</h1>
|
|
34
|
+
<!--
|
|
35
|
+
<pb-demo-snippet>
|
|
36
|
+
<template>
|
|
37
|
+
-->
|
|
38
|
+
<pb-page endpoint="https://teipublisher.com/exist/apps/tei-publisher">
|
|
39
|
+
<pb-login id="login" group="tei"></pb-login>
|
|
40
|
+
|
|
41
|
+
<label for="start">Start Date</label>
|
|
42
|
+
<input id="start" type="date" value="1891-05-18">
|
|
43
|
+
<label for="end">End Date</label>
|
|
44
|
+
<input id="end" type="date" value="1978-01-01">
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
<label for="scope">Scope</label>
|
|
48
|
+
<select id="scope">
|
|
49
|
+
<option value="D">Day</option>
|
|
50
|
+
<option value="W">Week</option>
|
|
51
|
+
<option value="M">Month</option>
|
|
52
|
+
<option value="Y" selected="selected">Year</option>
|
|
53
|
+
<option value="5Y">5 Years</option>
|
|
54
|
+
<option value="10Y">10 Years</option>
|
|
55
|
+
</select>
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
<div class="wraptl">
|
|
59
|
+
<pb-timeline scope="10Y"
|
|
60
|
+
start-date="1438-01-13"
|
|
61
|
+
end-date="2020-02-01"
|
|
62
|
+
subscribe="docs" emit="docs"
|
|
63
|
+
url="api/search/timeline"></pb-timeline>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<pb-browse-docs id="document-list" fix-links login="login"
|
|
67
|
+
collection="test"
|
|
68
|
+
sort-options='[{"label": "browse.title", "value": "title"},{"label": "browse.author", "value": "author"},{"label": "browse.modificationDate", "value": "default"}]'
|
|
69
|
+
sort-by="title"
|
|
70
|
+
filter-options='[{"label": "browse.title", "value": "title"},{"label": "browse.author", "value": "author"},{"label": "browse.file", "value": "file"}]'
|
|
71
|
+
filter-by="title" auto="auto" history="history" emit="docs" subscribe="docs">
|
|
72
|
+
<pb-paginate slot="toolbar" id="paginate" per-page="10" range="5"
|
|
73
|
+
emit="docs" subscribe="docs"></pb-paginate>
|
|
74
|
+
</pb-browse-docs>
|
|
75
|
+
</pb-page>
|
|
76
|
+
|
|
77
|
+
<!-- <textarea id="logs"></textarea>-->
|
|
78
|
+
<!--
|
|
79
|
+
|
|
80
|
+
</template>
|
|
81
|
+
</pb-demo-snippet>
|
|
82
|
+
-->
|
|
83
|
+
|
|
84
|
+
</main>
|
|
85
|
+
</body>
|
|
86
|
+
|
|
87
|
+
<script>
|
|
88
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
89
|
+
pbEvents.subscribe('pb-timeline-daterange-changed', 'docs', (ev) => {
|
|
90
|
+
console.log(ev.detail);
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
</script>
|
|
94
|
+
</html>
|