@cu-mkp/editioncrafter 0.2.2 → 0.2.4
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/dist/editioncrafter.min.js +1 -1
- package/dist/es/src/component/DiploMatic.js +4 -1
- package/dist/es/src/component/DocumentView.js +10 -2
- package/dist/es/src/component/JumpToFolio.js +14 -6
- package/dist/es/src/component/Navigation.js +6 -12
- package/dist/es/src/component/Pagination.js +4 -2
- package/dist/es/src/component/SeaDragonComponent.js +23 -17
- package/dist/es/src/component/TranscriptionView.js +5 -7
- package/dist/es/src/scss/_diplomatic.scss +3 -2
- package/dist/es/src/scss/_glossary.scss +2 -2
- package/dist/es/src/scss/_imageGridView.scss +2 -1
- package/dist/es/src/scss/_imageView.scss +3 -1
- package/dist/es/src/scss/_pagination.scss +5 -0
- package/dist/es/src/scss/_transcriptView.scss +2 -2
- package/dist/es/src/scss/_xmlView.scss +3 -2
- package/package.json +1 -1
|
@@ -37,7 +37,10 @@ var DiploMatic = function DiploMatic(props) {
|
|
|
37
37
|
className: fixedFrameModeClass,
|
|
38
38
|
ref: containerRef
|
|
39
39
|
}, /*#__PURE__*/React.createElement(RouteListener, null), /*#__PURE__*/React.createElement("div", {
|
|
40
|
-
id: "content"
|
|
40
|
+
id: "content",
|
|
41
|
+
style: {
|
|
42
|
+
height: '100%'
|
|
43
|
+
}
|
|
41
44
|
}, /*#__PURE__*/React.createElement(Routes, null, /*#__PURE__*/React.createElement(Route, {
|
|
42
45
|
path: "/ec/:folioID/:transcriptionType/:folioID2/:transcriptionType2/:folioID3/:transcriptionType3",
|
|
43
46
|
element: /*#__PURE__*/React.createElement(DocumentView, Object.assign({}, props, {
|
|
@@ -427,7 +427,11 @@ var DocumentView = function DocumentView(props) {
|
|
|
427
427
|
right: _objectSpread({}, viewportState('right'))
|
|
428
428
|
};
|
|
429
429
|
if (isWidthUp('md', props.width) && !singlePaneMode) {
|
|
430
|
-
return /*#__PURE__*/React.createElement("div",
|
|
430
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
431
|
+
style: {
|
|
432
|
+
height: '100%'
|
|
433
|
+
}
|
|
434
|
+
}, /*#__PURE__*/React.createElement(SplitPaneView, {
|
|
431
435
|
leftPane: renderPane('left', docView),
|
|
432
436
|
rightPane: renderPane('right', docView),
|
|
433
437
|
thirdPane: renderPane('third', docView),
|
|
@@ -435,7 +439,11 @@ var DocumentView = function DocumentView(props) {
|
|
|
435
439
|
threePanel: props.document.threePanel
|
|
436
440
|
}));
|
|
437
441
|
}
|
|
438
|
-
return /*#__PURE__*/React.createElement("div",
|
|
442
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
443
|
+
style: {
|
|
444
|
+
height: '100%'
|
|
445
|
+
}
|
|
446
|
+
}, /*#__PURE__*/React.createElement(SinglePaneView, {
|
|
439
447
|
singlePane: renderPane(viewportState('left').iiifShortID === "-1" ? 'left' : 'right', docView)
|
|
440
448
|
}));
|
|
441
449
|
};
|
|
@@ -4,12 +4,15 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { Popover } from '@material-ui/core';
|
|
7
8
|
import React, { useEffect, useState, useRef } from 'react';
|
|
8
9
|
var JumpToFolio = function JumpToFolio(props) {
|
|
9
10
|
var _useState = useState(''),
|
|
10
11
|
_useState2 = _slicedToArray(_useState, 2),
|
|
11
12
|
textInput = _useState2[0],
|
|
12
13
|
setTextInput = _useState2[1];
|
|
14
|
+
var open = Boolean(props.anchorEl);
|
|
15
|
+
var id = open ? "".concat(props.side, "_jumpInput") : undefined;
|
|
13
16
|
var handleSubmit = function handleSubmit(event) {
|
|
14
17
|
// Consume the event
|
|
15
18
|
event.preventDefault();
|
|
@@ -33,18 +36,23 @@ var JumpToFolio = function JumpToFolio(props) {
|
|
|
33
36
|
if (inputRef.current) {
|
|
34
37
|
inputRef.current.focus();
|
|
35
38
|
}
|
|
36
|
-
}, [inputRef,
|
|
39
|
+
}, [inputRef, open]);
|
|
37
40
|
var divStyle = {
|
|
38
41
|
position: 'fixed',
|
|
39
42
|
zIndex: 1,
|
|
40
43
|
top: props.positionY,
|
|
41
44
|
left: props.positionX,
|
|
42
|
-
display:
|
|
45
|
+
display: open ? 'inline' : 'none'
|
|
43
46
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
return /*#__PURE__*/React.createElement(Popover, {
|
|
48
|
+
id: id,
|
|
49
|
+
open: open,
|
|
50
|
+
anchorEl: props.anchorEl,
|
|
51
|
+
onClose: props.blurHandler,
|
|
52
|
+
anchorOrigin: {
|
|
53
|
+
vertical: 'bottom',
|
|
54
|
+
horizontal: 'right'
|
|
55
|
+
}
|
|
48
56
|
}, /*#__PURE__*/React.createElement("form", {
|
|
49
57
|
onSubmit: handleSubmit
|
|
50
58
|
}, /*#__PURE__*/React.createElement("input", {
|
|
@@ -20,9 +20,7 @@ import HelpPopper from './HelpPopper';
|
|
|
20
20
|
import AlphabetLinks from './AlphabetLinks';
|
|
21
21
|
import useIsWidthUp from '../hooks/useIsWidthUp';
|
|
22
22
|
var initialPopoverObj = {
|
|
23
|
-
|
|
24
|
-
x: -1,
|
|
25
|
-
y: -1
|
|
23
|
+
anchorEl: null
|
|
26
24
|
};
|
|
27
25
|
var Navigation = function Navigation(props) {
|
|
28
26
|
var _document$folioIndex$;
|
|
@@ -44,9 +42,9 @@ var Navigation = function Navigation(props) {
|
|
|
44
42
|
console.log(helpRef.current);
|
|
45
43
|
}, []);
|
|
46
44
|
var onJumpBoxBlur = function onJumpBoxBlur(event) {
|
|
47
|
-
setPopover(
|
|
48
|
-
|
|
49
|
-
})
|
|
45
|
+
setPopover({
|
|
46
|
+
anchorEl: null
|
|
47
|
+
});
|
|
50
48
|
};
|
|
51
49
|
var changeType = function changeType(event) {
|
|
52
50
|
if (event.target.value === undefined) return;
|
|
@@ -101,9 +99,7 @@ var Navigation = function Navigation(props) {
|
|
|
101
99
|
};
|
|
102
100
|
var revealJumpBox = function revealJumpBox(event) {
|
|
103
101
|
setPopover({
|
|
104
|
-
|
|
105
|
-
x: event.clientX,
|
|
106
|
-
y: event.clientY
|
|
102
|
+
anchorEl: event.currentTarget
|
|
107
103
|
});
|
|
108
104
|
};
|
|
109
105
|
var side = props.side,
|
|
@@ -230,9 +226,7 @@ var Navigation = function Navigation(props) {
|
|
|
230
226
|
className: "fa fa-hand-point-right"
|
|
231
227
|
}))), /*#__PURE__*/React.createElement(JumpToFolio, {
|
|
232
228
|
side: side,
|
|
233
|
-
|
|
234
|
-
positionX: popover.x,
|
|
235
|
-
positionY: popover.y,
|
|
229
|
+
anchorEl: popover.anchorEl,
|
|
236
230
|
submitHandler: documentViewActions.jumpToFolio,
|
|
237
231
|
blurHandler: onJumpBoxBlur
|
|
238
232
|
})) : /*#__PURE__*/React.createElement(AlphabetLinks, {
|
|
@@ -41,11 +41,13 @@ var Pagination = /*#__PURE__*/function (_React$Component) {
|
|
|
41
41
|
var _this$props2 = this.props,
|
|
42
42
|
side = _this$props2.side,
|
|
43
43
|
document = _this$props2.document,
|
|
44
|
-
documentView = _this$props2.documentView
|
|
44
|
+
documentView = _this$props2.documentView,
|
|
45
|
+
_this$props2$bottom = _this$props2.bottom,
|
|
46
|
+
bottom = _this$props2$bottom === void 0 ? false : _this$props2$bottom;
|
|
45
47
|
if (documentView[side].iiifShortID === '-1') return null;
|
|
46
48
|
var folioName = document.folioIndex[documentView[side].iiifShortID].name;
|
|
47
49
|
return /*#__PURE__*/React.createElement("div", {
|
|
48
|
-
className: "paginationComponent"
|
|
50
|
+
className: bottom ? "paginationComponent bottom" : "paginationComponent"
|
|
49
51
|
}, /*#__PURE__*/React.createElement("div", {
|
|
50
52
|
className: "paginationControl"
|
|
51
53
|
}, /*#__PURE__*/React.createElement("span", {
|
|
@@ -18,24 +18,30 @@ var SeaDragonComponent = function SeaDragonComponent(props) {
|
|
|
18
18
|
loading = _useState2[0],
|
|
19
19
|
setLoading = _useState2[1];
|
|
20
20
|
var viewerRef = useRef(null);
|
|
21
|
-
useEffect(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
useEffect(function () {
|
|
22
|
+
var _ref;
|
|
23
|
+
var loader = function loader() {
|
|
24
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
25
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
26
|
+
while (1) switch (_context.prev = _context.next) {
|
|
27
|
+
case 0:
|
|
28
|
+
if (!viewerRef.current) {
|
|
29
|
+
_context.next = 3;
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
_context.next = 3;
|
|
33
|
+
return initViewer(viewerRef.current, tileSource).then(function () {
|
|
34
|
+
return setLoading(false);
|
|
35
|
+
});
|
|
36
|
+
case 3:
|
|
37
|
+
case "end":
|
|
38
|
+
return _context.stop();
|
|
28
39
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
case "end":
|
|
35
|
-
return _context.stop();
|
|
36
|
-
}
|
|
37
|
-
}, _callee);
|
|
38
|
-
})), []);
|
|
40
|
+
}, _callee);
|
|
41
|
+
}))).apply(this, arguments);
|
|
42
|
+
};
|
|
43
|
+
loader();
|
|
44
|
+
}, []);
|
|
39
45
|
var viewer = useMemo(function () {
|
|
40
46
|
return /*#__PURE__*/React.createElement("div", {
|
|
41
47
|
id: "image-view-seadragon-".concat(side),
|
|
@@ -144,11 +144,7 @@ var TranscriptionView = function TranscriptionView(props) {
|
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
if (folio && folio.loading) {
|
|
147
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
148
|
-
style: {
|
|
149
|
-
position: "relative"
|
|
150
|
-
}
|
|
151
|
-
}, /*#__PURE__*/React.createElement(Navigation, {
|
|
147
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Navigation, {
|
|
152
148
|
side: side,
|
|
153
149
|
documentView: documentView,
|
|
154
150
|
documentViewActions: documentViewActions,
|
|
@@ -167,7 +163,8 @@ var TranscriptionView = function TranscriptionView(props) {
|
|
|
167
163
|
})))), /*#__PURE__*/React.createElement(Pagination, {
|
|
168
164
|
side: side,
|
|
169
165
|
documentView: documentView,
|
|
170
|
-
documentViewActions: documentViewActions
|
|
166
|
+
documentViewActions: documentViewActions,
|
|
167
|
+
bottom: true
|
|
171
168
|
}));
|
|
172
169
|
}
|
|
173
170
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -198,7 +195,8 @@ var TranscriptionView = function TranscriptionView(props) {
|
|
|
198
195
|
}))))), /*#__PURE__*/React.createElement(Pagination, {
|
|
199
196
|
side: side,
|
|
200
197
|
documentView: documentView,
|
|
201
|
-
documentViewActions: documentViewActions
|
|
198
|
+
documentViewActions: documentViewActions,
|
|
199
|
+
bottom: true
|
|
202
200
|
}));
|
|
203
201
|
};
|
|
204
202
|
function mapStateToProps(state) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#diplomatic {
|
|
2
|
-
container-type: size;
|
|
2
|
+
container-type: inline-size;
|
|
3
3
|
container-name: diplomatic;
|
|
4
4
|
#content-view, .header-wrapper, #entry-list-view, #annotation-list-view {
|
|
5
5
|
h1,
|
|
@@ -303,7 +303,8 @@
|
|
|
303
303
|
background: white;
|
|
304
304
|
// position: fixed;
|
|
305
305
|
width: auto;
|
|
306
|
-
height:
|
|
306
|
+
height: min(100%, 100dvh);
|
|
307
|
+
overflow-y: scroll;
|
|
307
308
|
// height: calc(100% - $chrome-height);
|
|
308
309
|
// @include sm {
|
|
309
310
|
// height: calc(100% - $sm-chrome-height);
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
margin: 52px 0 0 0;
|
|
8
8
|
}
|
|
9
9
|
width: calc(100% - 1.2rem);
|
|
10
|
-
height: calc(100vh - 170px);
|
|
10
|
+
max-height: calc(100vh - 170px);
|
|
11
11
|
padding: 5px 16px;
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
|
|
95
95
|
#glossaryContent {
|
|
96
96
|
padding: 5rem 0 0;
|
|
97
|
-
|
|
97
|
+
max-height: 100vh;
|
|
98
98
|
-webkit-user-select: text;
|
|
99
99
|
-moz-user-select: text;
|
|
100
100
|
-ms-user-select: text;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
#image-view-seadragon-third {
|
|
5
5
|
width: 100%;
|
|
6
6
|
height: 100%;
|
|
7
|
+
max-height: 100dvh;
|
|
7
8
|
grid-area: image_viewer;
|
|
8
9
|
background: black;
|
|
9
10
|
}
|
|
@@ -13,7 +14,8 @@
|
|
|
13
14
|
padding: 0;
|
|
14
15
|
margin: 0;
|
|
15
16
|
width: 100%;
|
|
16
|
-
height:
|
|
17
|
+
height: 100%;
|
|
18
|
+
max-height: 100dvh;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
.a9s-annotation.a9s-annotation.selected > rect,
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
// padding:1rem 0 0 0;
|
|
18
18
|
// }
|
|
19
19
|
|
|
20
|
+
.paginationComponent.bottom {
|
|
21
|
+
margin-top: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
20
24
|
.paginationControl {
|
|
21
25
|
padding: 16px;
|
|
22
26
|
|
|
@@ -27,6 +31,7 @@
|
|
|
27
31
|
color: #4A4A4A;
|
|
28
32
|
margin: 1rem 1rem 0;
|
|
29
33
|
cursor: pointer;
|
|
34
|
+
display: inline-block;
|
|
30
35
|
}
|
|
31
36
|
|
|
32
37
|
.paginationControl .folioName {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
.transcriptionViewComponent {
|
|
3
3
|
overflow: scroll;
|
|
4
|
-
height:calc(100vh - 7rem);
|
|
4
|
+
max-height:calc(100vh - 7rem);
|
|
5
5
|
.transcriptContent {
|
|
6
6
|
padding: 50px 16px;
|
|
7
7
|
@include md {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
-moz-user-select: text;
|
|
13
13
|
-ms-user-select: text;
|
|
14
14
|
user-select: text;
|
|
15
|
-
margin-bottom:92px;
|
|
15
|
+
//margin-bottom:92px;
|
|
16
16
|
|
|
17
17
|
figure {
|
|
18
18
|
display: inline-flex;
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
padding: 0;
|
|
7
7
|
margin: 4.5rem 0 0;
|
|
8
8
|
width: calc(100% - 1.2rem);
|
|
9
|
-
|
|
9
|
+
max-height: 100vh;
|
|
10
|
+
min-height: 100%;
|
|
10
11
|
-webkit-user-select: text;
|
|
11
12
|
-moz-user-select: text;
|
|
12
13
|
-ms-user-select: text;
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
.xmlViewComponent {
|
|
18
19
|
overflow: auto;
|
|
19
20
|
margin: 0 0 0 1rem;
|
|
20
|
-
height: calc(100vh - 7rem);
|
|
21
|
+
max-height: calc(100vh - 7rem);
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
.xmlContentInner {
|