@cu-mkp/editioncrafter 0.0.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.
Files changed (138) hide show
  1. package/dist/cjs/src/action/CommentActions.js +20 -0
  2. package/dist/cjs/src/action/DiplomaticActions.js +19 -0
  3. package/dist/cjs/src/action/DocumentActions.js +188 -0
  4. package/dist/cjs/src/action/GlossaryActions.js +20 -0
  5. package/dist/cjs/src/action/initialState/commentInitialState.js +13 -0
  6. package/dist/cjs/src/action/initialState/diplomaticInitialState.js +10 -0
  7. package/dist/cjs/src/action/initialState/documentInitialState.js +17 -0
  8. package/dist/cjs/src/action/initialState/glossaryInitialState.js +13 -0
  9. package/dist/cjs/src/action/rootReducer.js +30 -0
  10. package/dist/cjs/src/component/AlphabetLinks.js +76 -0
  11. package/dist/cjs/src/component/CustomizedTooltops.js +173 -0
  12. package/dist/cjs/src/component/DiploMatic.js +90 -0
  13. package/dist/cjs/src/component/DocumentView.js +427 -0
  14. package/dist/cjs/src/component/EditorComment.js +124 -0
  15. package/dist/cjs/src/component/ErrorBoundary.js +71 -0
  16. package/dist/cjs/src/component/FigureImage.js +82 -0
  17. package/dist/cjs/src/component/GlossaryView.js +166 -0
  18. package/dist/cjs/src/component/HelpPopper.js +83 -0
  19. package/dist/cjs/src/component/ImageGridView.js +193 -0
  20. package/dist/cjs/src/component/ImageView.js +125 -0
  21. package/dist/cjs/src/component/ImageZoomControl.js +67 -0
  22. package/dist/cjs/src/component/JumpToFolio.js +103 -0
  23. package/dist/cjs/src/component/Navigation.js +266 -0
  24. package/dist/cjs/src/component/Pagination.js +81 -0
  25. package/dist/cjs/src/component/RouteListener.js +66 -0
  26. package/dist/cjs/src/component/SeaDragonComponent.js +51 -0
  27. package/dist/cjs/src/component/SinglePaneView.js +46 -0
  28. package/dist/cjs/src/component/SplitPaneView.js +164 -0
  29. package/dist/cjs/src/component/TranscriptionView.js +147 -0
  30. package/dist/cjs/src/component/XMLView.js +154 -0
  31. package/dist/cjs/src/globals.d.ts +1 -0
  32. package/dist/cjs/src/hocs/withRouter.js +29 -0
  33. package/dist/cjs/src/icons/ByIcon.js +27 -0
  34. package/dist/cjs/src/icons/CcIcon.js +27 -0
  35. package/dist/cjs/src/icons/NcIcon.js +27 -0
  36. package/dist/cjs/src/icons/SaIcon.js +27 -0
  37. package/dist/cjs/src/icons/SideMenuIconLeft.js +49 -0
  38. package/dist/cjs/src/icons/SideMenuIconRight.js +49 -0
  39. package/dist/cjs/src/index.js +34 -0
  40. package/dist/cjs/src/lib/copyObject.js +11 -0
  41. package/dist/cjs/src/lib/registerServiceWorker.js +95 -0
  42. package/dist/cjs/src/model/DocumentHelper.js +17 -0
  43. package/dist/cjs/src/model/Folio.js +92 -0
  44. package/dist/cjs/src/model/ReduxStore.js +110 -0
  45. package/dist/cjs/src/model/folioLayout.js +416 -0
  46. package/dist/cjs/src/polyfills.js +212 -0
  47. package/dist/cjs/src/saga/RouteListenerSaga.js +198 -0
  48. package/dist/cjs/src/saga/rootSaga.js +23 -0
  49. package/dist/cjs/src/scss/_CETEIcean.scss +914 -0
  50. package/dist/cjs/src/scss/_base.scss +187 -0
  51. package/dist/cjs/src/scss/_diplomatic.scss +332 -0
  52. package/dist/cjs/src/scss/_globalNavigation.scss +34 -0
  53. package/dist/cjs/src/scss/_glossary.scss +105 -0
  54. package/dist/cjs/src/scss/_imageGridView.scss +60 -0
  55. package/dist/cjs/src/scss/_imageView.scss +16 -0
  56. package/dist/cjs/src/scss/_imageZoomControl.scss +51 -0
  57. package/dist/cjs/src/scss/_jumpbox.scss +42 -0
  58. package/dist/cjs/src/scss/_navigation.scss +135 -0
  59. package/dist/cjs/src/scss/_pagination.scss +36 -0
  60. package/dist/cjs/src/scss/_spinner.scss +60 -0
  61. package/dist/cjs/src/scss/_splitPaneView.scss +35 -0
  62. package/dist/cjs/src/scss/_thumbnails.scss +17 -0
  63. package/dist/cjs/src/scss/_transcriptView.scss +178 -0
  64. package/dist/cjs/src/scss/_watermark.scss +19 -0
  65. package/dist/cjs/src/scss/_xmlView.scss +25 -0
  66. package/dist/cjs/src/scss/editioncrafter.scss +109 -0
  67. package/dist/editioncrafter.css +2462 -0
  68. package/dist/editioncrafter.css.map +1 -0
  69. package/dist/editioncrafter.min.js +3 -0
  70. package/dist/editioncrafter.min.js.LICENSE.txt +125 -0
  71. package/dist/editioncrafter.min.js.map +1 -0
  72. package/dist/es/src/action/CommentActions.js +13 -0
  73. package/dist/es/src/action/DiplomaticActions.js +12 -0
  74. package/dist/es/src/action/DocumentActions.js +181 -0
  75. package/dist/es/src/action/GlossaryActions.js +13 -0
  76. package/dist/es/src/action/initialState/commentInitialState.js +7 -0
  77. package/dist/es/src/action/initialState/diplomaticInitialState.js +3 -0
  78. package/dist/es/src/action/initialState/documentInitialState.js +11 -0
  79. package/dist/es/src/action/initialState/glossaryInitialState.js +7 -0
  80. package/dist/es/src/action/rootReducer.js +23 -0
  81. package/dist/es/src/component/AlphabetLinks.js +67 -0
  82. package/dist/es/src/component/CustomizedTooltops.js +165 -0
  83. package/dist/es/src/component/DiploMatic.js +80 -0
  84. package/dist/es/src/component/DocumentView.js +417 -0
  85. package/dist/es/src/component/EditorComment.js +114 -0
  86. package/dist/es/src/component/ErrorBoundary.js +63 -0
  87. package/dist/es/src/component/FigureImage.js +74 -0
  88. package/dist/es/src/component/GlossaryView.js +156 -0
  89. package/dist/es/src/component/HelpPopper.js +75 -0
  90. package/dist/es/src/component/ImageGridView.js +185 -0
  91. package/dist/es/src/component/ImageView.js +115 -0
  92. package/dist/es/src/component/ImageZoomControl.js +60 -0
  93. package/dist/es/src/component/JumpToFolio.js +95 -0
  94. package/dist/es/src/component/Navigation.js +256 -0
  95. package/dist/es/src/component/Pagination.js +73 -0
  96. package/dist/es/src/component/RouteListener.js +58 -0
  97. package/dist/es/src/component/SeaDragonComponent.js +42 -0
  98. package/dist/es/src/component/SinglePaneView.js +37 -0
  99. package/dist/es/src/component/SplitPaneView.js +155 -0
  100. package/dist/es/src/component/TranscriptionView.js +137 -0
  101. package/dist/es/src/component/XMLView.js +144 -0
  102. package/dist/es/src/globals.d.ts +1 -0
  103. package/dist/es/src/hocs/withRouter.js +22 -0
  104. package/dist/es/src/icons/ByIcon.js +18 -0
  105. package/dist/es/src/icons/CcIcon.js +18 -0
  106. package/dist/es/src/icons/NcIcon.js +18 -0
  107. package/dist/es/src/icons/SaIcon.js +18 -0
  108. package/dist/es/src/icons/SideMenuIconLeft.js +40 -0
  109. package/dist/es/src/icons/SideMenuIconRight.js +40 -0
  110. package/dist/es/src/index.js +27 -0
  111. package/dist/es/src/lib/copyObject.js +4 -0
  112. package/dist/es/src/lib/registerServiceWorker.js +88 -0
  113. package/dist/es/src/model/DocumentHelper.js +10 -0
  114. package/dist/es/src/model/Folio.js +85 -0
  115. package/dist/es/src/model/ReduxStore.js +101 -0
  116. package/dist/es/src/model/folioLayout.js +407 -0
  117. package/dist/es/src/polyfills.js +216 -0
  118. package/dist/es/src/saga/RouteListenerSaga.js +191 -0
  119. package/dist/es/src/saga/rootSaga.js +16 -0
  120. package/dist/es/src/scss/_CETEIcean.scss +914 -0
  121. package/dist/es/src/scss/_base.scss +187 -0
  122. package/dist/es/src/scss/_diplomatic.scss +332 -0
  123. package/dist/es/src/scss/_globalNavigation.scss +34 -0
  124. package/dist/es/src/scss/_glossary.scss +105 -0
  125. package/dist/es/src/scss/_imageGridView.scss +60 -0
  126. package/dist/es/src/scss/_imageView.scss +16 -0
  127. package/dist/es/src/scss/_imageZoomControl.scss +51 -0
  128. package/dist/es/src/scss/_jumpbox.scss +42 -0
  129. package/dist/es/src/scss/_navigation.scss +135 -0
  130. package/dist/es/src/scss/_pagination.scss +36 -0
  131. package/dist/es/src/scss/_spinner.scss +60 -0
  132. package/dist/es/src/scss/_splitPaneView.scss +35 -0
  133. package/dist/es/src/scss/_thumbnails.scss +17 -0
  134. package/dist/es/src/scss/_transcriptView.scss +178 -0
  135. package/dist/es/src/scss/_watermark.scss +19 -0
  136. package/dist/es/src/scss/_xmlView.scss +25 -0
  137. package/dist/es/src/scss/editioncrafter.scss +109 -0
  138. package/package.json +119 -0
