@teipublisher/pb-components 1.34.2 → 1.35.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 +26 -0
- package/dist/demo/demos.json +2 -1
- package/dist/demo/pb-autocomplete.html +2 -0
- package/dist/demo/pb-autocomplete3.html +35 -0
- package/dist/pb-components-bundle.js +28 -24
- package/dist/pb-elements.json +45 -0
- package/package.json +1 -1
- package/pb-elements.json +45 -0
- package/src/pb-autocomplete.js +99 -27
- package/src/pb-search.js +9 -2
- package/src/pb-view.js +17 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
## [1.35.1](https://github.com/eeditiones/tei-publisher-components/compare/v1.35.0...v1.35.1) (2022-02-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **pb-search:** add option to disable autocomplete ([18be531](https://github.com/eeditiones/tei-publisher-components/commit/18be53150f23fe97322b3b9dedefbdb4fe9dbf5b))
|
|
7
|
+
|
|
8
|
+
# [1.35.0](https://github.com/eeditiones/tei-publisher-components/compare/v1.34.3...v1.35.0) (2022-02-24)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **pb-view:** allow 'xpath' to be specified in 'pb-refresh' event ([5375710](https://github.com/eeditiones/tei-publisher-components/commit/5375710251861fa767502ecdf8e9769acb306766))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* **pb-autocomplete:** add 'preload' property to preload entire list of possible suggestions once during initialization ([447dfcb](https://github.com/eeditiones/tei-publisher-components/commit/447dfcbf6963cbcdb631ce84993b2f3a5cdd3280))
|
|
19
|
+
|
|
20
|
+
## [1.34.3](https://github.com/eeditiones/tei-publisher-components/compare/v1.34.2...v1.34.3) (2022-02-23)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* **pb-view:** add CSS property --pb-view-scroll-margin-top to control scrolling offset for all elements being a potential link target ([9b836b9](https://github.com/eeditiones/tei-publisher-components/commit/9b836b9dce7ae6cba6c6b49ddc9484e7bc6a141a))
|
|
26
|
+
|
|
1
27
|
## [1.34.2](https://github.com/eeditiones/tei-publisher-components/compare/v1.34.1...v1.34.2) (2022-02-22)
|
|
2
28
|
|
|
3
29
|
|
package/dist/demo/demos.json
CHANGED
|
@@ -138,7 +138,8 @@
|
|
|
138
138
|
},
|
|
139
139
|
"pb-autocomplete": {
|
|
140
140
|
"demo/pb-autocomplete.html": "Demo",
|
|
141
|
-
"demo/pb-autocomplete2.html": "Search with autocomplete"
|
|
141
|
+
"demo/pb-autocomplete2.html": "Search with autocomplete",
|
|
142
|
+
"demo/pb-autocomplete3.html": "Preloaded, static autocomplete list"
|
|
142
143
|
},
|
|
143
144
|
"pb-select": {
|
|
144
145
|
"demo/pb-select.html": "Demo",
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
<h2>Suggestion list supplied by remote XQuery</h2>
|
|
24
24
|
<!--pb-autocomplete name="autocomplete2" placeholder="query" source="modules/autocomplete.xql"></pb-autocomplete-->
|
|
25
25
|
<pb-autocomplete name="autocomplete2" placeholder="query" source="api/search/autocomplete"></pb-autocomplete>
|
|
26
|
+
<h2>Static remote suggestion list loaded once upon initialization</h2>
|
|
27
|
+
<pb-autocomplete name="autocomplete3" placeholder="language" source="demo/select.json" preload></pb-autocomplete>
|
|
26
28
|
<h2>Combine with other form fields whose value is passed on</h2>
|
|
27
29
|
<!--pb-autocomplete name="autocomplete3" placeholder="query" source="modules/autocomplete.xql"-->
|
|
28
30
|
<pb-autocomplete name="autocomplete3" placeholder="query" source="api/search/autocomplete">
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<title>Using pb-autocomplete</title>
|
|
4
|
+
<style>
|
|
5
|
+
pb-autocomplete {
|
|
6
|
+
margin-bottom: 20px;
|
|
7
|
+
}
|
|
8
|
+
select {
|
|
9
|
+
margin-right: 10px;
|
|
10
|
+
}
|
|
11
|
+
</style>
|
|
12
|
+
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@2.4.3/webcomponents-loader.js"></script><script type="module" src="../pb-components-bundle.js"></script>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<h1>Using pb-autocomplete</h1>
|
|
16
|
+
|
|
17
|
+
<pb-demo-snippet>
|
|
18
|
+
<template>
|
|
19
|
+
<pb-page>
|
|
20
|
+
<form action="" id="form">
|
|
21
|
+
<h2>Static remote suggestion list loaded once upon initialization</h2>
|
|
22
|
+
<pb-autocomplete name="autocomplete3" placeholder="language" source="select.json" preload substring></pb-autocomplete>
|
|
23
|
+
<p>Selected: <span id="selected"></span></p>
|
|
24
|
+
</pb-page>
|
|
25
|
+
<script>
|
|
26
|
+
window.addEventListener('WebComponentsReady', () => {
|
|
27
|
+
pbEvents.subscribe('pb-autocomplete-selected', null, (ev) => {
|
|
28
|
+
document.getElementById('selected').innerHTML = `${ev.detail.value } = ${ ev.detail.text}`;
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
</script>
|
|
32
|
+
</template>
|
|
33
|
+
</pb-demo-snippet>
|
|
34
|
+
</body>
|
|
35
|
+
</html>
|