@teipublisher/pb-components 1.24.18 → 1.26.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.
@@ -13,15 +13,12 @@ on:
13
13
  jobs:
14
14
  build:
15
15
  runs-on: ubuntu-latest
16
- strategy:
17
- matrix:
18
- node-version: [10.x, 12.x, 14.x]
19
16
  steps:
20
17
  - uses: actions/checkout@v2
21
- - name: Use Node.js ${{ matrix.node-version }}
18
+ - name: Use Node.js 14.x
22
19
  uses: actions/setup-node@v1
23
20
  with:
24
- node-version: ${{ matrix.node-version }}
21
+ node-version: "14.x"
25
22
  - name: npm install and build
26
23
  run:
27
24
  npm ci
@@ -30,5 +27,9 @@ jobs:
30
27
  run: docker build -t exist-db -f Dockerfile .
31
28
  - name: Start docker image
32
29
  run: docker run --publish 8080:8080 --detach exist-db
30
+ - name: Wait for eXist
31
+ uses: iFaxity/wait-on-action@v1
32
+ with:
33
+ resource: http-get://localhost:8080/exist/apps/tei-publisher/index.html
33
34
  - name: npm test
34
35
  run: npm test
@@ -22,6 +22,10 @@ jobs:
22
22
  run: docker build -t exist-db -f Dockerfile .
23
23
  - name: Start docker image
24
24
  run: docker run --publish 8080:8080 --detach exist-db
25
+ - name: Wait for eXist
26
+ uses: iFaxity/wait-on-action@v1
27
+ with:
28
+ resource: http-get://localhost:8080/exist/apps/tei-publisher/index.html
25
29
  - run: npm test
26
30
  - run: npx semantic-release
27
31
  env:
package/CHANGELOG.md CHANGED
@@ -1,3 +1,32 @@
1
+ # [1.26.0](https://github.com/eeditiones/tei-publisher-components/compare/v1.25.0...v1.26.0) (2021-10-29)
2
+
3
+
4
+ ### Features
5
+
6
+ * **pb-authority-lookup:** new connector for Georg Fischer AG Konzernarchiv ([b66b1b4](https://github.com/eeditiones/tei-publisher-components/commit/b66b1b46beefc9dfd12193aed643693891eb6047))
7
+
8
+ # [1.25.0](https://github.com/eeditiones/tei-publisher-components/compare/v1.24.20...v1.25.0) (2021-10-05)
9
+
10
+
11
+ ### Features
12
+
13
+ * **dts-client:** support navigation to parent collection ([5985a70](https://github.com/eeditiones/tei-publisher-components/commit/5985a70253ac9f9b0f512a528b12e36178ea6413))
14
+
15
+ ## [1.24.20](https://github.com/eeditiones/tei-publisher-components/compare/v1.24.19...v1.24.20) (2021-10-04)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **pb-load:** correctly pass initial language set if use-language is true ([a759e24](https://github.com/eeditiones/tei-publisher-components/commit/a759e248d2de18b143a89d5327f18299f07f2c71))
21
+
22
+ ## [1.24.19](https://github.com/eeditiones/tei-publisher-components/compare/v1.24.18...v1.24.19) (2021-09-16)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * rename pb-kwic-results to pb-blacklab-results and pb-kwic-highlight to pb-blacklab-highlight ([3e85fa5](https://github.com/eeditiones/tei-publisher-components/commit/3e85fa5427765f2c72840df183059ed7155c296d))
28
+ * **pb-view-annotate:** avoid exception if data-type attribut is missing on an element ([41f0ab0](https://github.com/eeditiones/tei-publisher-components/commit/41f0ab0e946698179b2aceb904fa21255e8b8934))
29
+
1
30
  ## [1.24.18](https://github.com/eeditiones/tei-publisher-components/compare/v1.24.17...v1.24.18) (2021-08-10)
2
31
 
3
32
 
package/Dockerfile CHANGED
@@ -31,30 +31,14 @@ RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
31
31
 
32
32
  FROM builder as tei
33
33
 
34
- ARG TEMPLATING_VERSION=v1.0.2
35
- ARG PUBLISHER_LIB_VERSION=v2.9.0
36
- ARG ROUTER_VERSION=v0.5.1
34
+ ARG TEMPLATING_VERSION=1.0.2
35
+ ARG PUBLISHER_LIB_VERSION=2.9.0
36
+ ARG ROUTER_VERSION=0.5.1
37
37
  ARG PUBLISHER_VERSION=master
38
38
 
39
39
  # add key
40
40
  RUN mkdir -p ~/.ssh && ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
41
41
 
42
- RUN git clone https://github.com/eXist-db/templating.git \
43
- && cd templating \
44
- && git checkout ${TEMPLATING_VERSION} \
45
- && npm start
46
-
47
- # Build tei-publisher-lib
48
- RUN git clone https://github.com/eeditiones/tei-publisher-lib.git \
49
- && cd tei-publisher-lib \
50
- && git checkout ${PUBLISHER_LIB_VERSION} \
51
- && ant
52
-
53
- RUN git clone https://github.com/eeditiones/roaster.git \
54
- && cd roaster \
55
- && git checkout ${ROUTER_VERSION} \
56
- && ant
57
-
58
42
  # Build tei-publisher-app
59
43
  RUN git clone https://github.com/eeditiones/tei-publisher-app.git \
60
44
  && cd tei-publisher-app \
@@ -71,12 +55,14 @@ COPY i18n/common/* resources/i18n/common/
71
55
 
72
56
  RUN ant
73
57
 
58
+ RUN curl -L -o /tmp/oas-router-${ROUTER_VERSION}.xar http://exist-db.org/exist/apps/public-repo/public/oas-router-${ROUTER_VERSION}.xar
59
+ RUN curl -L -o /tmp/tei-publisher-lib-${PUBLISHER_LIB_VERSION}.xar http://exist-db.org/exist/apps/public-repo/public/tei-publisher-lib-${PUBLISHER_LIB_VERSION}.xar
60
+ RUN curl -L -o /tmp/templating-${TEMPLATING_VERSION}.xar http://exist-db.org/exist/apps/public-repo/public/templating-${TEMPLATING_VERSION}.xar
61
+
74
62
  FROM existdb/existdb:${EXIST_VERSION}
75
63
 
76
- COPY --from=tei /tmp/templating/templating-*.xar /exist/autodeploy
77
- COPY --from=tei /tmp/tei-publisher-lib/build/*.xar /exist/autodeploy
78
- COPY --from=tei /tmp/roaster/build/*.xar /exist/autodeploy
79
- COPY --from=tei /tmp/tei-publisher-app/build/*.xar /exist/autodeploy
64
+ COPY --from=tei /tmp/tei-publisher-app/build/*.xar /exist/autodeploy/
65
+ COPY --from=tei /tmp/*.xar /exist/autodeploy/
80
66
 
81
67
  ENV DATA_DIR /exist-data
82
68
 
package/README.md CHANGED
@@ -61,8 +61,20 @@ Run `npm run build:production` to generate the set of bundle files in `dist`, co
61
61
 
62
62
  ## Development
63
63
 
64
- For development, run `npm start` as described above. It will open a browser window and watch for file changes.
64
+ For development, run `npm start` as described above. It will start a development server (on port 8000 by default), open a browser window and watch for file changes. Every component should have a demo to show its functionality.
65
65
 
66
- To regenerate the API documentation, run `npm run docs`.
66
+ You can configure TEI Publisher (or an app generated from it) to load components from the development server. This allows you to directly test changes you made to components within the full TEI Publisher environment.
67
67
 
68
- Every component should have a demo to show its functionality.
68
+ In TEI Publisher, open `modules/config.xqm` and change variable `$config:webcomponents` to the value *dev*. Below, the variable `$config:webcomponents-cdn` should be set to `http://localhost:8000`:
69
+
70
+ ```xquery
71
+ declare variable $config:webcomponents := "dev";
72
+
73
+ declare variable $config:webcomponents-cdn := "http://localhost:8000";
74
+ ```
75
+
76
+ After reloading TEI Publisher in the browser, components should be loaded from your local development server.
77
+
78
+ ## Building Documentation
79
+
80
+ To regenerate the API documentation, run `npm run docs`.
@@ -148,4 +148,4 @@
148
148
  "pb-formula": {
149
149
  "demo/pb-formula.html": "Demo"
150
150
  }
151
- }
151
+ }
@@ -0,0 +1,79 @@
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
+ #view1 {
19
+ height: 70vh;
20
+ overflow: auto;
21
+ display: flex;
22
+ justify-content: center;
23
+ margin-left: auto;
24
+ margin-right: auto;
25
+ }
26
+
27
+ @media (min-width: 769px) {
28
+ #view1, footer {
29
+ max-width: 60vw;
30
+ }
31
+ }
32
+
33
+ footer {
34
+ position: relative;
35
+ margin-top: 10px;
36
+ bottom: 0;
37
+ background-color: #f2f2f2;
38
+ margin-left: auto;
39
+ margin-right: auto;
40
+ }
41
+
42
+ pb-navigation[disabled] {
43
+ display: block;
44
+ visibility: hidden;
45
+ }
46
+
47
+ pb-navigation[direction="forward"] {
48
+ float: right;
49
+ }
50
+ </style>
51
+ <pb-page endpoint="https://teipublisher.com/exist/apps/tei-publisher">
52
+ <pb-document id="document1" path="A01775.xml"></pb-document>
53
+ <pb-blacklab-highlight view="view1"></pb-blacklab-highlight>
54
+ <!-- <pb-progress subscribe="transcription"></pb-progress>-->
55
+ <!--
56
+ <pb-view id="view1" src="document1" view="page" append-footnotes animation
57
+ subscribe="transcription" emit="transcription"></pb-view>
58
+ -->
59
+ <pb-view id="view1" src="document1" view="page" append-footnotes animation></pb-view>
60
+ <footer>
61
+ <!-- Navigate to next page -->
62
+ <pb-navigation direction="forward" keyboard="right" subscribe="transcription" emit="transcription">
63
+ <paper-button>
64
+ <iron-icon icon="icons:chevron-right"></iron-icon>
65
+ </paper-button>
66
+ </pb-navigation>
67
+ <!-- Navigate to previous page -->
68
+ <pb-navigation direction="backward" keyboard="left" subscribe="transcription" emit="transcription">
69
+ <paper-button>
70
+ <iron-icon icon="icons:chevron-left"></iron-icon>
71
+ </paper-button>
72
+ </pb-navigation>
73
+ </footer>
74
+ </pb-page>
75
+ </template>
76
+ </pb-demo-snippet>
77
+
78
+ </body>
79
+ </html>
@@ -0,0 +1,235 @@
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-link 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
+ <style>
10
+ @import url(https://fonts.googleapis.com/css2?family=Montserrat:wght@100&display=swap);
11
+
12
+ html {
13
+ font-family: Montserrat, Verdana, sans-serif;
14
+ }
15
+ </style>
16
+ </head>
17
+
18
+ <body>
19
+ <pb-demo-snippet>
20
+ <template>
21
+ <style>
22
+ @import url(https://fonts.googleapis.com/css2?family=Montserrat:wght@100)
23
+
24
+ html {
25
+ font-family: Montserrat, Verdana, sans-serif;
26
+ }
27
+
28
+ h1 {
29
+ text-align: center;
30
+ }
31
+
32
+ header {
33
+ border-bottom: thin solid;
34
+ padding-bottom: 2rem;
35
+ background: #d1dae0;
36
+ padding:5rem;
37
+ }
38
+
39
+
40
+ .formRow {
41
+ display: grid;
42
+ grid-template-columns: 40% 60%;
43
+ width: 100%;
44
+ padding-bottom:0.3rem;
45
+ }
46
+
47
+ ul {
48
+ flex: 1 0;
49
+ display: block;
50
+ margin-right: 10px;
51
+ padding-right: 10px;
52
+ border-right: 1px solid #333333;
53
+ }
54
+
55
+ pb-view {
56
+ height: 70vh;
57
+ overflow: auto;
58
+ flex: 3 0;
59
+ }
60
+
61
+ pb-link a {
62
+ color: #333333;
63
+ text-decoration: none;
64
+ }
65
+
66
+ section.inputs label {
67
+ white-space: nowrap;
68
+ }
69
+
70
+
71
+ .formRow {
72
+ display: grid;
73
+ grid-template-columns:50% 50%;
74
+ font-size:0.7rem;
75
+
76
+
77
+ }
78
+ .formRow label{
79
+ justify-self:flex-end;
80
+ padding-right:1rem;
81
+ }
82
+ .formRow select, .formRow input{
83
+ max-width:140px;
84
+ width:140px;
85
+ border:none;
86
+ padding:0;
87
+ background:rgba(255,255,255,0.8);
88
+ }
89
+
90
+ #pattern {
91
+ width:inherit;
92
+ max-width: 400px;
93
+ margin: 0 auto;
94
+ font-size: 1.1rem;
95
+ font-weight:400;
96
+ padding: 0.3rem 0.5rem 0.3rem 2rem;
97
+ border-radius: 1.1rem;
98
+ border: none
99
+
100
+ }
101
+ pb-blacklab-results{
102
+ padding:3rem;
103
+ max-width:100%;
104
+ }
105
+
106
+
107
+ .search, .search input {
108
+ font-size: 1.2rem;
109
+ text-align: center;
110
+ }
111
+
112
+ .searchwrapper {
113
+ width: 100%;
114
+ text-align: center;
115
+ margin-bottom: 1rem;
116
+
117
+ }
118
+
119
+ #perpage {
120
+ text-align: center;
121
+ width: 3rem;
122
+ } </style>
123
+
124
+ <header>
125
+ <h1>Blacklab KWIC search</h1>
126
+
127
+ <div class="searchwrapper">
128
+ <input id="pattern" name="pattern" type="search"/>
129
+ </div>
130
+
131
+ <div class="formRow">
132
+ <label for="doc">Filter</label>
133
+ <input id="doc" name="doc"/>
134
+ </div>
135
+
136
+ <div class="formRow">
137
+ <label for="sort">Sort by</label>
138
+ <select name="sort" id="sort" size="1">
139
+ <option>title</option>
140
+ <option>author</option>
141
+ <option>numHits</option>
142
+ </select>
143
+ </div>
144
+
145
+
146
+ <div class="formRow perpage">
147
+ <label for="perpage">Results per Page</label>
148
+ <input id="perpage" name="perpage" type="number" value="5"/>
149
+ </div>
150
+
151
+
152
+ </header>
153
+ <!--
154
+ <section class="inputs">
155
+
156
+ <div class="formRow search">
157
+ </div>
158
+
159
+ <div class="formRow">
160
+ <label for="sort">Sort by</label>
161
+ <select name="sort" id="sort" size="1">
162
+ <option>title</option>
163
+ <option>author</option>
164
+ <option>numHits</option>
165
+ </select>
166
+ </div>
167
+
168
+ <div class="formRow">
169
+ <label for="doc">filter:</label>
170
+ <input id="doc" name="doc">
171
+ </div>
172
+
173
+ <div class="formRow">
174
+ <label for="perpage">Results per Page:</label>
175
+ <input id="perpage" name="perpage" type="number" value="5">
176
+ </div>
177
+
178
+ </section>
179
+ -->
180
+
181
+
182
+ <pb-page endpoint="https://teipublisher.com/exist/apps/tei-publisher">
183
+ <main>
184
+ <pb-blacklab-results per-page="5" pattern='[word="love"][word="by"]' path="data"></pb-blacklab-results>
185
+ </main>
186
+ </pb-page>
187
+ </template>
188
+ </pb-demo-snippet>
189
+ </body>
190
+
191
+ <script>
192
+ (function () {
193
+ document.addEventListener('pb-page-ready', () => {
194
+ const kwic = document.querySelector('pb-blacklab-results');
195
+ const pat = '[word="love"][word="by"]';
196
+ kwic.pattern = pat;
197
+
198
+ const pattern = document.querySelector('#pattern');
199
+ pattern.value = kwic.pattern;
200
+
201
+ document.querySelector('#doc').addEventListener('blur', (e) => {
202
+ kwic.doc = e.target.value;
203
+ kwic.load();
204
+ });
205
+
206
+ document.querySelector('#sort').addEventListener('change',(e) => {
207
+ kwic.sort = e.target.value;
208
+ kwic.load();
209
+ });
210
+
211
+ document.querySelector('#pattern').addEventListener('keyup', (e) => {
212
+ if(e.keyCode === 13){
213
+ localStorage.setItem('kwic-pattern', e.target.value);
214
+ kwic.pattern = e.target.value;
215
+ kwic.load();
216
+ }
217
+ });
218
+ document.querySelector('#pattern').addEventListener('blur', (e) => {
219
+ localStorage.setItem('kwic-pattern', e.target.value);
220
+ kwic.pattern = e.target.value;
221
+ kwic.load();
222
+ });
223
+
224
+ document.querySelector('#perpage').addEventListener('blur', (e) => {
225
+ kwic.perPage = e.target.value;
226
+ kwic.load();
227
+ });
228
+
229
+ });
230
+
231
+ })();
232
+
233
+ </script>
234
+
235
+ </html>
@@ -1,4 +1,4 @@
1
- import{P as e,h as t,d as i}from"./paper-checkbox-0d3362f7.js";
1
+ import{P as e,h as t,d as i}from"./paper-checkbox-ea000977.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
@@ -1,4 +1,4 @@
1
- import{d as e,L as t,N as i,A as n}from"./pb-mixin-57ecea84.js";
1
+ import{d as e,L as t,N as i,A as n}from"./pb-mixin-ae9e2885.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.