@cu-mkp/editioncrafter 1.0.2 → 1.0.4-beta.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/README.md +7 -7
- package/dist/editioncrafter.js +65802 -0
- package/dist/editioncrafter.umd.cjs +553 -0
- package/dist/es/src/action/DiplomaticActions.js +9 -11
- package/dist/es/src/action/DocumentActions.js +164 -154
- package/dist/es/src/action/GlossaryActions.js +9 -11
- package/dist/es/src/action/initialState/diplomaticInitialState.js +2 -2
- package/dist/es/src/action/initialState/documentInitialState.js +9 -12
- package/dist/es/src/action/initialState/glossaryInitialState.js +3 -3
- package/dist/es/src/action/rootReducer.js +31 -29
- package/dist/es/src/component/AlphabetLinks.js +44 -66
- package/dist/es/src/component/CustomizedTooltops.js +101 -110
- package/dist/es/src/component/DiploMatic.js +64 -91
- package/dist/es/src/component/DocumentView.js +442 -366
- package/dist/es/src/component/EditorComment.js +51 -75
- package/dist/es/src/component/ErrorBoundary.js +37 -61
- package/dist/es/src/component/FigureImage.js +56 -67
- package/dist/es/src/component/GlossaryView.js +157 -149
- package/dist/es/src/component/HelpPopper.js +96 -78
- package/dist/es/src/component/ImageGridView.js +184 -249
- package/dist/es/src/component/ImageView.js +155 -165
- package/dist/es/src/component/ImageZoomControl.js +19 -38
- package/dist/es/src/component/JumpToFolio.js +56 -60
- package/dist/es/src/component/Navigation.js +374 -328
- package/dist/es/src/component/Pagination.js +73 -70
- package/dist/es/src/component/Parser.js +11 -32
- package/dist/es/src/component/RingSpinner.js +31 -32
- package/dist/es/src/component/RouteListener.js +30 -21
- package/dist/es/src/component/SeaDragonComponent.js +33 -56
- package/dist/es/src/component/SinglePaneView.js +15 -33
- package/dist/es/src/component/SplitPaneView.js +151 -170
- package/dist/es/src/component/TranscriptionView.js +190 -179
- package/dist/es/src/component/Watermark.js +21 -30
- package/dist/es/src/component/XMLView.js +60 -82
- package/dist/es/src/hooks/useIsWidthUp.js +9 -7
- package/dist/es/src/icons/ByIcon.js +16 -16
- package/dist/es/src/icons/CcIcon.js +16 -16
- package/dist/es/src/icons/NcIcon.js +16 -16
- package/dist/es/src/icons/SaIcon.js +16 -16
- package/dist/es/src/icons/SideMenuIconLeft.js +30 -38
- package/dist/es/src/icons/SideMenuIconRight.js +32 -38
- package/dist/es/src/index.js +21 -20
- package/dist/es/src/lib/copyObject.js +3 -2
- package/dist/es/src/lib/registerServiceWorker.js +77 -54
- package/dist/es/src/model/DocumentHelper.js +7 -6
- package/dist/es/src/model/Folio.js +64 -86
- package/dist/es/src/model/ReduxStore.js +32 -78
- package/dist/es/src/model/folioLayout.js +275 -280
- package/dist/es/src/saga/RouteListenerSaga.js +89 -193
- package/dist/es/src/saga/rootSaga.js +9 -16
- package/dist/es/src/scss/_imageView.scss +1 -1
- package/dist/es/src/scss/_navigation.scss +1 -1
- package/dist/es/src/scss/editioncrafter.scss +1 -1
- package/dist/style.css +1 -0
- package/package.json +36 -51
- package/dist/editioncrafter.min.js +0 -2
- package/dist/editioncrafter.min.js.LICENSE.txt +0 -144
|
@@ -1,356 +1,402 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
var toggleHelp = function toggleHelp(event) {
|
|
54
|
-
setOpenHelp(!openHelp);
|
|
55
|
-
};
|
|
56
|
-
var toggleHelpNarrow = function toggleHelpNarrow(event) {
|
|
57
|
-
setOpenHelpNarrow(!openHelpNarrow);
|
|
58
|
-
};
|
|
59
|
-
var toggleBookmode = function toggleBookmode(event) {
|
|
1
|
+
import MenuItem from '@material-ui/core/MenuItem'
|
|
2
|
+
import Select from '@material-ui/core/Select'
|
|
3
|
+
import React, { useRef, useState } from 'react'
|
|
4
|
+
import {
|
|
5
|
+
FaArrowCircleLeft,
|
|
6
|
+
FaArrowCircleRight,
|
|
7
|
+
} from 'react-icons/fa'
|
|
8
|
+
import { connect } from 'react-redux'
|
|
9
|
+
import useIsWidthUp from '../hooks/useIsWidthUp'
|
|
10
|
+
import DocumentHelper from '../model/DocumentHelper'
|
|
11
|
+
import AlphabetLinks from './AlphabetLinks'
|
|
12
|
+
import HelpPopper from './HelpPopper'
|
|
13
|
+
import JumpToFolio from './JumpToFolio'
|
|
14
|
+
|
|
15
|
+
const initialPopoverObj = {
|
|
16
|
+
anchorEl: null,
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function Navigation(props) {
|
|
20
|
+
const [popover, setPopover] = useState({ ...initialPopoverObj })
|
|
21
|
+
const [openHelp, setOpenHelp] = useState(false)
|
|
22
|
+
const [openHelpNarrow, setOpenHelpNarrow] = useState(false)
|
|
23
|
+
|
|
24
|
+
const helpRef = useRef(null)
|
|
25
|
+
const helpRefNarrow = useRef(null)
|
|
26
|
+
|
|
27
|
+
const onJumpBoxBlur = (event) => {
|
|
28
|
+
setPopover({ anchorEl: null })
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const changeType = (event) => {
|
|
32
|
+
if (event.target.value === undefined || event.target.value === 0)
|
|
33
|
+
return
|
|
34
|
+
props.documentViewActions.changeTranscriptionType(
|
|
35
|
+
props.side,
|
|
36
|
+
event.target.value,
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const onGoToGrid = (event) => {
|
|
41
|
+
props.documentViewActions.changeTranscriptionType(props.side, 'g')
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const toggleHelp = (event) => {
|
|
45
|
+
setOpenHelp(!openHelp)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const toggleHelpNarrow = (event) => {
|
|
49
|
+
setOpenHelpNarrow(!openHelpNarrow)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const toggleBookmode = (event) => {
|
|
60
53
|
if (!props.documentView.bookMode) {
|
|
61
|
-
props.documentViewActions.changeCurrentFolio(
|
|
62
|
-
|
|
54
|
+
props.documentViewActions.changeCurrentFolio(
|
|
55
|
+
props.documentView.left.iiifShortID,
|
|
56
|
+
'left',
|
|
57
|
+
props.documentView.left.transcriptionType,
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
props.documentViewActions.changeCurrentFolio(
|
|
61
|
+
props.documentView.left.nextFolioShortID,
|
|
62
|
+
'right',
|
|
63
|
+
props.documentView.left.transcriptionType,
|
|
64
|
+
)
|
|
63
65
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
|
|
67
|
+
props.documentViewActions.setBookMode(
|
|
68
|
+
props.documentView.left.iiifShortID,
|
|
69
|
+
!props.documentView.bookMode,
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const toggleXMLMode = (event) => {
|
|
74
|
+
props.documentViewActions.setXMLMode(
|
|
75
|
+
props.side,
|
|
76
|
+
!props.documentView[props.side].isXMLMode,
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const toggleLockmode = (event) => {
|
|
70
81
|
if (props.documentView.bookMode) {
|
|
71
|
-
toggleBookmode()
|
|
72
|
-
return
|
|
82
|
+
toggleBookmode()
|
|
83
|
+
return
|
|
73
84
|
}
|
|
74
85
|
|
|
75
86
|
// If we are transitioning from unlocked to locked, sync up the panes
|
|
76
87
|
if (props.documentView.linkedMode === false) {
|
|
77
88
|
if (props.side === 'left') {
|
|
78
|
-
props.documentViewActions.changeCurrentFolio(
|
|
79
|
-
|
|
80
|
-
|
|
89
|
+
props.documentViewActions.changeCurrentFolio(
|
|
90
|
+
props.documentView.left.iiifShortID,
|
|
91
|
+
'right',
|
|
92
|
+
props.documentView.right.transcriptionType,
|
|
93
|
+
)
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
props.documentViewActions.changeCurrentFolio(
|
|
97
|
+
props.documentView.right.iiifShortID,
|
|
98
|
+
'left',
|
|
99
|
+
props.documentView.left.transcriptionType,
|
|
100
|
+
)
|
|
81
101
|
}
|
|
82
102
|
}
|
|
83
103
|
|
|
84
104
|
// Set lock
|
|
85
|
-
props.documentViewActions.setLinkedMode(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
105
|
+
props.documentViewActions.setLinkedMode(
|
|
106
|
+
!props.documentView.linkedMode,
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const changeCurrentFolio = (event) => {
|
|
111
|
+
const {
|
|
112
|
+
documentViewActions,
|
|
113
|
+
documentView,
|
|
114
|
+
side,
|
|
115
|
+
} = props
|
|
116
|
+
|
|
91
117
|
if (typeof event.currentTarget.dataset.id === 'undefined' || event.currentTarget.dataset.id.length === 0) {
|
|
92
|
-
return
|
|
118
|
+
return
|
|
93
119
|
}
|
|
94
|
-
|
|
95
|
-
documentViewActions.changeCurrentFolio(
|
|
96
|
-
|
|
97
|
-
|
|
120
|
+
const folioID = event.currentTarget.dataset.id
|
|
121
|
+
documentViewActions.changeCurrentFolio(
|
|
122
|
+
folioID,
|
|
123
|
+
side,
|
|
124
|
+
documentView[side].transcriptionType,
|
|
125
|
+
)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const revealJumpBox = (event) => {
|
|
98
129
|
setPopover({
|
|
99
|
-
anchorEl: event.currentTarget
|
|
100
|
-
})
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
130
|
+
anchorEl: event.currentTarget,
|
|
131
|
+
})
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const {
|
|
135
|
+
side,
|
|
136
|
+
document,
|
|
137
|
+
documentView,
|
|
138
|
+
documentViewActions,
|
|
139
|
+
onFilterChange,
|
|
140
|
+
} = props
|
|
141
|
+
|
|
142
|
+
const isWidthUp = useIsWidthUp('md')
|
|
143
|
+
|
|
108
144
|
if (!documentView) {
|
|
109
|
-
return
|
|
145
|
+
return (
|
|
146
|
+
<div>
|
|
147
|
+
Unknown Transcription Type
|
|
148
|
+
</div>
|
|
149
|
+
)
|
|
110
150
|
}
|
|
111
|
-
|
|
151
|
+
|
|
152
|
+
const getSelectContainerStyle = () => {
|
|
112
153
|
if (isWidthUp) {
|
|
113
154
|
if (documentView[side].width < 500 && !document.variorum) {
|
|
114
|
-
return {
|
|
115
|
-
display: 'none'
|
|
116
|
-
};
|
|
155
|
+
return { display: 'none' }
|
|
117
156
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
};
|
|
157
|
+
|
|
158
|
+
return { display: 'flex' }
|
|
121
159
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
} : {
|
|
132
|
-
color: 'black'
|
|
133
|
-
};
|
|
134
|
-
var selectClass = documentView[side].transcriptionType === 'f' ? 'dark' : 'light';
|
|
135
|
-
var showButtonsStyle = documentView[side].transcriptionType === 'glossary' ? {
|
|
136
|
-
visibility: 'hidden'
|
|
137
|
-
} : {
|
|
138
|
-
visibility: 'visible'
|
|
139
|
-
};
|
|
140
|
-
var selectContainerStyle = {
|
|
141
|
-
display: 'flex'
|
|
142
|
-
}; //what's the reason we want this to be hidden sometimes?
|
|
143
|
-
var lockIconClass = documentView.linkedMode ? 'fa fa-lock' : 'fa fa-lock-open';
|
|
160
|
+
|
|
161
|
+
return null
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const selectColorStyle = documentView[side].transcriptionType === 'f' ? { color: 'white' } : { color: 'black' }
|
|
165
|
+
const selectClass = documentView[side].transcriptionType === 'f' ? 'dark' : 'light'
|
|
166
|
+
const showButtonsStyle = documentView[side].transcriptionType === 'glossary' ? { visibility: 'hidden' } : { visibility: 'visible' }
|
|
167
|
+
const selectContainerStyle = { display: 'flex' } // what's the reason we want this to be hidden sometimes?
|
|
168
|
+
let lockIconClass = (documentView.linkedMode) ? 'fa fa-lock' : 'fa fa-lock-open'
|
|
144
169
|
if (!documentView.bookMode) {
|
|
145
|
-
lockIconClass += ' active'
|
|
170
|
+
lockIconClass += ' active'
|
|
146
171
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
color: 'white'
|
|
153
|
-
} : {
|
|
154
|
-
color: 'black'
|
|
155
|
-
};
|
|
172
|
+
const imageViewActive = documentView[side].transcriptionType === 'f'
|
|
173
|
+
const bookIconClass = (documentView.bookMode) ? 'fa fa-book active' : 'fa fa-book'
|
|
174
|
+
const xmlIconClass = (documentView[side].isXMLMode) ? 'fa fa-code active' : 'fa fa-code'
|
|
175
|
+
const folioName = document.folioIndex[documentView[side].iiifShortID]?.name
|
|
176
|
+
const jumpToIconStyle = (imageViewActive) ? { color: 'white' } : { color: 'black' }
|
|
156
177
|
// this is messy but faster for the moment then figuring out why the sides dont behave the same
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
178
|
+
const helpMarginStyle = side === 'left' ? { marginRight: '55px' } : { marginRight: '15px' }
|
|
179
|
+
|
|
180
|
+
return (
|
|
181
|
+
<>
|
|
182
|
+
<div className="navigationComponent">
|
|
183
|
+
<div id="navigation-row" className="navigationRow">
|
|
184
|
+
|
|
185
|
+
{ documentView[side].transcriptionType !== 'glossary' ? (
|
|
186
|
+
|
|
187
|
+
<div id="tool-bar-buttons" className="breadcrumbs" style={showButtonsStyle}>
|
|
188
|
+
<div style={{ display: 'flex', alignItems: 'baseline', gap: '4px' }}>
|
|
189
|
+
<span
|
|
190
|
+
className="fas fa-th"
|
|
191
|
+
style={{ cursor: documentView[side].transcriptionType !== 'g' ? 'pointer' : 'default', padding: '0 15px' }}
|
|
192
|
+
title={documentView[side].transcriptionType !== 'g' && 'Return to Grid View'}
|
|
193
|
+
onClick={documentView[side].transcriptionType !== 'g' && onGoToGrid}
|
|
194
|
+
/>
|
|
195
|
+
|
|
196
|
+
<span
|
|
197
|
+
title="Toggle coordination of views"
|
|
198
|
+
onClick={toggleLockmode}
|
|
199
|
+
className={lockIconClass}
|
|
200
|
+
/>
|
|
201
|
+
|
|
202
|
+
<span
|
|
203
|
+
title="Toggle book mode"
|
|
204
|
+
onClick={toggleBookmode}
|
|
205
|
+
className={bookIconClass}
|
|
206
|
+
/>
|
|
207
|
+
|
|
208
|
+
<span
|
|
209
|
+
title="Toggle XML mode"
|
|
210
|
+
onClick={toggleXMLMode}
|
|
211
|
+
style={{ paddingRight: '15px' }}
|
|
212
|
+
className={imageViewActive ? 'invisible' : xmlIconClass}
|
|
213
|
+
/>
|
|
214
|
+
|
|
215
|
+
{/* <span title="Toggle single column mode" onClick={this.toggleColumns}
|
|
216
|
+
className={columnIconClass}></span> */}
|
|
217
|
+
|
|
218
|
+
<span
|
|
219
|
+
title="Go back"
|
|
220
|
+
onClick={changeCurrentFolio}
|
|
221
|
+
data-id={documentView[side].previousFolioShortID}
|
|
222
|
+
className={(documentView[side].hasPrevious) ? 'arrow' : 'arrow disabled'}
|
|
223
|
+
>
|
|
224
|
+
|
|
225
|
+
<FaArrowCircleLeft />
|
|
226
|
+
|
|
227
|
+
</span>
|
|
228
|
+
|
|
229
|
+
<span
|
|
230
|
+
title="Go forward"
|
|
231
|
+
onClick={changeCurrentFolio}
|
|
232
|
+
data-id={documentView[side].nextFolioShortID}
|
|
233
|
+
className={(documentView[side].hasNext) ? 'arrow' : 'arrow disabled'}
|
|
234
|
+
>
|
|
235
|
+
|
|
236
|
+
<FaArrowCircleRight />
|
|
237
|
+
</span>
|
|
238
|
+
</div>
|
|
239
|
+
|
|
240
|
+
<div title={`${props.documentName || document.documentName}/${folioName}`} style={{ display: 'flex', overflowX: 'hidden', justifyContent: 'flex-end' }}>
|
|
241
|
+
<span>{props.documentName || document.documentName}</span>
|
|
242
|
+
<span>{' / '}</span>
|
|
243
|
+
<div
|
|
244
|
+
onClick={revealJumpBox}
|
|
245
|
+
className="folioName"
|
|
246
|
+
style={{ flexShrink: '0', minWidth: '40px' }}
|
|
247
|
+
>
|
|
248
|
+
|
|
249
|
+
{folioName}
|
|
250
|
+
|
|
251
|
+
<span style={jumpToIconStyle} className="fa fa-hand-point-right" />
|
|
252
|
+
</div>
|
|
253
|
+
</div>
|
|
254
|
+
|
|
255
|
+
<JumpToFolio
|
|
256
|
+
side={side}
|
|
257
|
+
anchorEl={popover.anchorEl}
|
|
258
|
+
submitHandler={documentViewActions.jumpToFolio}
|
|
259
|
+
blurHandler={onJumpBoxBlur}
|
|
260
|
+
/>
|
|
261
|
+
|
|
262
|
+
</div>
|
|
263
|
+
)
|
|
264
|
+
: (<AlphabetLinks onFilterChange={onFilterChange} value={props.value} />)}
|
|
265
|
+
|
|
266
|
+
<div id="doc-type-help" style={selectContainerStyle} ref={helpRef}>
|
|
267
|
+
<Select
|
|
268
|
+
className={selectClass}
|
|
269
|
+
style={{ ...selectColorStyle, marginRight: 15, fontSize: 'max(16px, 1rem)' }}
|
|
270
|
+
value={documentView[side].transcriptionType}
|
|
271
|
+
id="doc-type"
|
|
272
|
+
onClick={changeType}
|
|
273
|
+
>
|
|
274
|
+
{Object.keys(props.document.folios.find(fol => (fol.id === props.documentView[props.side].iiifShortID)).annotationURLs).map(ttKey => (
|
|
275
|
+
<MenuItem value={ttKey} key={ttKey}>{props.document.variorum ? props.document.transcriptionTypes[props.document.folios.find(fol => (fol.id === props.documentView[props.side].iiifShortID)).doc_id][ttKey] : props.document.transcriptionTypes[ttKey]}</MenuItem>
|
|
276
|
+
))}
|
|
277
|
+
<MenuItem value="f" key="f">
|
|
278
|
+
{DocumentHelper.transcriptionTypeLabels.f}
|
|
279
|
+
</MenuItem>
|
|
280
|
+
{ props.glossary && (
|
|
281
|
+
<MenuItem value="glossary" key="glossary">
|
|
282
|
+
{DocumentHelper.transcriptionTypeLabels.glossary}
|
|
283
|
+
</MenuItem>
|
|
284
|
+
) }
|
|
285
|
+
</Select>
|
|
286
|
+
<span
|
|
287
|
+
title="Toggle folio help"
|
|
288
|
+
onClick={toggleHelp}
|
|
289
|
+
className="helpIcon"
|
|
290
|
+
>
|
|
291
|
+
<i className="fas fa-question-circle" />
|
|
292
|
+
</span>
|
|
293
|
+
<HelpPopper
|
|
294
|
+
marginStyle={helpMarginStyle}
|
|
295
|
+
anchorEl={helpRef.current}
|
|
296
|
+
open={openHelp}
|
|
297
|
+
onClose={toggleHelp}
|
|
298
|
+
/>
|
|
299
|
+
</div>
|
|
300
|
+
|
|
301
|
+
</div>
|
|
302
|
+
</div>
|
|
303
|
+
<div className="navigationComponentNarrow">
|
|
304
|
+
<div id="navigation-row" className="navigationRowNarrow">
|
|
305
|
+
|
|
306
|
+
{ documentView[side].transcriptionType !== 'glossary'
|
|
307
|
+
? (
|
|
308
|
+
|
|
309
|
+
<div id="tool-bar-buttons" className="breadcrumbsNarrow" style={showButtonsStyle}>
|
|
310
|
+
|
|
311
|
+
<span
|
|
312
|
+
className="fas fa-th"
|
|
313
|
+
style={{ cursor: documentView[side].transcriptionType !== 'g' ? 'pointer' : 'default', padding: '0 15px' }}
|
|
314
|
+
title={documentView[side].transcriptionType !== 'g' && 'Return to Grid View'}
|
|
315
|
+
onClick={documentView[side].transcriptionType !== 'g' && onGoToGrid}
|
|
316
|
+
/>
|
|
317
|
+
|
|
318
|
+
<span
|
|
319
|
+
title="Toggle XML mode"
|
|
320
|
+
onClick={toggleXMLMode}
|
|
321
|
+
className={imageViewActive ? 'invisible' : xmlIconClass}
|
|
322
|
+
/>
|
|
323
|
+
|
|
324
|
+
{ imageViewActive && (
|
|
325
|
+
<>
|
|
326
|
+
<span
|
|
327
|
+
title="Go back"
|
|
328
|
+
onClick={changeCurrentFolio}
|
|
329
|
+
data-id={documentView[side].previousFolioShortID}
|
|
330
|
+
className={(documentView[side].hasPrevious) ? 'arrow' : 'arrow disabled'}
|
|
331
|
+
>
|
|
332
|
+
{' '}
|
|
333
|
+
<FaArrowCircleLeft />
|
|
334
|
+
{' '}
|
|
335
|
+
|
|
336
|
+
</span>
|
|
337
|
+
|
|
338
|
+
<span
|
|
339
|
+
title="Go forward"
|
|
340
|
+
onClick={changeCurrentFolio}
|
|
341
|
+
data-id={documentView[side].nextFolioShortID}
|
|
342
|
+
className={(documentView[side].hasNext) ? 'arrow' : 'arrow disabled'}
|
|
343
|
+
>
|
|
344
|
+
{' '}
|
|
345
|
+
<FaArrowCircleRight />
|
|
346
|
+
</span>
|
|
347
|
+
</>
|
|
348
|
+
)}
|
|
349
|
+
|
|
350
|
+
</div>
|
|
351
|
+
)
|
|
352
|
+
: (<AlphabetLinks onFilterChange={onFilterChange} value={props.value} />)}
|
|
353
|
+
|
|
354
|
+
<div id="doc-type-help" style={selectContainerStyle} ref={helpRefNarrow}>
|
|
355
|
+
<Select
|
|
356
|
+
className={selectClass}
|
|
357
|
+
style={{ ...selectColorStyle, marginRight: 15, fontSize: 'max(16px, 1rem)' }}
|
|
358
|
+
value={documentView[side].transcriptionType}
|
|
359
|
+
id="doc-type"
|
|
360
|
+
onClick={changeType}
|
|
361
|
+
>
|
|
362
|
+
{Object.keys(props.document.folios.find(fol => (fol.id === props.documentView[props.side].iiifShortID)).annotationURLs).map(ttKey => (
|
|
363
|
+
<MenuItem value={ttKey} key={ttKey} title={ttKey}>{props.document.variorum ? props.document.transcriptionTypes[props.document.folios.find(fol => (fol.id === props.documentView[props.side].iiifShortID)).doc_id][ttKey] : props.document.transcriptionTypes[ttKey]}</MenuItem>
|
|
364
|
+
))}
|
|
365
|
+
<MenuItem value="f" key="f">
|
|
366
|
+
{DocumentHelper.transcriptionTypeLabels.f}
|
|
367
|
+
</MenuItem>
|
|
368
|
+
{ props.glossary && (
|
|
369
|
+
<MenuItem value="glossary" key="glossary">
|
|
370
|
+
{DocumentHelper.transcriptionTypeLabels.glossary}
|
|
371
|
+
</MenuItem>
|
|
372
|
+
) }
|
|
373
|
+
</Select>
|
|
374
|
+
<span
|
|
375
|
+
title="Toggle folio help"
|
|
376
|
+
onClick={toggleHelpNarrow}
|
|
377
|
+
className="helpIcon"
|
|
378
|
+
>
|
|
379
|
+
<i className="fas fa-question-circle" />
|
|
380
|
+
</span>
|
|
381
|
+
<HelpPopper
|
|
382
|
+
marginStyle={helpMarginStyle}
|
|
383
|
+
anchorEl={helpRefNarrow.current}
|
|
384
|
+
open={openHelpNarrow}
|
|
385
|
+
onClose={toggleHelpNarrow}
|
|
386
|
+
/>
|
|
387
|
+
</div>
|
|
388
|
+
|
|
389
|
+
</div>
|
|
390
|
+
</div>
|
|
391
|
+
</>
|
|
392
|
+
)
|
|
393
|
+
}
|
|
394
|
+
|
|
350
395
|
function mapStateToProps(state) {
|
|
351
396
|
return {
|
|
352
397
|
document: state.document,
|
|
353
|
-
glossary: !!state.glossary.URL
|
|
354
|
-
}
|
|
398
|
+
glossary: !!state.glossary.URL,
|
|
399
|
+
}
|
|
355
400
|
}
|
|
356
|
-
|
|
401
|
+
|
|
402
|
+
export default (connect(mapStateToProps)(Navigation))
|