@cu-mkp/editioncrafter 0.0.8 → 0.1.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.
- package/dist/editioncrafter.min.js +1 -1
- package/dist/editioncrafter.min.js.LICENSE.txt +15 -3
- package/dist/es/src/action/DiplomaticActions.js +2 -2
- package/dist/es/src/action/DocumentActions.js +49 -37
- package/dist/es/src/action/GlossaryActions.js +2 -2
- package/dist/es/src/component/DiploMatic.js +41 -67
- package/dist/es/src/component/DocumentView.js +332 -371
- package/dist/es/src/component/EditorComment.js +67 -96
- package/dist/es/src/component/FigureImage.js +1 -1
- package/dist/es/src/component/GlossaryView.js +2 -2
- package/dist/es/src/component/ImageGridView.js +2 -2
- package/dist/es/src/component/ImageView.js +150 -94
- package/dist/es/src/component/ImageZoomControl.js +37 -59
- package/dist/es/src/component/JumpToFolio.js +56 -90
- package/dist/es/src/component/Navigation.js +220 -230
- package/dist/es/src/component/Parser.js +42 -0
- package/dist/es/src/component/RouteListener.js +20 -52
- package/dist/es/src/component/SeaDragonComponent.js +16 -42
- package/dist/es/src/component/SplitPaneView.js +2 -2
- package/dist/es/src/component/TranscriptionView.js +115 -112
- package/dist/es/src/hooks/useIsWidthUp.js +7 -0
- package/dist/es/src/model/Folio.js +2 -2
- package/dist/es/src/model/ReduxStore.js +3 -3
- package/dist/es/src/model/folioLayout.js +14 -5
- package/dist/es/src/saga/RouteListenerSaga.js +1 -1
- package/dist/es/src/saga/rootSaga.js +1 -1
- package/dist/es/src/scss/_CETEIcean.scss +0 -2
- package/dist/es/src/scss/_imageGridView.scss +6 -3
- package/dist/es/src/scss/_imageView.scss +16 -1
- package/dist/es/src/scss/_transcriptView.scss +15 -0
- package/package.json +21 -25
- package/dist/es/src/hocs/withRouter.js +0 -22
- package/dist/es/src/img/openseadragon/button_grouphover.png +0 -0
- package/dist/es/src/img/openseadragon/button_hover.png +0 -0
- package/dist/es/src/img/openseadragon/button_pressed.png +0 -0
- package/dist/es/src/img/openseadragon/button_rest.png +0 -0
- package/dist/es/src/img/openseadragon/fullpage_grouphover.png +0 -0
- package/dist/es/src/img/openseadragon/fullpage_hover.png +0 -0
- package/dist/es/src/img/openseadragon/fullpage_pressed.png +0 -0
- package/dist/es/src/img/openseadragon/fullpage_rest.png +0 -0
- package/dist/es/src/img/openseadragon/home_grouphover.png +0 -0
- package/dist/es/src/img/openseadragon/home_hover.png +0 -0
- package/dist/es/src/img/openseadragon/home_pressed.png +0 -0
- package/dist/es/src/img/openseadragon/home_rest.png +0 -0
- package/dist/es/src/img/openseadragon/next_grouphover.png +0 -0
- package/dist/es/src/img/openseadragon/next_hover.png +0 -0
- package/dist/es/src/img/openseadragon/next_pressed.png +0 -0
- package/dist/es/src/img/openseadragon/next_rest.png +0 -0
- package/dist/es/src/img/openseadragon/previous_grouphover.png +0 -0
- package/dist/es/src/img/openseadragon/previous_hover.png +0 -0
- package/dist/es/src/img/openseadragon/previous_pressed.png +0 -0
- package/dist/es/src/img/openseadragon/previous_rest.png +0 -0
- package/dist/es/src/img/openseadragon/rotateleft_grouphover.png +0 -0
- package/dist/es/src/img/openseadragon/rotateleft_hover.png +0 -0
- package/dist/es/src/img/openseadragon/rotateleft_pressed.png +0 -0
- package/dist/es/src/img/openseadragon/rotateleft_rest.png +0 -0
- package/dist/es/src/img/openseadragon/rotateright_grouphover.png +0 -0
- package/dist/es/src/img/openseadragon/rotateright_hover.png +0 -0
- package/dist/es/src/img/openseadragon/rotateright_pressed.png +0 -0
- package/dist/es/src/img/openseadragon/rotateright_rest.png +0 -0
- package/dist/es/src/img/openseadragon/zoomin_grouphover.png +0 -0
- package/dist/es/src/img/openseadragon/zoomin_hover.png +0 -0
- package/dist/es/src/img/openseadragon/zoomin_pressed.png +0 -0
- package/dist/es/src/img/openseadragon/zoomin_rest.png +0 -0
- package/dist/es/src/img/openseadragon/zoomout_grouphover.png +0 -0
- package/dist/es/src/img/openseadragon/zoomout_hover.png +0 -0
- package/dist/es/src/img/openseadragon/zoomout_pressed.png +0 -0
- package/dist/es/src/img/openseadragon/zoomout_rest.png +0 -0
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
autosize 4.0.4
|
|
3
|
+
license: MIT
|
|
4
|
+
http://www.jacklmoore.com/autosize
|
|
5
|
+
*/
|
|
6
|
+
|
|
1
7
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
2
8
|
|
|
3
9
|
/**
|
|
@@ -114,12 +120,18 @@
|
|
|
114
120
|
* SOFTWARE.
|
|
115
121
|
*/
|
|
116
122
|
|
|
117
|
-
//! Built on
|
|
123
|
+
//! Built on 2021-12-15
|
|
124
|
+
|
|
125
|
+
//! Built on 2023-05-25
|
|
118
126
|
|
|
119
|
-
//! Git commit:
|
|
127
|
+
//! Git commit: v3.0.0-0-3eded36
|
|
128
|
+
|
|
129
|
+
//! Git commit: v4.1.0-0-8849681
|
|
120
130
|
|
|
121
131
|
//! License: http://openseadragon.github.io/license/
|
|
122
132
|
|
|
123
133
|
//! http://openseadragon.github.io
|
|
124
134
|
|
|
125
|
-
//! openseadragon
|
|
135
|
+
//! openseadragon 3.0.0
|
|
136
|
+
|
|
137
|
+
//! openseadragon 4.1.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
function ownKeys(
|
|
2
|
-
function _objectSpread(
|
|
1
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
4
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
5
5
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
2
2
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
3
3
|
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; }
|
|
4
|
-
function ownKeys(
|
|
5
|
-
function _objectSpread(
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
8
8
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
@@ -66,12 +66,9 @@ function parseImageURLs(canvas) {
|
|
|
66
66
|
if (annotation.type !== 'Annotation') throwError("Expected Annotation in items property of ".concat(annotationPage.id));
|
|
67
67
|
if (annotation.motivation === 'painting') {
|
|
68
68
|
if (!annotation.body) throwError("Expected body property in Annotation ".concat(annotation.id));
|
|
69
|
-
if (!annotation.body.thumbnail) throwError("Expected body.thumbnail property in Annotation ".concat(annotation.id));
|
|
70
|
-
var thumbnailURL = annotation.body.thumbnail[0].id;
|
|
71
|
-
if (!thumbnailURL) throwError("Unable to find thumbnail for resource: ".concat(annotation.body.id));
|
|
72
69
|
return {
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
bodyId: annotation.body.id,
|
|
71
|
+
imageURL: "".concat(annotation.body.id, "/info.json")
|
|
75
72
|
};
|
|
76
73
|
}
|
|
77
74
|
}
|
|
@@ -105,37 +102,38 @@ function parseAnnotationURLs(canvas, transcriptionTypes) {
|
|
|
105
102
|
try {
|
|
106
103
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
107
104
|
var annotationPage = _step3.value;
|
|
108
|
-
if (annotationPage.type
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
105
|
+
if (annotationPage.type === 'AnnotationPage') {
|
|
106
|
+
if (!annotationPage.items) throwError("Expected items property in AnnotationPage ".concat(annotationPage.id));
|
|
107
|
+
var _iterator4 = _createForOfIteratorHelper(annotationPage.items),
|
|
108
|
+
_step4;
|
|
109
|
+
try {
|
|
110
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
111
|
+
var annotation = _step4.value;
|
|
112
|
+
if (annotation.type !== 'Annotation') throwError("Expected Annotation in items property of ".concat(annotationPage.id));
|
|
113
|
+
if (annotation.motivation === 'supplementing') {
|
|
114
|
+
if (!annotation.body) throwError("Expected body property in Annotation ".concat(annotation.id));
|
|
115
|
+
var annotationBody = annotation.body;
|
|
116
|
+
if (annotationBody.profile === textPartialResourceProfileID && annotationBody.type === 'TextPartial') {
|
|
117
|
+
if (!annotationBody.id) throwError("Expected id property in TextPartial in ".concat(annotation.id));
|
|
118
|
+
if (!annotationBody.format) throwError("Expected format property in TextPartial in ".concat(annotation.id));
|
|
119
|
+
var id = annotationBody.id,
|
|
120
|
+
format = annotationBody.format;
|
|
121
|
+
var idParts = id.split('/');
|
|
122
|
+
if (idParts.length < 5) throwError("TextPartial id property is in the wrong format: ".concat(id));
|
|
123
|
+
var transcriptionTypeID = idParts[idParts.length - 2];
|
|
124
|
+
if (transcriptionTypes[transcriptionTypeID]) {
|
|
125
|
+
if (!annos[transcriptionTypeID]) annos[transcriptionTypeID] = {};
|
|
126
|
+
if (format === 'text/html') annos[transcriptionTypeID].htmlURL = id;
|
|
127
|
+
if (format === 'text/xml') annos[transcriptionTypeID].xmlURL = id;
|
|
128
|
+
}
|
|
131
129
|
}
|
|
132
130
|
}
|
|
133
131
|
}
|
|
132
|
+
} catch (err) {
|
|
133
|
+
_iterator4.e(err);
|
|
134
|
+
} finally {
|
|
135
|
+
_iterator4.f();
|
|
134
136
|
}
|
|
135
|
-
} catch (err) {
|
|
136
|
-
_iterator4.e(err);
|
|
137
|
-
} finally {
|
|
138
|
-
_iterator4.f();
|
|
139
137
|
}
|
|
140
138
|
}
|
|
141
139
|
} catch (err) {
|
|
@@ -146,6 +144,9 @@ function parseAnnotationURLs(canvas, transcriptionTypes) {
|
|
|
146
144
|
}
|
|
147
145
|
return annos;
|
|
148
146
|
}
|
|
147
|
+
|
|
148
|
+
// The largest dimension for either width or height allowed in a thumbnail.
|
|
149
|
+
var MAX_THUMBNAIL_DIMENSION = 130;
|
|
149
150
|
function parseManifest(manifest, transcriptionTypes) {
|
|
150
151
|
var folios = [];
|
|
151
152
|
|
|
@@ -163,16 +164,27 @@ function parseManifest(manifest, transcriptionTypes) {
|
|
|
163
164
|
var folioID = canvas.id.substr(canvas.id.lastIndexOf('/') + 1);
|
|
164
165
|
var canvasLabel = parseLabel(canvas);
|
|
165
166
|
var _parseImageURLs = parseImageURLs(canvas),
|
|
166
|
-
|
|
167
|
-
|
|
167
|
+
bodyId = _parseImageURLs.bodyId,
|
|
168
|
+
imageURL = _parseImageURLs.imageURL;
|
|
168
169
|
var annotationURLs = parseAnnotationURLs(canvas, transcriptionTypes);
|
|
170
|
+
var ratio = canvas.width / canvas.height;
|
|
171
|
+
var thumbnailDimensions = [];
|
|
172
|
+
if (ratio > 1) {
|
|
173
|
+
thumbnailDimensions = [MAX_THUMBNAIL_DIMENSION, Math.round(MAX_THUMBNAIL_DIMENSION / ratio)];
|
|
174
|
+
} else {
|
|
175
|
+
thumbnailDimensions = [Math.round(MAX_THUMBNAIL_DIMENSION * ratio), MAX_THUMBNAIL_DIMENSION];
|
|
176
|
+
}
|
|
177
|
+
var thumbnailURL = "".concat(bodyId, "/full/").concat(thumbnailDimensions.join(','), "/0/default.jpg");
|
|
169
178
|
var folio = {
|
|
170
179
|
id: folioID,
|
|
171
180
|
name: canvasLabel,
|
|
172
181
|
pageNumber: i,
|
|
173
182
|
image_zoom_url: imageURL,
|
|
174
183
|
image_thumbnail_url: thumbnailURL,
|
|
175
|
-
annotationURLs: annotationURLs
|
|
184
|
+
annotationURLs: annotationURLs,
|
|
185
|
+
annotations: canvas.annotations ? canvas.annotations.filter(function (a) {
|
|
186
|
+
return a.motivation === 'tagging';
|
|
187
|
+
}) : []
|
|
176
188
|
};
|
|
177
189
|
folios.push(folio);
|
|
178
190
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
function ownKeys(
|
|
2
|
-
function _objectSpread(
|
|
1
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
4
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
5
5
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
@@ -1,76 +1,50 @@
|
|
|
1
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
5
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
6
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
7
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
8
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
-
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
10
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
13
1
|
import withWidth from '@material-ui/core/withWidth';
|
|
14
2
|
import { createBrowserHistory } from 'history';
|
|
15
|
-
import React, {
|
|
3
|
+
import React, { useEffect } from 'react';
|
|
16
4
|
import { connect, Provider } from 'react-redux';
|
|
17
5
|
import { HashRouter, Route, Navigate, Routes } from 'react-router-dom';
|
|
18
6
|
import DocumentView from './DocumentView';
|
|
19
7
|
import RouteListener from './RouteListener';
|
|
20
|
-
var DiploMatic =
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
path: "/ec",
|
|
61
|
-
element: /*#__PURE__*/React.createElement(DocumentView, this.props),
|
|
62
|
-
exact: true
|
|
63
|
-
}), /*#__PURE__*/React.createElement(Route, {
|
|
64
|
-
path: "/",
|
|
65
|
-
element: /*#__PURE__*/React.createElement(Navigate, {
|
|
66
|
-
to: "/ec"
|
|
67
|
-
}),
|
|
68
|
-
exact: true
|
|
69
|
-
}))))));
|
|
70
|
-
}
|
|
71
|
-
}]);
|
|
72
|
-
return DiploMatic;
|
|
73
|
-
}(Component);
|
|
8
|
+
var DiploMatic = function DiploMatic(props) {
|
|
9
|
+
useEffect(function () {
|
|
10
|
+
var history = createBrowserHistory();
|
|
11
|
+
history.listen(function () {
|
|
12
|
+
window.scrollTo(0, 0);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
var fixedFrameMode = props.diplomatic.fixedFrameMode;
|
|
16
|
+
var fixedFrameModeClass = fixedFrameMode ? 'fixed' : 'sticky';
|
|
17
|
+
return /*#__PURE__*/React.createElement(Provider, {
|
|
18
|
+
store: props.store
|
|
19
|
+
}, /*#__PURE__*/React.createElement(HashRouter, null, /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
id: "diplomatic",
|
|
21
|
+
className: fixedFrameModeClass
|
|
22
|
+
}, /*#__PURE__*/React.createElement(RouteListener, null), /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
id: "content"
|
|
24
|
+
}, /*#__PURE__*/React.createElement(Routes, null, /*#__PURE__*/React.createElement(Route, {
|
|
25
|
+
path: "/ec/:folioID/:transcriptionType/:folioID2/:transcriptionType2",
|
|
26
|
+
element: /*#__PURE__*/React.createElement(DocumentView, props),
|
|
27
|
+
exact: true
|
|
28
|
+
}), /*#__PURE__*/React.createElement(Route, {
|
|
29
|
+
path: "/ec/:folioID/:transcriptionType",
|
|
30
|
+
element: /*#__PURE__*/React.createElement(DocumentView, props),
|
|
31
|
+
exact: true
|
|
32
|
+
}), /*#__PURE__*/React.createElement(Route, {
|
|
33
|
+
path: "/ec/:folioID",
|
|
34
|
+
element: /*#__PURE__*/React.createElement(DocumentView, props),
|
|
35
|
+
exact: true
|
|
36
|
+
}), /*#__PURE__*/React.createElement(Route, {
|
|
37
|
+
path: "/ec",
|
|
38
|
+
element: /*#__PURE__*/React.createElement(DocumentView, props),
|
|
39
|
+
exact: true
|
|
40
|
+
}), /*#__PURE__*/React.createElement(Route, {
|
|
41
|
+
path: "/",
|
|
42
|
+
element: /*#__PURE__*/React.createElement(Navigate, {
|
|
43
|
+
to: "/ec"
|
|
44
|
+
}),
|
|
45
|
+
exact: true
|
|
46
|
+
}))))));
|
|
47
|
+
};
|
|
74
48
|
function mapStateToProps(state) {
|
|
75
49
|
return {
|
|
76
50
|
diplomatic: state.diplomatic,
|