@teipublisher/pb-components 1.34.3 → 1.35.2

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 CHANGED
@@ -1,3 +1,29 @@
1
+ ## [1.35.2](https://github.com/eeditiones/tei-publisher-components/compare/v1.35.1...v1.35.2) (2022-02-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **pb-view:** add option 'no-scroll' to disable automatic scrolling of content to hash target ([0b1737f](https://github.com/eeditiones/tei-publisher-components/commit/0b1737fef77ff7c234c6f1a5746fe13f89070a07))
7
+
8
+ ## [1.35.1](https://github.com/eeditiones/tei-publisher-components/compare/v1.35.0...v1.35.1) (2022-02-26)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **pb-search:** add option to disable autocomplete ([18be531](https://github.com/eeditiones/tei-publisher-components/commit/18be53150f23fe97322b3b9dedefbdb4fe9dbf5b))
14
+
15
+ # [1.35.0](https://github.com/eeditiones/tei-publisher-components/compare/v1.34.3...v1.35.0) (2022-02-24)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **pb-view:** allow 'xpath' to be specified in 'pb-refresh' event ([5375710](https://github.com/eeditiones/tei-publisher-components/commit/5375710251861fa767502ecdf8e9769acb306766))
21
+
22
+
23
+ ### Features
24
+
25
+ * **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))
26
+
1
27
  ## [1.34.3](https://github.com/eeditiones/tei-publisher-components/compare/v1.34.2...v1.34.3) (2022-02-23)
2
28
 
3
29
 
@@ -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>