@cu-mkp/editioncrafter 0.1.0 → 0.2.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/dist/editioncrafter.min.js +1 -1
- package/dist/es/src/action/DocumentActions.js +11 -0
- package/dist/es/src/action/initialState/documentInitialState.js +6 -0
- package/dist/es/src/action/rootReducer.js +21 -4
- package/dist/es/src/component/DiploMatic.js +38 -7
- package/dist/es/src/component/DocumentView.js +101 -32
- package/dist/es/src/component/ImageGridView.js +96 -20
- package/dist/es/src/component/ImageView.js +30 -5
- package/dist/es/src/component/Navigation.js +109 -11
- package/dist/es/src/component/RingSpinner.js +40 -0
- package/dist/es/src/component/SeaDragonComponent.js +40 -6
- package/dist/es/src/component/SinglePaneView.js +8 -8
- package/dist/es/src/component/SplitPaneView.js +53 -25
- package/dist/es/src/component/TranscriptionView.js +38 -11
- package/dist/es/src/component/Watermark.js +1 -1
- package/dist/es/src/component/XMLView.js +2 -1
- package/dist/es/src/img/editioncrafterlogo.png +0 -0
- package/dist/es/src/index.js +2 -2
- package/dist/es/src/model/ReduxStore.js +1 -0
- package/dist/es/src/saga/RouteListenerSaga.js +82 -33
- package/dist/es/src/scss/_CETEIcean.scss +1 -1
- package/dist/es/src/scss/_diplomatic.scss +12 -9
- package/dist/es/src/scss/_glossary.scss +5 -0
- package/dist/es/src/scss/_imageGridView.scss +10 -0
- package/dist/es/src/scss/_imageView.scss +2 -1
- package/dist/es/src/scss/_navigation.scss +57 -6
- package/dist/es/src/scss/_ringSpinner.scss +88 -0
- package/dist/es/src/scss/_splitPaneView.scss +15 -1
- package/dist/es/src/scss/_watermark.scss +5 -1
- package/dist/es/src/scss/editioncrafter.scss +8 -6
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ import Parser from './Parser';
|
|
|
13
13
|
import EditorComment from './EditorComment';
|
|
14
14
|
import ErrorBoundary from './ErrorBoundary';
|
|
15
15
|
import Watermark from './Watermark';
|
|
16
|
+
import { BigRingSpinner } from './RingSpinner';
|
|
16
17
|
var addZoneStyle = function addZoneStyle(selectedZone, domNode, facses) {
|
|
17
18
|
if (facses.includes(selectedZone)) {
|
|
18
19
|
// Keep any classes that might already be set
|
|
@@ -105,6 +106,7 @@ var TranscriptionView = function TranscriptionView(props) {
|
|
|
105
106
|
documentView = props.documentView,
|
|
106
107
|
documentViewActions = props.documentViewActions;
|
|
107
108
|
if (folioID === '-1') {
|
|
109
|
+
console.log('no folio');
|
|
108
110
|
return /*#__PURE__*/React.createElement(Watermark, {
|
|
109
111
|
documentView: documentView,
|
|
110
112
|
documentViewActions: documentViewActions,
|
|
@@ -112,15 +114,16 @@ var TranscriptionView = function TranscriptionView(props) {
|
|
|
112
114
|
});
|
|
113
115
|
}
|
|
114
116
|
var folio = document.folioIndex[folioID];
|
|
115
|
-
if (!folio.transcription) {
|
|
117
|
+
if (folio && !folio.loading && !folio.transcription) {
|
|
116
118
|
return /*#__PURE__*/React.createElement(Watermark, {
|
|
117
119
|
documentView: documentView,
|
|
118
120
|
documentViewActions: documentViewActions,
|
|
119
121
|
side: side
|
|
120
122
|
});
|
|
121
123
|
}
|
|
122
|
-
var transcriptionData = folio.transcription[transcriptionType];
|
|
123
|
-
if (!transcriptionData) {
|
|
124
|
+
var transcriptionData = folio && folio.transcription && folio.transcription[transcriptionType];
|
|
125
|
+
if (folio && !folio.loading && !transcriptionData) {
|
|
126
|
+
console.log('no transcription data');
|
|
124
127
|
return /*#__PURE__*/React.createElement(Watermark, {
|
|
125
128
|
documentView: documentView,
|
|
126
129
|
documentViewActions: documentViewActions,
|
|
@@ -130,22 +133,44 @@ var TranscriptionView = function TranscriptionView(props) {
|
|
|
130
133
|
|
|
131
134
|
// Configure parser to replace certain tags with components
|
|
132
135
|
var htmlToReactParserOptionsSide = htmlToReactParserOptions(searchParams.get('zone'));
|
|
133
|
-
var html = transcriptionData.html
|
|
134
|
-
|
|
135
|
-
if (!html) {
|
|
136
|
+
var html = transcriptionData && transcriptionData.html;
|
|
137
|
+
var layout = transcriptionData && transcriptionData.layout;
|
|
138
|
+
if (folio && !folio.loading && !html) {
|
|
139
|
+
console.log('no html');
|
|
136
140
|
return /*#__PURE__*/React.createElement(Watermark, {
|
|
137
141
|
documentView: documentView,
|
|
138
142
|
documentViewActions: documentViewActions,
|
|
139
143
|
side: side
|
|
140
144
|
});
|
|
141
145
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
146
|
+
if (folio && folio.loading) {
|
|
147
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Navigation, {
|
|
148
|
+
side: side,
|
|
149
|
+
documentView: documentView,
|
|
150
|
+
documentViewActions: documentViewActions,
|
|
151
|
+
documentName: document.variorum && folio.doc_id
|
|
152
|
+
}), /*#__PURE__*/React.createElement(Pagination, {
|
|
153
|
+
side: side,
|
|
154
|
+
documentView: documentView,
|
|
155
|
+
documentViewActions: documentViewActions
|
|
156
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
157
|
+
className: "transcriptionViewComponent"
|
|
158
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
159
|
+
className: "transcriptContent"
|
|
160
|
+
}, /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(BigRingSpinner, {
|
|
161
|
+
delay: 3000,
|
|
162
|
+
color: "dark"
|
|
163
|
+
})))), /*#__PURE__*/React.createElement(Pagination, {
|
|
164
|
+
side: side,
|
|
165
|
+
documentView: documentView,
|
|
166
|
+
documentViewActions: documentViewActions
|
|
167
|
+
}));
|
|
168
|
+
}
|
|
145
169
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Navigation, {
|
|
146
170
|
side: side,
|
|
147
171
|
documentView: documentView,
|
|
148
|
-
documentViewActions: documentViewActions
|
|
172
|
+
documentViewActions: documentViewActions,
|
|
173
|
+
documentName: document.variorum && folio.doc_id
|
|
149
174
|
}), /*#__PURE__*/React.createElement(Pagination, {
|
|
150
175
|
side: side,
|
|
151
176
|
documentView: documentView,
|
|
@@ -156,7 +181,9 @@ var TranscriptionView = function TranscriptionView(props) {
|
|
|
156
181
|
className: "transcriptContent"
|
|
157
182
|
}, /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement("div", {
|
|
158
183
|
className: "surface grid-mode",
|
|
159
|
-
style:
|
|
184
|
+
style: {
|
|
185
|
+
gridTemplateAreas: layout
|
|
186
|
+
}
|
|
160
187
|
}, /*#__PURE__*/React.createElement(Parser, {
|
|
161
188
|
html: html,
|
|
162
189
|
htmlToReactParserOptionsSide: htmlToReactParserOptionsSide
|
|
@@ -19,7 +19,7 @@ var Watermark = function Watermark(_ref) {
|
|
|
19
19
|
}), /*#__PURE__*/React.createElement("div", {
|
|
20
20
|
className: "watermark"
|
|
21
21
|
}, /*#__PURE__*/React.createElement("div", {
|
|
22
|
-
className: "watermark_contents"
|
|
22
|
+
className: side !== 'third' ? "watermark_contents" : "third_pane_blank"
|
|
23
23
|
}))));
|
|
24
24
|
};
|
|
25
25
|
export default Watermark;
|
|
@@ -61,7 +61,8 @@ var XMLView = /*#__PURE__*/function (_Component) {
|
|
|
61
61
|
}, /*#__PURE__*/React.createElement(Navigation, {
|
|
62
62
|
side: side,
|
|
63
63
|
documentView: documentView,
|
|
64
|
-
documentViewActions: documentViewActions
|
|
64
|
+
documentViewActions: documentViewActions,
|
|
65
|
+
documentName: document.variorum && folio.doc_id
|
|
65
66
|
}), /*#__PURE__*/React.createElement(Pagination, {
|
|
66
67
|
side: side,
|
|
67
68
|
className: "pagination_upper",
|
|
Binary file
|
package/dist/es/src/index.js
CHANGED
|
@@ -21,8 +21,8 @@ var EditionCrafter = function EditionCrafter(props) {
|
|
|
21
21
|
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
22
22
|
theme: theme
|
|
23
23
|
}, /*#__PURE__*/React.createElement(DiploMatic, {
|
|
24
|
-
config: props
|
|
25
|
-
store: createReduxStore(props
|
|
24
|
+
config: props,
|
|
25
|
+
store: createReduxStore(props)
|
|
26
26
|
}));
|
|
27
27
|
};
|
|
28
28
|
export default EditionCrafter;
|
|
@@ -11,6 +11,7 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
11
11
|
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; }
|
|
12
12
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
13
13
|
var _marked = /*#__PURE__*/_regeneratorRuntime().mark(putResolveAction);
|
|
14
|
+
/* eslint-disable import/no-cycle */
|
|
14
15
|
import { createStore, applyMiddleware } from 'redux';
|
|
15
16
|
import createSagaMiddleware from 'redux-saga';
|
|
16
17
|
import { put } from 'redux-saga/effects';
|
|
@@ -4,8 +4,11 @@ var _marked = /*#__PURE__*/_regeneratorRuntime().mark(userNavigation),
|
|
|
4
4
|
_marked3 = /*#__PURE__*/_regeneratorRuntime().mark(resolveFolio),
|
|
5
5
|
_marked4 = /*#__PURE__*/_regeneratorRuntime().mark(resolveGlossary),
|
|
6
6
|
_marked5 = /*#__PURE__*/_regeneratorRuntime().mark(routeListenerSaga);
|
|
7
|
+
/* eslint-disable prefer-destructuring */
|
|
7
8
|
import axios from 'axios';
|
|
8
9
|
import { takeEvery, select } from 'redux-saga/effects';
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line import/no-cycle
|
|
9
12
|
import { putResolveAction } from '../model/ReduxStore';
|
|
10
13
|
import { loadFolio } from '../model/Folio';
|
|
11
14
|
var justDocument = function justDocument(state) {
|
|
@@ -47,7 +50,7 @@ function userNavigation(action) {
|
|
|
47
50
|
}, _marked);
|
|
48
51
|
}
|
|
49
52
|
function resolveDocumentManifest() {
|
|
50
|
-
var document, response;
|
|
53
|
+
var document, variorumData, _i, _Object$keys, key, response, variorumManifest, singleResponse;
|
|
51
54
|
return _regeneratorRuntime().wrap(function resolveDocumentManifest$(_context2) {
|
|
52
55
|
while (1) switch (_context2.prev = _context2.next) {
|
|
53
56
|
case 0:
|
|
@@ -56,27 +59,58 @@ function resolveDocumentManifest() {
|
|
|
56
59
|
case 2:
|
|
57
60
|
document = _context2.sent;
|
|
58
61
|
if (document.loaded) {
|
|
59
|
-
_context2.next =
|
|
62
|
+
_context2.next = 26;
|
|
60
63
|
break;
|
|
61
64
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
if (!document.variorum) {
|
|
66
|
+
_context2.next = 20;
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
variorumData = {};
|
|
70
|
+
_i = 0, _Object$keys = Object.keys(document.manifestURL);
|
|
71
|
+
case 7:
|
|
72
|
+
if (!(_i < _Object$keys.length)) {
|
|
73
|
+
_context2.next = 16;
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
key = _Object$keys[_i];
|
|
77
|
+
_context2.next = 11;
|
|
78
|
+
return axios.get(document.manifestURL[key]);
|
|
79
|
+
case 11:
|
|
65
80
|
response = _context2.sent;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
81
|
+
variorumData[key] = response.data;
|
|
82
|
+
case 13:
|
|
83
|
+
_i++;
|
|
84
|
+
_context2.next = 7;
|
|
85
|
+
break;
|
|
86
|
+
case 16:
|
|
87
|
+
variorumManifest = {
|
|
88
|
+
type: 'variorum',
|
|
89
|
+
documentData: variorumData
|
|
90
|
+
};
|
|
91
|
+
_context2.next = 19;
|
|
92
|
+
return putResolveAction('DocumentActions.loadDocument', variorumManifest);
|
|
93
|
+
case 19:
|
|
94
|
+
return _context2.abrupt("return", variorumManifest);
|
|
95
|
+
case 20:
|
|
96
|
+
_context2.next = 22;
|
|
97
|
+
return axios.get(document.manifestURL);
|
|
98
|
+
case 22:
|
|
99
|
+
singleResponse = _context2.sent;
|
|
100
|
+
_context2.next = 25;
|
|
101
|
+
return putResolveAction('DocumentActions.loadDocument', singleResponse.data);
|
|
102
|
+
case 25:
|
|
103
|
+
return _context2.abrupt("return", singleResponse.data);
|
|
104
|
+
case 26:
|
|
71
105
|
return _context2.abrupt("return", null);
|
|
72
|
-
case
|
|
106
|
+
case 27:
|
|
73
107
|
case "end":
|
|
74
108
|
return _context2.stop();
|
|
75
109
|
}
|
|
76
110
|
}, _marked2);
|
|
77
111
|
}
|
|
78
112
|
function resolveFolio(pathSegments) {
|
|
79
|
-
var document, leftID, rightID, folioIDs,
|
|
113
|
+
var document, leftID, rightID, thirdID, folioIDs, _i2, _folioIDs, folioID, folioData, folio;
|
|
80
114
|
return _regeneratorRuntime().wrap(function resolveFolio$(_context3) {
|
|
81
115
|
while (1) switch (_context3.prev = _context3.next) {
|
|
82
116
|
case 0:
|
|
@@ -85,41 +119,45 @@ function resolveFolio(pathSegments) {
|
|
|
85
119
|
case 2:
|
|
86
120
|
document = _context3.sent;
|
|
87
121
|
if (!document.loaded) {
|
|
88
|
-
_context3.next =
|
|
122
|
+
_context3.next = 22;
|
|
89
123
|
break;
|
|
90
124
|
}
|
|
91
125
|
if (pathSegments.length > 2) {
|
|
92
126
|
leftID = pathSegments[2];
|
|
93
127
|
if (pathSegments.length > 4) {
|
|
94
128
|
rightID = pathSegments[4];
|
|
129
|
+
if (pathSegments.length > 6) {
|
|
130
|
+
thirdID = pathSegments[6];
|
|
131
|
+
}
|
|
95
132
|
}
|
|
96
133
|
}
|
|
97
134
|
folioIDs = [];
|
|
98
135
|
folioIDs.push(leftID);
|
|
99
136
|
if (rightID && rightID !== leftID) folioIDs.push(rightID);
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
137
|
+
if (thirdID && thirdID !== leftID && thirdID !== rightID) folioIDs.push(thirdID);
|
|
138
|
+
_i2 = 0, _folioIDs = folioIDs;
|
|
139
|
+
case 10:
|
|
140
|
+
if (!(_i2 < _folioIDs.length)) {
|
|
141
|
+
_context3.next = 22;
|
|
104
142
|
break;
|
|
105
143
|
}
|
|
106
|
-
folioID = _folioIDs[
|
|
144
|
+
folioID = _folioIDs[_i2];
|
|
107
145
|
folioData = document.folioIndex[folioID];
|
|
108
146
|
if (!(folioData && !folioData.loading)) {
|
|
109
|
-
_context3.next =
|
|
147
|
+
_context3.next = 19;
|
|
110
148
|
break;
|
|
111
149
|
}
|
|
112
|
-
_context3.next =
|
|
150
|
+
_context3.next = 16;
|
|
113
151
|
return loadFolio(folioData);
|
|
114
|
-
case
|
|
152
|
+
case 16:
|
|
115
153
|
folio = _context3.sent;
|
|
116
|
-
_context3.next =
|
|
154
|
+
_context3.next = 19;
|
|
117
155
|
return putResolveAction('DocumentActions.loadFolio', folio);
|
|
118
|
-
case
|
|
119
|
-
|
|
120
|
-
_context3.next =
|
|
156
|
+
case 19:
|
|
157
|
+
_i2++;
|
|
158
|
+
_context3.next = 10;
|
|
121
159
|
break;
|
|
122
|
-
case
|
|
160
|
+
case 22:
|
|
123
161
|
case "end":
|
|
124
162
|
return _context3.stop();
|
|
125
163
|
}
|
|
@@ -135,23 +173,34 @@ function resolveGlossary(manifest) {
|
|
|
135
173
|
case 2:
|
|
136
174
|
glossary = _context4.sent;
|
|
137
175
|
if (glossary.loaded) {
|
|
138
|
-
_context4.next =
|
|
176
|
+
_context4.next = 16;
|
|
139
177
|
break;
|
|
140
178
|
}
|
|
141
179
|
if (!(!(manifest !== null && manifest !== void 0 && manifest.seeAlso) || manifest.seeAlso.length === 0 || !manifest.seeAlso[0].id)) {
|
|
142
|
-
_context4.next =
|
|
180
|
+
_context4.next = 9;
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
if (!(manifest.type !== 'variorum')) {
|
|
184
|
+
_context4.next = 7;
|
|
143
185
|
break;
|
|
144
186
|
}
|
|
145
187
|
throw new Error('Missing glossary link in seeAlso array.');
|
|
146
|
-
case
|
|
147
|
-
glossaryURL = manifest.seeAlso[0].id;
|
|
188
|
+
case 7:
|
|
148
189
|
_context4.next = 9;
|
|
149
|
-
return
|
|
190
|
+
return putResolveAction('GlossaryActions.loadGlossary', {});
|
|
150
191
|
case 9:
|
|
192
|
+
if (!(manifest.type !== 'variorum')) {
|
|
193
|
+
_context4.next = 16;
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
glossaryURL = manifest.seeAlso[0].id;
|
|
197
|
+
_context4.next = 13;
|
|
198
|
+
return axios.get(glossaryURL);
|
|
199
|
+
case 13:
|
|
151
200
|
response = _context4.sent;
|
|
152
|
-
_context4.next =
|
|
201
|
+
_context4.next = 16;
|
|
153
202
|
return putResolveAction('GlossaryActions.loadGlossary', response.data);
|
|
154
|
-
case
|
|
203
|
+
case 16:
|
|
155
204
|
case "end":
|
|
156
205
|
return _context4.stop();
|
|
157
206
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
#diplomatic {
|
|
2
|
+
container-type: size;
|
|
3
|
+
container-name: diplomatic;
|
|
2
4
|
#content-view, .header-wrapper, #entry-list-view, #annotation-list-view {
|
|
3
5
|
h1,
|
|
4
6
|
h2,
|
|
@@ -299,15 +301,16 @@
|
|
|
299
301
|
|
|
300
302
|
#diplomatic.fixed {
|
|
301
303
|
background: white;
|
|
302
|
-
position: fixed;
|
|
303
|
-
width:
|
|
304
|
-
height:
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
304
|
+
// position: fixed;
|
|
305
|
+
width: auto;
|
|
306
|
+
height: auto;
|
|
307
|
+
// height: calc(100% - $chrome-height);
|
|
308
|
+
// @include sm {
|
|
309
|
+
// height: calc(100% - $sm-chrome-height);
|
|
310
|
+
// }
|
|
311
|
+
// @include md {
|
|
312
|
+
// height: calc(100% - $md-chrome-height);
|
|
313
|
+
// }
|
|
311
314
|
font-size: 0.7rem;
|
|
312
315
|
|
|
313
316
|
-webkit-user-select: none;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
font-size: 15px;
|
|
4
4
|
}
|
|
5
5
|
position: fixed;
|
|
6
|
+
display: none;
|
|
6
7
|
z-index: 2;
|
|
7
8
|
height:48px;
|
|
8
9
|
white-space: nowrap;
|
|
@@ -11,7 +12,6 @@
|
|
|
11
12
|
-ms-user-select: none;
|
|
12
13
|
user-select: none;
|
|
13
14
|
padding:4px;
|
|
14
|
-
top: 75px;
|
|
15
15
|
background-color: white;
|
|
16
16
|
border-radius: 0.3rem;
|
|
17
17
|
@include sm {
|
|
@@ -19,6 +19,30 @@
|
|
|
19
19
|
}
|
|
20
20
|
@include md {
|
|
21
21
|
top: initial;
|
|
22
|
+
display: block;
|
|
23
|
+
}
|
|
24
|
+
button{
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.navigationComponentNarrow {
|
|
30
|
+
#tool-bar-buttons{
|
|
31
|
+
font-size: 15px;
|
|
32
|
+
}
|
|
33
|
+
display: block;
|
|
34
|
+
width: auto;
|
|
35
|
+
z-index: 2;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
-webkit-user-select: none;
|
|
38
|
+
-moz-user-select: none;
|
|
39
|
+
-ms-user-select: none;
|
|
40
|
+
user-select: none;
|
|
41
|
+
padding:4px;
|
|
42
|
+
background-color: white;
|
|
43
|
+
@include md {
|
|
44
|
+
top: initial;
|
|
45
|
+
display: none;
|
|
22
46
|
}
|
|
23
47
|
button{
|
|
24
48
|
cursor: pointer;
|
|
@@ -26,15 +50,26 @@
|
|
|
26
50
|
}
|
|
27
51
|
|
|
28
52
|
.navigationRow{
|
|
29
|
-
display:
|
|
53
|
+
display:none;
|
|
30
54
|
justify-content:space-between;
|
|
31
55
|
padding:12px 10px 12px 10px;
|
|
32
|
-
|
|
33
|
-
|
|
56
|
+
@include md {
|
|
57
|
+
display:flex;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.navigationRowNarrow {
|
|
62
|
+
display:flex;
|
|
63
|
+
justify-content:space-between;
|
|
64
|
+
align-items: baseline;
|
|
65
|
+
padding:6px 5px 6px 5px;
|
|
66
|
+
@include md {
|
|
67
|
+
display:none;
|
|
68
|
+
}
|
|
34
69
|
}
|
|
35
70
|
|
|
36
71
|
.helpIcon {
|
|
37
|
-
display:
|
|
72
|
+
display: inline-block;
|
|
38
73
|
margin-top:6px;
|
|
39
74
|
margin-right:16px;
|
|
40
75
|
@include md {
|
|
@@ -59,6 +94,14 @@
|
|
|
59
94
|
}
|
|
60
95
|
|
|
61
96
|
}
|
|
97
|
+
|
|
98
|
+
.imageViewComponent .navigationComponentNarrow {
|
|
99
|
+
background-color: rgba(0,0,0,1);
|
|
100
|
+
color: #ffffff;
|
|
101
|
+
border-radius: 0;
|
|
102
|
+
opacity: 1;
|
|
103
|
+
}
|
|
104
|
+
|
|
62
105
|
.transcriptionViewComponent .navigationComponent {
|
|
63
106
|
background-color: rgba(255,255,255,1);;
|
|
64
107
|
color: #000000;
|
|
@@ -77,12 +120,20 @@
|
|
|
77
120
|
|
|
78
121
|
.breadcrumbs {
|
|
79
122
|
overflow:hidden;
|
|
80
|
-
display:
|
|
123
|
+
display: hidden;
|
|
81
124
|
@include md {
|
|
82
125
|
display: block;
|
|
83
126
|
}
|
|
84
127
|
}
|
|
85
128
|
|
|
129
|
+
.breadcrumbsNarrow {
|
|
130
|
+
overflow:hidden;
|
|
131
|
+
display: block;
|
|
132
|
+
@include md {
|
|
133
|
+
display: none;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
86
137
|
.breadcrumbs .folioName {
|
|
87
138
|
display:inline;
|
|
88
139
|
white-space: nowrap;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/* Small inline spinner */
|
|
2
|
+
.inline-ring-spinner {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
margin-left: 10px;
|
|
5
|
+
margin-right: 10px;
|
|
6
|
+
width: 16px;
|
|
7
|
+
height: 16px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.inline-ring-spinner .light {
|
|
11
|
+
border: 3px solid #fff;
|
|
12
|
+
border-color: #fff transparent transparent transparent;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.inline-ring-spinner .dark {
|
|
16
|
+
border: 3px solid #000;
|
|
17
|
+
border-color: #000 transparent transparent transparent;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.inline-ring-spinner div {
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
display: block;
|
|
23
|
+
position: absolute;
|
|
24
|
+
width: 16px;
|
|
25
|
+
height: 16px;
|
|
26
|
+
border-radius: 50%;
|
|
27
|
+
animation: inline-ring-spinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
|
28
|
+
}
|
|
29
|
+
.inline-ring-spinner div:nth-child(1) {
|
|
30
|
+
animation-delay: -0.45s;
|
|
31
|
+
}
|
|
32
|
+
.inline-ring-spinner div:nth-child(2) {
|
|
33
|
+
animation-delay: -0.3s;
|
|
34
|
+
}
|
|
35
|
+
.inline-ring-spinner div:nth-child(3) {
|
|
36
|
+
animation-delay: -0.15s;
|
|
37
|
+
}
|
|
38
|
+
@keyframes inline-ring-spinner {
|
|
39
|
+
0% {
|
|
40
|
+
transform: rotate(0deg);
|
|
41
|
+
}
|
|
42
|
+
100% {
|
|
43
|
+
transform: rotate(360deg);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Big spinner */
|
|
48
|
+
.big-ring-spinner {
|
|
49
|
+
width: 100%;
|
|
50
|
+
height: 100vh;
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
}
|
|
54
|
+
.big-ring-spinner div {
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
display: block;
|
|
57
|
+
position: absolute;
|
|
58
|
+
width: 128px;
|
|
59
|
+
height: 128px;
|
|
60
|
+
margin-top: 30vh;
|
|
61
|
+
border-radius: 50%;
|
|
62
|
+
animation: big-ring-spinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
|
63
|
+
}
|
|
64
|
+
.big-ring-spinner.dark div {
|
|
65
|
+
border: 16px solid #000;
|
|
66
|
+
border-color: #000 transparent transparent transparent;
|
|
67
|
+
}
|
|
68
|
+
.big-ring-spinner.light div {
|
|
69
|
+
border: 16px solid #fff;
|
|
70
|
+
border-color: #fff transparent transparent transparent;
|
|
71
|
+
}
|
|
72
|
+
.big-ring-spinner div:nth-child(1) {
|
|
73
|
+
animation-delay: -0.45s;
|
|
74
|
+
}
|
|
75
|
+
.big-ring-spinner div:nth-child(2) {
|
|
76
|
+
animation-delay: -0.3s;
|
|
77
|
+
}
|
|
78
|
+
.big-ring-spinner div:nth-child(3) {
|
|
79
|
+
animation-delay: -0.15s;
|
|
80
|
+
}
|
|
81
|
+
@keyframes big-ring-spinner {
|
|
82
|
+
0% {
|
|
83
|
+
transform: rotate(0deg);
|
|
84
|
+
}
|
|
85
|
+
100% {
|
|
86
|
+
transform: rotate(360deg);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -2,18 +2,32 @@
|
|
|
2
2
|
height: 100%;
|
|
3
3
|
width: 100%;
|
|
4
4
|
display: grid;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.split-pane-view.two-pane {
|
|
5
8
|
grid-template-areas: "image_viewer divider transcription";
|
|
6
9
|
}
|
|
7
10
|
|
|
11
|
+
.split-pane-view.three-pane {
|
|
12
|
+
grid-template-areas: "image_viewer divider transcription divider_two third_pane";
|
|
13
|
+
}
|
|
14
|
+
|
|
8
15
|
.split-pane-view > .divider {
|
|
9
16
|
z-index: 2;
|
|
10
|
-
grid-area: divider;
|
|
11
17
|
width: 1rem;
|
|
12
18
|
background: #BBB;
|
|
13
19
|
cursor:ew-resize;
|
|
14
20
|
display: flex;
|
|
15
21
|
}
|
|
16
22
|
|
|
23
|
+
.split-pane-view > .divider.first_divider {
|
|
24
|
+
grid-area: divider;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.split-pane-view > .divider.second_divider {
|
|
28
|
+
grid-area: divider_two;
|
|
29
|
+
}
|
|
30
|
+
|
|
17
31
|
.split-pane-view > .divider > .drawer-button {
|
|
18
32
|
align-self: center;
|
|
19
33
|
align: center;
|