@@ -0,0 +1,60 @@
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
+ import React from 'react';
14
+ var ImageZoomControl = /*#__PURE__*/function (_React$Component) {
15
+ _inherits(ImageZoomControl, _React$Component);
16
+ var _super = _createSuper(ImageZoomControl);
17
+ function ImageZoomControl() {
18
+ _classCallCheck(this, ImageZoomControl);
19
+ return _super.apply(this, arguments);
20
+ }
21
+ _createClass(ImageZoomControl, [{
22
+ key: "render",
23
+ value: function render() {
24
+ var in_id = "os-zoom-in ".concat(this.props.side);
25
+ var out_id = "os-zoom-out ".concat(this.props.side);
26
+ var onZoomGrid = this.props.documentView.bookMode ? null : this.props.onZoomGrid;
27
+ return /*#__PURE__*/React.createElement("ul", {
28
+ className: "ImageZoomControl"
29
+ }, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("i", {
30
+ title: "Zoom In",
31
+ id: in_id,
32
+ className: "zoom-in fas fa-plus-circle fa-2x"
33
+ })), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("i", {
34
+ title: "Fixed Zoom 1",
35
+ onClick: this.props.onZoomFixed_1,
36
+ className: "zoom-3 fas fa-circle fa-2x"
37
+ })), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("i", {
38
+ title: "Fixed Zoom 2",
39
+ onClick: this.props.onZoomFixed_2,
40
+ className: "zoom-2 fas fa-circle fa-lg"
41
+ })), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("i", {
42
+ title: "Fixed Zoom 3",
43
+ onClick: this.props.onZoomFixed_3,
44
+ className: "zoom-1 fas fa-circle"
45
+ })), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("i", {
46
+ title: "Zoom Out",
47
+ id: out_id,
48
+ className: "zoom-out fas fa-minus-circle fa-2x"
49
+ })), /*#__PURE__*/React.createElement("li", {
50
+ className: this.props.documentView.bookMode ? 'disabled' : ''
51
+ }, /*#__PURE__*/React.createElement("i", {
52
+ title: "Return to grid mode (not available in book mode)",
53
+ onClick: onZoomGrid,
54
+ className: "zoom-grid fas fa-th fa-2x"
55
+ })));
56
+ }
57
+ }]);
58
+ return ImageZoomControl;
59
+ }(React.Component);
60
+ export { ImageZoomControl as default };
@@ -0,0 +1,95 @@
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
+ import React from 'react';
14
+ var JumpToFolio = /*#__PURE__*/function (_React$Component) {
15
+ _inherits(JumpToFolio, _React$Component);
16
+ var _super = _createSuper(JumpToFolio);
17
+ function JumpToFolio(props) {
18
+ var _this;
19
+ _classCallCheck(this, JumpToFolio);
20
+ _this = _super.call(this, props);
21
+ _this.handleSubmit = _this.handleSubmit.bind(_assertThisInitialized(_this));
22
+ _this.state = {
23
+ textInput: ''
24
+ };
25
+ return _this;
26
+ }
27
+ _createClass(JumpToFolio, [{
28
+ key: "handleSubmit",
29
+ value: function handleSubmit(event) {
30
+ // Consume the event
31
+ event.preventDefault();
32
+
33
+ // Parse out the target
34
+ var data = new FormData(event.target);
35
+ var folioID = data.get('folioID');
36
+
37
+ // Submit the request
38
+ this.props.submitHandler(folioID, this.props.side);
39
+
40
+ // Hide and clear
41
+ this.props.blurHandler();
42
+ this.setState({
43
+ textInput: ''
44
+ });
45
+ }
46
+ }, {
47
+ key: "componentWillReceiveProps",
48
+ value: function componentWillReceiveProps(nextProps) {
49
+ // FIXME: this is an over-clever hack, but how else do you force focus?
50
+ if (nextProps.isVisible) {
51
+ var script = document.createElement('script');
52
+ var id = "".concat(this.props.side, "_jumpInput");
53
+ script.innerHTML = "setTimeout(function() { document.getElementById('".concat(id, "').focus(); }, 250);");
54
+ document.body.appendChild(script);
55
+ }
56
+ }
57
+
58
+ // Onchange field
59
+ }, {
60
+ key: "handleChange",
61
+ value: function handleChange(event) {
62
+ this.setState({
63
+ textInput: event.target.value
64
+ });
65
+ }
66
+ }, {
67
+ key: "render",
68
+ value: function render() {
69
+ var divStyle = {
70
+ position: 'fixed',
71
+ zIndex: 1,
72
+ top: this.props.positionY,
73
+ left: this.props.positionX,
74
+ display: this.props.isVisible ? 'inline' : 'none'
75
+ };
76
+ var id = "".concat(this.props.side, "_jumpInput");
77
+ return /*#__PURE__*/React.createElement("div", {
78
+ className: "jumpToFolio_component",
79
+ style: divStyle
80
+ }, /*#__PURE__*/React.createElement("form", {
81
+ onSubmit: this.handleSubmit
82
+ }, /*#__PURE__*/React.createElement("input", {
83
+ placeholder: "Page Name (e.g. '3r')",
84
+ value: this.state.textInput,
85
+ id: id,
86
+ name: "folioID",
87
+ type: "text",
88
+ onChange: this.handleChange.bind(this),
89
+ onBlur: this.props.blurHandler
90
+ })));
91
+ }
92
+ }]);
93
+ return JumpToFolio;
94
+ }(React.Component);
95
+ export default JumpToFolio;
@@ -0,0 +1,256 @@
1
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
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
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ 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); } }
6
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
7
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
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); }
9
+ 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); }
10
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
11
+ 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); }; }
12
+ 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); }
13
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
14
+ 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; } }
15
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
16
+ import React from 'react';
17
+ import { connect } from 'react-redux';
18
+ import { FaArrowCircleLeft, FaArrowCircleRight } from 'react-icons/fa';
19
+ import Select from '@material-ui/core/Select';
20
+ import MenuItem from '@material-ui/core/MenuItem';
21
+ import withWidth, { isWidthUp } from '@material-ui/core/withWidth';
22
+ import JumpToFolio from './JumpToFolio';
23
+ import DocumentHelper from '../model/DocumentHelper';
24
+ import HelpPopper from './HelpPopper';
25
+ import AlphabetLinks from './AlphabetLinks';
26
+ var Navigation = /*#__PURE__*/function (_React$Component) {
27
+ _inherits(Navigation, _React$Component);
28
+ var _super = _createSuper(Navigation);
29
+ function Navigation(props, context) {
30
+ var _this;
31
+ _classCallCheck(this, Navigation);
32
+ _this = _super.call(this, props, context);
33
+ _this.onJumpBoxBlur = function onJumpBoxBlur(event) {
34
+ this.setState({
35
+ popoverVisible: false
36
+ });
37
+ };
38
+ _this.changeType = function (event) {
39
+ if (event.target.value === undefined) return;
40
+ _this.props.documentViewActions.changeTranscriptionType(_this.props.side, event.target.value);
41
+ };
42
+ _this.toggleHelp = function (event) {
43
+ _this.setState({
44
+ openHelp: !_this.state.openHelp
45
+ });
46
+ };
47
+ _this.toggleBookmode = function toggleBookmode(event) {
48
+ if (!this.props.documentView.bookMode === true) {
49
+ this.props.documentViewActions.changeCurrentFolio(this.props.documentView.left.iiifShortID, 'left', this.props.documentView.left.transcriptionType);
50
+ this.props.documentViewActions.changeCurrentFolio(this.props.documentView.left.nextFolioShortID, 'right', this.props.documentView.left.transcriptionType);
51
+ }
52
+ this.props.documentViewActions.setBookMode(this.props.documentView.left.iiifShortID, !this.props.documentView.bookMode);
53
+ };
54
+ _this.toggleXMLMode = function toggleXMLMode(event) {
55
+ this.props.documentViewActions.setXMLMode(this.props.side, !this.props.documentView[this.props.side].isXMLMode);
56
+ };
57
+ _this.toggleLockmode = function toggleLockmode(event) {
58
+ if (this.props.documentView.bookMode) {
59
+ this.toggleBookmode();
60
+ return;
61
+ }
62
+
63
+ // If we are transitioning from unlocked to locked, synch up the panes
64
+ if (this.props.documentView.linkedMode === false) {
65
+ if (this.props.side === 'left') {
66
+ this.props.documentViewActions.changeCurrentFolio(this.props.documentView.left.iiifShortID, 'right', this.props.documentView.right.transcriptionType);
67
+ } else {
68
+ this.props.documentViewActions.changeCurrentFolio(this.props.documentView.right.iiifShortID, 'left', this.props.documentView.left.transcriptionType);
69
+ }
70
+ }
71
+
72
+ // Set lock
73
+ this.props.documentViewActions.setLinkedMode(!this.props.documentView.linkedMode);
74
+ };
75
+ _this.changeCurrentFolio = function (event) {
76
+ var _this$props = _this.props,
77
+ documentViewActions = _this$props.documentViewActions,
78
+ documentView = _this$props.documentView,
79
+ side = _this$props.side;
80
+ if (typeof event.currentTarget.dataset.id === 'undefined' || event.currentTarget.dataset.id.length === 0) {
81
+ return;
82
+ }
83
+ var folioID = event.currentTarget.dataset.id;
84
+ documentViewActions.changeCurrentFolio(folioID, side, documentView[side].transcriptionType);
85
+ };
86
+ _this.revealJumpBox = function revealJumpBox(event) {
87
+ this.setState({
88
+ popoverVisible: true,
89
+ popoverX: event.clientX,
90
+ popoverY: event.clientY
91
+ });
92
+ };
93
+ _this.changeType = _this.changeType.bind(_assertThisInitialized(_this));
94
+ _this.revealJumpBox = _this.revealJumpBox.bind(_assertThisInitialized(_this));
95
+ _this.onJumpBoxBlur = _this.onJumpBoxBlur.bind(_assertThisInitialized(_this));
96
+ _this.toggleLockmode = _this.toggleLockmode.bind(_assertThisInitialized(_this));
97
+ _this.toggleBookmode = _this.toggleBookmode.bind(_assertThisInitialized(_this));
98
+ _this.toggleXMLMode = _this.toggleXMLMode.bind(_assertThisInitialized(_this));
99
+ _this.changeCurrentFolio = _this.changeCurrentFolio.bind(_assertThisInitialized(_this));
100
+ _this.helpRef = null;
101
+ _this.state = {
102
+ popoverVisible: false,
103
+ popoverX: -1,
104
+ popoverY: -1,
105
+ openHelp: false
106
+ };
107
+ return _this;
108
+ }
109
+ _createClass(Navigation, [{
110
+ key: "render",
111
+ value: function render() {
112
+ var _document$folioIndex$,
113
+ _this2 = this;
114
+ var _this$props2 = this.props,
115
+ side = _this$props2.side,
116
+ document = _this$props2.document,
117
+ documentView = _this$props2.documentView,
118
+ documentViewActions = _this$props2.documentViewActions,
119
+ onFilterChange = _this$props2.onFilterChange;
120
+ if (!documentView) {
121
+ return /*#__PURE__*/React.createElement("div", null, "Unknown Transcription Type");
122
+ }
123
+ var recommendedWidth = documentView[side].width - 8; // the divder is 16 px wide so each side is minus 8
124
+ var widthStyle = {
125
+ width: recommendedWidth,
126
+ maxWidth: recommendedWidth
127
+ };
128
+ var selectContainerStyle = isWidthUp('md', this.props.width) ? documentView[side].width < 500 ? {
129
+ display: 'none'
130
+ } : {
131
+ display: 'flex'
132
+ } : {};
133
+ var selectColorStyle = documentView[side].transcriptionType === 'f' ? {
134
+ color: 'white'
135
+ } : {
136
+ color: 'black'
137
+ };
138
+ var selectClass = documentView[side].transcriptionType === 'f' ? 'dark' : 'light';
139
+ var showButtonsStyle = documentView[side].transcriptionType === 'glossary' ? {
140
+ visibility: 'hidden'
141
+ } : {
142
+ visibility: 'visible'
143
+ };
144
+ var lockIconClass = documentView.linkedMode ? 'fa fa-lock' : 'fa fa-lock-open';
145
+ if (!documentView.bookMode) {
146
+ lockIconClass += ' active';
147
+ }
148
+ var imageViewActive = documentView[side].transcriptionType === 'f';
149
+ var bookIconClass = documentView.bookMode ? 'fa fa-book active' : 'fa fa-book';
150
+ var xmlIconClass = documentView[side].isXMLMode ? 'fa fa-code active' : 'fa fa-code';
151
+ var folioName = (_document$folioIndex$ = document.folioIndex[documentView[side].iiifShortID]) === null || _document$folioIndex$ === void 0 ? void 0 : _document$folioIndex$.name;
152
+ var jumpToIconStyle = imageViewActive ? {
153
+ color: 'white'
154
+ } : {
155
+ color: 'black'
156
+ };
157
+ // this is messy but faster for the moment then figuring out why the sides dont behave the same
158
+ var helpMarginStyle = side === 'left' ? {
159
+ marginRight: '55px'
160
+ } : {
161
+ marginRight: '15px'
162
+ };
163
+ return /*#__PURE__*/React.createElement("div", {
164
+ className: "navigationComponent",
165
+ style: widthStyle
166
+ }, /*#__PURE__*/React.createElement("div", {
167
+ id: "navigation-row",
168
+ className: "navigationRow"
169
+ }, documentView[side].transcriptionType !== 'glossary' ? /*#__PURE__*/React.createElement("div", {
170
+ id: "tool-bar-buttons",
171
+ className: "breadcrumbs",
172
+ style: showButtonsStyle
173
+ }, /*#__PURE__*/React.createElement("span", {
174
+ title: "Toggle coordination of views",
175
+ onClick: this.toggleLockmode,
176
+ className: lockIconClass
177
+ }), "\xA0", /*#__PURE__*/React.createElement("span", {
178
+ title: "Toggle book mode",
179
+ onClick: this.toggleBookmode,
180
+ className: bookIconClass
181
+ }), "\xA0", /*#__PURE__*/React.createElement("span", {
182
+ title: "Toggle XML mode",
183
+ onClick: this.toggleXMLMode,
184
+ className: imageViewActive ? 'invisible' : xmlIconClass
185
+ }), "\xA0", "\xA0", /*#__PURE__*/React.createElement("span", {
186
+ title: "Go back",
187
+ onClick: this.changeCurrentFolio,
188
+ "data-id": documentView[side].previousFolioShortID,
189
+ className: documentView[side].hasPrevious ? 'arrow' : 'arrow disabled'
190
+ }, ' ', /*#__PURE__*/React.createElement(FaArrowCircleLeft, null), ' '), /*#__PURE__*/React.createElement("span", {
191
+ title: "Go forward",
192
+ onClick: this.changeCurrentFolio,
193
+ "data-id": documentView[side].nextFolioShortID,
194
+ className: documentView[side].hasNext ? 'arrow' : 'arrow disabled'
195
+ }, ' ', /*#__PURE__*/React.createElement(FaArrowCircleRight, null)), "\xA0\xA0", document.documentName, ' / ', /*#__PURE__*/React.createElement("div", {
196
+ onClick: this.revealJumpBox,
197
+ className: "folioName"
198
+ }, ' ', folioName, ' ', /*#__PURE__*/React.createElement("span", {
199
+ style: jumpToIconStyle,
200
+ className: "fa fa-hand-point-right"
201
+ })), /*#__PURE__*/React.createElement(JumpToFolio, {
202
+ side: side,
203
+ isVisible: this.state.popoverVisible,
204
+ positionX: this.state.popoverX,
205
+ positionY: this.state.popoverY,
206
+ submitHandler: documentViewActions.jumpToFolio,
207
+ blurHandler: this.onJumpBoxBlur
208
+ })) : /*#__PURE__*/React.createElement(AlphabetLinks, {
209
+ onFilterChange: onFilterChange,
210
+ value: this.props.value
211
+ }), /*#__PURE__*/React.createElement("div", {
212
+ id: "doc-type-help",
213
+ style: selectContainerStyle,
214
+ ref: function ref(e) {
215
+ _this2.helpRef = e;
216
+ }
217
+ }, /*#__PURE__*/React.createElement(Select, {
218
+ className: selectClass,
219
+ style: _objectSpread(_objectSpread({}, selectColorStyle), {}, {
220
+ marginRight: 15
221
+ }),
222
+ value: documentView[side].transcriptionType,
223
+ id: "doc-type",
224
+ onClick: this.changeType
225
+ }, /*#__PURE__*/React.createElement(MenuItem, {
226
+ value: "tl"
227
+ }, DocumentHelper.transcriptionTypeLabels.tl), /*#__PURE__*/React.createElement(MenuItem, {
228
+ value: "tc"
229
+ }, DocumentHelper.transcriptionTypeLabels.tc), /*#__PURE__*/React.createElement(MenuItem, {
230
+ value: "tcn"
231
+ }, DocumentHelper.transcriptionTypeLabels.tcn), /*#__PURE__*/React.createElement(MenuItem, {
232
+ value: "f"
233
+ }, DocumentHelper.transcriptionTypeLabels.f), /*#__PURE__*/React.createElement(MenuItem, {
234
+ value: "glossary"
235
+ }, DocumentHelper.transcriptionTypeLabels.glossary)), /*#__PURE__*/React.createElement("span", {
236
+ title: "Toggle folio help",
237
+ onClick: this.toggleHelp,
238
+ className: "helpIcon"
239
+ }, /*#__PURE__*/React.createElement("i", {
240
+ className: "fas fa-question-circle"
241
+ })), /*#__PURE__*/React.createElement(HelpPopper, {
242
+ marginStyle: helpMarginStyle,
243
+ anchorEl: this.helpRef,
244
+ open: this.state.openHelp,
245
+ onClose: this.toggleHelp
246
+ }))));
247
+ }
248
+ }]);
249
+ return Navigation;
250
+ }(React.Component);
251
+ function mapStateToProps(state) {
252
+ return {
253
+ document: state.document
254
+ };
255
+ }
256
+ export default withWidth()(connect(mapStateToProps)(Navigation));
@@ -0,0 +1,73 @@
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
+ import React from 'react';
14
+ import { connect } from 'react-redux';
15
+ import { FaArrowCircleLeft, FaArrowCircleRight } from 'react-icons/fa';
16
+ var Pagination = /*#__PURE__*/function (_React$Component) {
17
+ _inherits(Pagination, _React$Component);
18
+ var _super = _createSuper(Pagination);
19
+ function Pagination(props, context) {
20
+ var _this;
21
+ _classCallCheck(this, Pagination);
22
+ _this = _super.call(this, props, context);
23
+ _this.changeCurrentFolio = function (event) {
24
+ var _this$props = _this.props,
25
+ side = _this$props.side,
26
+ documentView = _this$props.documentView,
27
+ documentViewActions = _this$props.documentViewActions;
28
+ var dataset = event.currentTarget.dataset;
29
+ if (typeof dataset.id === 'undefined' || dataset.id.length === 0) {
30
+ return;
31
+ }
32
+ var folioID = dataset.id;
33
+ documentViewActions.changeCurrentFolio(folioID, side, documentView[side].transcriptionType);
34
+ };
35
+ _this.changeCurrentFolio = _this.changeCurrentFolio.bind(_assertThisInitialized(_this));
36
+ return _this;
37
+ }
38
+ _createClass(Pagination, [{
39
+ key: "render",
40
+ value: function render() {
41
+ var _this$props2 = this.props,
42
+ side = _this$props2.side,
43
+ document = _this$props2.document,
44
+ documentView = _this$props2.documentView;
45
+ if (documentView[side].iiifShortID === '-1') return null;
46
+ var folioName = document.folioIndex[documentView[side].iiifShortID].name;
47
+ return /*#__PURE__*/React.createElement("div", {
48
+ className: "paginationComponent"
49
+ }, /*#__PURE__*/React.createElement("div", {
50
+ className: "paginationControl"
51
+ }, /*#__PURE__*/React.createElement("span", {
52
+ title: "Go back",
53
+ onClick: this.changeCurrentFolio,
54
+ "data-id": documentView[side].previousFolioShortID,
55
+ className: documentView[side].hasPrevious ? 'arrow' : 'arrow disabled'
56
+ }, /*#__PURE__*/React.createElement(FaArrowCircleLeft, null)), /*#__PURE__*/React.createElement("span", {
57
+ className: "folioName"
58
+ }, folioName), /*#__PURE__*/React.createElement("span", {
59
+ title: "Go forward",
60
+ onClick: this.changeCurrentFolio,
61
+ "data-id": documentView[side].nextFolioShortID,
62
+ className: documentView[side].hasNext ? 'arrow' : 'arrow disabled'
63
+ }, ' ', /*#__PURE__*/React.createElement(FaArrowCircleRight, null))));
64
+ }
65
+ }]);
66
+ return Pagination;
67
+ }(React.Component);
68
+ function mapStateToProps(state) {
69
+ return {
70
+ document: state.document
71
+ };
72
+ }
73
+ export default connect(mapStateToProps)(Pagination);
@@ -0,0 +1,58 @@
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
+ import React from 'react';
14
+ import { connect } from 'react-redux';
15
+ import withRouter from '../hocs/withRouter';
16
+ import { dispatchAction } from '../model/ReduxStore';
17
+ var RouteListener = /*#__PURE__*/function (_React$Component) {
18
+ _inherits(RouteListener, _React$Component);
19
+ var _super = _createSuper(RouteListener);
20
+ function RouteListener(props) {
21
+ var _this;
22
+ _classCallCheck(this, RouteListener);
23
+ _this = _super.call(this, props);
24
+ _this.listening = false;
25
+ return _this;
26
+ }
27
+ _createClass(RouteListener, [{
28
+ key: "componentDidUpdate",
29
+ value: function componentDidUpdate(prevProps) {
30
+ if (this.props.router.location !== prevProps.router.location) {
31
+ this.userNavigated();
32
+ }
33
+ }
34
+ }, {
35
+ key: "componentDidMount",
36
+ value: function componentDidMount() {
37
+ if (!this.listening) {
38
+ this.userNavigated();
39
+ this.listening = true;
40
+ }
41
+ }
42
+ }, {
43
+ key: "userNavigated",
44
+ value: function userNavigated() {
45
+ dispatchAction(this.props, 'RouteListenerSaga.userNavigatation', this.props.router.location);
46
+ }
47
+ }, {
48
+ key: "render",
49
+ value: function render() {
50
+ return null;
51
+ }
52
+ }]);
53
+ return RouteListener;
54
+ }(React.Component);
55
+ function mapStateToProps(state) {
56
+ return {};
57
+ }
58
+ export default connect(mapStateToProps)(withRouter(RouteListener));
@@ -0,0 +1,42 @@
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
+ import React, { Component } from 'react';
14
+ export var SeaDragonComponent = /*#__PURE__*/function (_Component) {
15
+ _inherits(SeaDragonComponent, _Component);
16
+ var _super = _createSuper(SeaDragonComponent);
17
+ function SeaDragonComponent() {
18
+ _classCallCheck(this, SeaDragonComponent);
19
+ return _super.apply(this, arguments);
20
+ }
21
+ _createClass(SeaDragonComponent, [{
22
+ key: "shouldComponentUpdate",
23
+ value: function shouldComponentUpdate() {
24
+ return false;
25
+ }
26
+ }, {
27
+ key: "render",
28
+ value: function render() {
29
+ var _this$props = this.props,
30
+ side = _this$props.side,
31
+ initViewer = _this$props.initViewer,
32
+ tileSource = _this$props.tileSource;
33
+ return /*#__PURE__*/React.createElement("div", {
34
+ id: "image-view-seadragon-".concat(side),
35
+ ref: function ref(el) {
36
+ initViewer(el, tileSource);
37
+ }
38
+ });
39
+ }
40
+ }]);
41
+ return SeaDragonComponent;
42
+ }(Component);
@@ -0,0 +1,37 @@
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
+ import React, { Component } from 'react';
14
+ import { connect } from 'react-redux';
15
+ var SplitPaneView = /*#__PURE__*/function (_Component) {
16
+ _inherits(SplitPaneView, _Component);
17
+ var _super = _createSuper(SplitPaneView);
18
+ function SplitPaneView() {
19
+ _classCallCheck(this, SplitPaneView);
20
+ return _super.apply(this, arguments);
21
+ }
22
+ _createClass(SplitPaneView, [{
23
+ key: "render",
24
+ value: function render() {
25
+ return /*#__PURE__*/React.createElement("div", {
26
+ className: "single-pane-view"
27
+ }, this.props.singlePane);
28
+ }
29
+ }]);
30
+ return SplitPaneView;
31
+ }(Component);
32
+ function mapStateToProps(state) {
33
+ return {
34
+ document: state.document
35
+ };
36
+ }
37
+ export default connect(mapStateToProps)(SplitPaneView);