@manuscripts/article-editor 1.13.9 → 1.13.10
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/cjs/EditorApp.js +11 -2
- package/dist/cjs/EditorApp.js.map +1 -1
- package/dist/cjs/components/projects/ManuscriptPlaceholder.js +92 -0
- package/dist/cjs/components/projects/ManuscriptPlaceholder.js.map +1 -0
- package/dist/es/EditorApp.js +11 -2
- package/dist/es/EditorApp.js.map +1 -1
- package/dist/es/components/projects/ManuscriptPlaceholder.js +86 -0
- package/dist/es/components/projects/ManuscriptPlaceholder.js.map +1 -0
- package/dist/types/components/{Placeholders.d.ts → projects/ManuscriptPlaceholder.d.ts} +3 -5
- package/package.json +2 -2
- package/dist/cjs/components/Placeholders.js +0 -91
- package/dist/cjs/components/Placeholders.js.map +0 -1
- package/dist/cjs/components/ProgressIndicator.js +0 -130
- package/dist/cjs/components/ProgressIndicator.js.map +0 -1
- package/dist/es/components/Placeholders.js +0 -59
- package/dist/es/components/Placeholders.js.map +0 -1
- package/dist/es/components/ProgressIndicator.js +0 -122
- package/dist/es/components/ProgressIndicator.js.map +0 -1
- package/dist/types/components/ProgressIndicator.d.ts +0 -68
package/dist/cjs/EditorApp.js
CHANGED
|
@@ -30,8 +30,8 @@ const react_1 = __importStar(require("react"));
|
|
|
30
30
|
const react_router_dom_1 = require("react-router-dom");
|
|
31
31
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
32
32
|
const Page_1 = require("./components/Page");
|
|
33
|
-
const Placeholders_1 = require("./components/Placeholders");
|
|
34
33
|
const ManuscriptPageContainer_1 = __importDefault(require("./components/projects/ManuscriptPageContainer"));
|
|
34
|
+
const ManuscriptPlaceholder_1 = require("./components/projects/ManuscriptPlaceholder");
|
|
35
35
|
const user_1 = require("./lib/user");
|
|
36
36
|
const PsSource_1 = __importDefault(require("./postgres-data/PsSource"));
|
|
37
37
|
const QuarterBackDataSource_1 = __importDefault(require("./quarterback/QuarterBackDataSource"));
|
|
@@ -46,6 +46,14 @@ const Wrapper = styled_components_1.default.div `
|
|
|
46
46
|
overflow: hidden;
|
|
47
47
|
font-family: Lato, sans-serif;
|
|
48
48
|
`;
|
|
49
|
+
const PlaceholderWrapper = styled_components_1.default.div `
|
|
50
|
+
height: 100%;
|
|
51
|
+
flex: 1;
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
align-items: center;
|
|
56
|
+
`;
|
|
49
57
|
const EditorApp = ({ parentObserver, manuscriptID, projectID, permittedActions, fileManagement, files, authToken, }) => {
|
|
50
58
|
const userID = (0, user_1.getCurrentUserId)();
|
|
51
59
|
const [store, setStore] = (0, react_1.useState)();
|
|
@@ -72,7 +80,8 @@ const EditorApp = ({ parentObserver, manuscriptID, projectID, permittedActions,
|
|
|
72
80
|
react_1.default.createElement(react_router_dom_1.BrowserRouter, null,
|
|
73
81
|
react_1.default.createElement(Page_1.Page, null,
|
|
74
82
|
react_1.default.createElement(Wrapper, null,
|
|
75
|
-
react_1.default.createElement(ManuscriptPageContainer_1.default, null)))))) : (react_1.default.createElement(
|
|
83
|
+
react_1.default.createElement(ManuscriptPageContainer_1.default, null)))))) : (react_1.default.createElement(PlaceholderWrapper, null,
|
|
84
|
+
react_1.default.createElement(ManuscriptPlaceholder_1.ManuscriptPlaceholder, null)));
|
|
76
85
|
};
|
|
77
86
|
exports.default = EditorApp;
|
|
78
87
|
//# sourceMappingURL=EditorApp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorApp.js","sourceRoot":"","sources":["../../src/EditorApp.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,+CAAkD;AAClD,uDAA0D;AAC1D,0EAAsC;AAEtC,4CAAwC;AACxC,
|
|
1
|
+
{"version":3,"file":"EditorApp.js","sourceRoot":"","sources":["../../src/EditorApp.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;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AC,KAAK,CAAC,CAAC,CAAC,CAAA;QAClB,CAAC,CAAC,CAAA;QACJ,OAAO,GAAG,EAAE;YACV,cAAc,EAAE,MAAM,EAAE,CAAA;YACxB,KAAK,EAAE,OAAO,EAAE,CAAA;QAClB,CAAC,CAAA;QACD,uDAAuD;IACzD,CAAC,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC,CAAA;IAE7B,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,8BAAC,4BAAoB,IAAC,KAAK,EAAE,KAAK;QAChC,8BAAC,gCAAM;YACL,8BAAC,WAAI;gBACH,8BAAC,OAAO;oBACN,8BAAC,iCAAuB,OAAG,CACnB,CACL,CACA,CACY,CACxB,CAAC,CAAC,CAAC,CACF,8BAAC,kBAAkB;QACjB,8BAAC,6CAAqB,OAAG,CACN,CACtB,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
4
|
+
*
|
|
5
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
6
|
+
*
|
|
7
|
+
* The Original Code is manuscripts-frontend.
|
|
8
|
+
*
|
|
9
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
10
|
+
*
|
|
11
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
|
|
12
|
+
*/
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ManuscriptPlaceholder = void 0;
|
|
18
|
+
const ProjectPlaceholder_1 = __importDefault(require("@manuscripts/assets/react/ProjectPlaceholder"));
|
|
19
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
20
|
+
exports.ManuscriptPlaceholder = (0, styled_components_1.default)(ProjectPlaceholder_1.default) `
|
|
21
|
+
> g > path:nth-child(1) {
|
|
22
|
+
fill: #e0eef9;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
> g > g {
|
|
26
|
+
fill: #ffffff;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Chemistry
|
|
30
|
+
> g > g:nth-of-type(1) > path:nth-of-type(3) {
|
|
31
|
+
fill: #eaf2f1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
> g > g:nth-of-type(1) > ellipse {
|
|
35
|
+
fill: #eaf2f1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
> g > g:nth-of-type(1) > path:last-of-type {
|
|
39
|
+
fill: #ffffff;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Astronomy
|
|
43
|
+
> g > g:nth-of-type(2) > ellipse:nth-of-type(3) {
|
|
44
|
+
fill: #eaf2f1;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
> g > g:nth-of-type(2) > ellipse:nth-of-type(4) {
|
|
48
|
+
fill: #ffffff;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
> g > g:nth-of-type(2) > path:nth-of-type(3) {
|
|
52
|
+
fill: #ffffff;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
> g > g:nth-of-type(2) > path:nth-of-type(2) {
|
|
56
|
+
fill: #eaf2f1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Medicine
|
|
60
|
+
> g > g:nth-of-type(3) > path:last-of-type {
|
|
61
|
+
fill: #e0eef9;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
> g > g:nth-of-type(3) > path:nth-of-type(3) {
|
|
65
|
+
fill: #ffffff;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
> g > g:nth-of-type(3) > path:nth-of-type(4) {
|
|
69
|
+
fill: #eaf2f1;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
> g > g:nth-of-type(3) > path:nth-of-type(6) {
|
|
73
|
+
transform: translate(15px, 11px) rotate(90deg);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Notepad
|
|
77
|
+
> g > g:nth-of-type(4) > path:last-of-type {
|
|
78
|
+
fill: #eaf2f1;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Misc
|
|
82
|
+
> g > g:nth-of-type(5) > ellipse {
|
|
83
|
+
stroke: #979797;
|
|
84
|
+
opacity: 1;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
> g > g:nth-of-type(5) > path {
|
|
88
|
+
fill: #979797;
|
|
89
|
+
opacity: 1;
|
|
90
|
+
}
|
|
91
|
+
`;
|
|
92
|
+
//# sourceMappingURL=ManuscriptPlaceholder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ManuscriptPlaceholder.js","sourceRoot":"","sources":["../../../../src/components/projects/ManuscriptPlaceholder.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAEH,sGAA6E;AAC7E,0EAAsC;AAEzB,QAAA,qBAAqB,GAAG,IAAA,2BAAM,EAAC,4BAAkB,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuE9D,CAAA"}
|
package/dist/es/EditorApp.js
CHANGED
|
@@ -2,8 +2,8 @@ import React, { useEffect, useState } from 'react';
|
|
|
2
2
|
import { BrowserRouter as Router } from 'react-router-dom';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { Page } from './components/Page';
|
|
5
|
-
import { ProjectPlaceholder } from './components/Placeholders';
|
|
6
5
|
import ManuscriptPageContainer from './components/projects/ManuscriptPageContainer';
|
|
6
|
+
import { ManuscriptPlaceholder } from './components/projects/ManuscriptPlaceholder';
|
|
7
7
|
import { getCurrentUserId } from './lib/user';
|
|
8
8
|
import PsSource from './postgres-data/PsSource';
|
|
9
9
|
import QuarterbackDataSource from './quarterback/QuarterBackDataSource';
|
|
@@ -18,6 +18,14 @@ const Wrapper = styled.div `
|
|
|
18
18
|
overflow: hidden;
|
|
19
19
|
font-family: Lato, sans-serif;
|
|
20
20
|
`;
|
|
21
|
+
const PlaceholderWrapper = styled.div `
|
|
22
|
+
height: 100%;
|
|
23
|
+
flex: 1;
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
align-items: center;
|
|
28
|
+
`;
|
|
21
29
|
const EditorApp = ({ parentObserver, manuscriptID, projectID, permittedActions, fileManagement, files, authToken, }) => {
|
|
22
30
|
const userID = getCurrentUserId();
|
|
23
31
|
const [store, setStore] = useState();
|
|
@@ -44,7 +52,8 @@ const EditorApp = ({ parentObserver, manuscriptID, projectID, permittedActions,
|
|
|
44
52
|
React.createElement(Router, null,
|
|
45
53
|
React.createElement(Page, null,
|
|
46
54
|
React.createElement(Wrapper, null,
|
|
47
|
-
React.createElement(ManuscriptPageContainer, null)))))) : (React.createElement(
|
|
55
|
+
React.createElement(ManuscriptPageContainer, null)))))) : (React.createElement(PlaceholderWrapper, null,
|
|
56
|
+
React.createElement(ManuscriptPlaceholder, null)));
|
|
48
57
|
};
|
|
49
58
|
export default EditorApp;
|
|
50
59
|
//# sourceMappingURL=EditorApp.js.map
|
package/dist/es/EditorApp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorApp.js","sourceRoot":"","sources":["../../src/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AAC,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
+
*
|
|
4
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
+
*
|
|
6
|
+
* The Original Code is manuscripts-frontend.
|
|
7
|
+
*
|
|
8
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
+
*
|
|
10
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
import ProjectPlaceholder from '@manuscripts/assets/react/ProjectPlaceholder';
|
|
13
|
+
import styled from 'styled-components';
|
|
14
|
+
export const ManuscriptPlaceholder = styled(ProjectPlaceholder) `
|
|
15
|
+
> g > path:nth-child(1) {
|
|
16
|
+
fill: #e0eef9;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
> g > g {
|
|
20
|
+
fill: #ffffff;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Chemistry
|
|
24
|
+
> g > g:nth-of-type(1) > path:nth-of-type(3) {
|
|
25
|
+
fill: #eaf2f1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
> g > g:nth-of-type(1) > ellipse {
|
|
29
|
+
fill: #eaf2f1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
> g > g:nth-of-type(1) > path:last-of-type {
|
|
33
|
+
fill: #ffffff;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Astronomy
|
|
37
|
+
> g > g:nth-of-type(2) > ellipse:nth-of-type(3) {
|
|
38
|
+
fill: #eaf2f1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
> g > g:nth-of-type(2) > ellipse:nth-of-type(4) {
|
|
42
|
+
fill: #ffffff;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
> g > g:nth-of-type(2) > path:nth-of-type(3) {
|
|
46
|
+
fill: #ffffff;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
> g > g:nth-of-type(2) > path:nth-of-type(2) {
|
|
50
|
+
fill: #eaf2f1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Medicine
|
|
54
|
+
> g > g:nth-of-type(3) > path:last-of-type {
|
|
55
|
+
fill: #e0eef9;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
> g > g:nth-of-type(3) > path:nth-of-type(3) {
|
|
59
|
+
fill: #ffffff;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
> g > g:nth-of-type(3) > path:nth-of-type(4) {
|
|
63
|
+
fill: #eaf2f1;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
> g > g:nth-of-type(3) > path:nth-of-type(6) {
|
|
67
|
+
transform: translate(15px, 11px) rotate(90deg);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Notepad
|
|
71
|
+
> g > g:nth-of-type(4) > path:last-of-type {
|
|
72
|
+
fill: #eaf2f1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Misc
|
|
76
|
+
> g > g:nth-of-type(5) > ellipse {
|
|
77
|
+
stroke: #979797;
|
|
78
|
+
opacity: 1;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
> g > g:nth-of-type(5) > path {
|
|
82
|
+
fill: #979797;
|
|
83
|
+
opacity: 1;
|
|
84
|
+
}
|
|
85
|
+
`;
|
|
86
|
+
//# sourceMappingURL=ManuscriptPlaceholder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ManuscriptPlaceholder.js","sourceRoot":"","sources":["../../../../src/components/projects/ManuscriptPlaceholder.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,kBAAkB,MAAM,8CAA8C,CAAA;AAC7E,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuE9D,CAAA"}
|
|
@@ -7,9 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
9
|
*
|
|
10
|
-
* All portions of the code written by Atypon Systems LLC are Copyright (c)
|
|
10
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
export declare const ManuscriptPlaceholder:
|
|
14
|
-
export declare const ProjectPlaceholder: React.FC;
|
|
15
|
-
export declare const DataLoadingPlaceholder: React.FC;
|
|
12
|
+
/// <reference types="react" />
|
|
13
|
+
export declare const ManuscriptPlaceholder: import("styled-components").StyledComponent<import("react").SFC<import("react").SVGAttributes<SVGElement>>, import("styled-components").DefaultTheme, {}, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/article-editor",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.10",
|
|
4
4
|
"license": "CPAL-1.0",
|
|
5
5
|
"description": "React components for editing and viewing manuscripts",
|
|
6
6
|
"repository": "github:Atypon-OpenSource/manuscripts-article-editor",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@manuscripts/library": "^1.3.6",
|
|
42
42
|
"@manuscripts/style-guide": "1.12.4",
|
|
43
43
|
"@manuscripts/title-editor": "^1.1.0",
|
|
44
|
-
"@manuscripts/track-changes-plugin": "
|
|
44
|
+
"@manuscripts/track-changes-plugin": "1.7.10",
|
|
45
45
|
"@manuscripts/transform": "2.3.3",
|
|
46
46
|
"@microsoft/fetch-event-source": "^2.0.1",
|
|
47
47
|
"@popperjs/core": "^2.11.8",
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
4
|
-
*
|
|
5
|
-
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
6
|
-
*
|
|
7
|
-
* The Original Code is manuscripts-frontend.
|
|
8
|
-
*
|
|
9
|
-
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
10
|
-
*
|
|
11
|
-
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
12
|
-
*/
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.DataLoadingPlaceholder = exports.ProjectPlaceholder = exports.ManuscriptPlaceholder = void 0;
|
|
41
|
-
const react_1 = __importStar(require("react"));
|
|
42
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
43
|
-
const ProgressIndicator_1 = require("./ProgressIndicator");
|
|
44
|
-
const PlaceholderContainer = styled_components_1.default.div `
|
|
45
|
-
height: 100%;
|
|
46
|
-
flex: 1;
|
|
47
|
-
display: flex;
|
|
48
|
-
flex-direction: column;
|
|
49
|
-
justify-content: center;
|
|
50
|
-
align-items: center;
|
|
51
|
-
`;
|
|
52
|
-
const ManuscriptPlaceholder = () => (react_1.default.createElement(PlaceholderContainer, null,
|
|
53
|
-
react_1.default.createElement(ProgressIndicator_1.ProgressIndicator, { isDeterminate: false, size: ProgressIndicator_1.IndicatorSize.Large, symbols: ProgressIndicator_1.IndicatorKind.Project })));
|
|
54
|
-
exports.ManuscriptPlaceholder = ManuscriptPlaceholder;
|
|
55
|
-
const ProjectPlaceholder = () => (react_1.default.createElement(PlaceholderContainer, null,
|
|
56
|
-
react_1.default.createElement(ProgressIndicator_1.ProgressIndicator, { isDeterminate: false, size: ProgressIndicator_1.IndicatorSize.Large, symbols: ProgressIndicator_1.IndicatorKind.Project })));
|
|
57
|
-
exports.ProjectPlaceholder = ProjectPlaceholder;
|
|
58
|
-
const ProgressGroup = styled_components_1.default.div `
|
|
59
|
-
display: flex;
|
|
60
|
-
flex-direction: column;
|
|
61
|
-
align-items: center;
|
|
62
|
-
justify-content: center;
|
|
63
|
-
`;
|
|
64
|
-
const ProgressMessage = styled_components_1.default.div `
|
|
65
|
-
color: ${(props) => props.theme.colors.text.secondary};
|
|
66
|
-
font-size: ${(props) => props.theme.font.size.xlarge};
|
|
67
|
-
margin: ${(props) => props.theme.grid.unit * 4}px;
|
|
68
|
-
`;
|
|
69
|
-
const ProgressMessageSubtitle = styled_components_1.default.div `
|
|
70
|
-
color: ${(props) => props.theme.colors.text.secondary};
|
|
71
|
-
font-size: ${(props) => props.theme.font.size.normal};
|
|
72
|
-
font-weight: ${(props) => props.theme.font.weight.light};
|
|
73
|
-
`;
|
|
74
|
-
const ProgressMessageContainer = ({ delay = 0, title, subtitle }) => {
|
|
75
|
-
const [delayed, setDelayed] = (0, react_1.useState)(false);
|
|
76
|
-
(0, react_1.useEffect)(() => {
|
|
77
|
-
const timer = window.setTimeout(() => {
|
|
78
|
-
setDelayed(true);
|
|
79
|
-
}, delay);
|
|
80
|
-
return () => window.clearTimeout(timer);
|
|
81
|
-
}, [delay]);
|
|
82
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
83
|
-
react_1.default.createElement(ProgressMessage, null, title),
|
|
84
|
-
delayed && react_1.default.createElement(ProgressMessageSubtitle, null, subtitle)));
|
|
85
|
-
};
|
|
86
|
-
const DataLoadingPlaceholder = () => (react_1.default.createElement(PlaceholderContainer, null,
|
|
87
|
-
react_1.default.createElement(ProgressGroup, null,
|
|
88
|
-
react_1.default.createElement(ProgressIndicator_1.ProgressIndicator, { isDeterminate: false, size: ProgressIndicator_1.IndicatorSize.Medium, symbols: ProgressIndicator_1.IndicatorKind.Project }),
|
|
89
|
-
react_1.default.createElement(ProgressMessageContainer, { title: 'Loading...' }))));
|
|
90
|
-
exports.DataLoadingPlaceholder = DataLoadingPlaceholder;
|
|
91
|
-
//# sourceMappingURL=Placeholders.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Placeholders.js","sourceRoot":"","sources":["../../../src/components/Placeholders.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+CAAkD;AAClD,0EAAsC;AAEtC,2DAI4B;AAE5B,MAAM,oBAAoB,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;;;CAOtC,CAAA;AAEM,MAAM,qBAAqB,GAAa,GAAG,EAAE,CAAC,CACnD,8BAAC,oBAAoB;IACnB,8BAAC,qCAAiB,IAChB,aAAa,EAAE,KAAK,EACpB,IAAI,EAAE,iCAAa,CAAC,KAAK,EACzB,OAAO,EAAE,iCAAa,CAAC,OAAO,GAC9B,CACmB,CACxB,CAAA;AARY,QAAA,qBAAqB,yBAQjC;AAEM,MAAM,kBAAkB,GAAa,GAAG,EAAE,CAAC,CAChD,8BAAC,oBAAoB;IACnB,8BAAC,qCAAiB,IAChB,aAAa,EAAE,KAAK,EACpB,IAAI,EAAE,iCAAa,CAAC,KAAK,EACzB,OAAO,EAAE,iCAAa,CAAC,OAAO,GAC9B,CACmB,CACxB,CAAA;AARY,QAAA,kBAAkB,sBAQ9B;AAED,MAAM,aAAa,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;CAK/B,CAAA;AAED,MAAM,eAAe,GAAG,2BAAM,CAAC,GAAG,CAAA;WACvB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS;eACxC,CAAC,KAAK,EAAE,EAAE,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aAAa,EAAE,KAAK,EACpB,IAAI,EAAE,iCAAa,CAAC,MAAM,EAC1B,OAAO,EAAE,iCAAa,CAAC,OAAO,GAC9B;QACF,8BAAC,wBAAwB,IAAC,KAAK,EAAE,YAAY,GAAI,CACnC,CACK,CACxB,CAAA;AAXY,QAAA,sBAAsB,0BAWlC"}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
4
|
-
*
|
|
5
|
-
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
6
|
-
*
|
|
7
|
-
* The Original Code is manuscripts-frontend.
|
|
8
|
-
*
|
|
9
|
-
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
10
|
-
*
|
|
11
|
-
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
12
|
-
*/
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.ProgressIndicator = exports.InvalidIndicatorPropsError = exports.indicatorSizeDimensionsMap = exports.IndicatorSize = exports.IndicatorKind = void 0;
|
|
18
|
-
const assets_1 = require("@manuscripts/assets");
|
|
19
|
-
const react_1 = __importDefault(require("react"));
|
|
20
|
-
var IndicatorKind;
|
|
21
|
-
(function (IndicatorKind) {
|
|
22
|
-
IndicatorKind[IndicatorKind["Author"] = 0] = "Author";
|
|
23
|
-
IndicatorKind[IndicatorKind["ContributorDetail"] = 1] = "ContributorDetail";
|
|
24
|
-
IndicatorKind[IndicatorKind["Contributors"] = 2] = "Contributors";
|
|
25
|
-
IndicatorKind[IndicatorKind["Project"] = 3] = "Project";
|
|
26
|
-
IndicatorKind[IndicatorKind["ReferenceLibrary"] = 4] = "ReferenceLibrary";
|
|
27
|
-
})(IndicatorKind = exports.IndicatorKind || (exports.IndicatorKind = {}));
|
|
28
|
-
// TODO: Actually provide small sizes in PaintCode project.
|
|
29
|
-
var IndicatorSize;
|
|
30
|
-
(function (IndicatorSize) {
|
|
31
|
-
// Small,
|
|
32
|
-
IndicatorSize[IndicatorSize["Medium"] = 0] = "Medium";
|
|
33
|
-
IndicatorSize[IndicatorSize["Large"] = 1] = "Large";
|
|
34
|
-
})(IndicatorSize = exports.IndicatorSize || (exports.IndicatorSize = {}));
|
|
35
|
-
exports.indicatorSizeDimensionsMap = new Map([
|
|
36
|
-
[IndicatorSize.Medium, 160],
|
|
37
|
-
[IndicatorSize.Large, 375],
|
|
38
|
-
[undefined, 100],
|
|
39
|
-
]);
|
|
40
|
-
class InvalidIndicatorPropsError extends Error {
|
|
41
|
-
constructor(message, props) {
|
|
42
|
-
super(message);
|
|
43
|
-
this.props = props;
|
|
44
|
-
Object.setPrototypeOf(this, new.target.prototype);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
exports.InvalidIndicatorPropsError = InvalidIndicatorPropsError;
|
|
48
|
-
class ProgressIndicator extends react_1.default.Component {
|
|
49
|
-
constructor(props) {
|
|
50
|
-
super(props);
|
|
51
|
-
this.state = {
|
|
52
|
-
time: 0,
|
|
53
|
-
};
|
|
54
|
-
this.tickFunction = () => {
|
|
55
|
-
this.setState({
|
|
56
|
-
time: this.state.time + (this.props.timeIncrement || 0),
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
if (props.progress && props.progress > 0 && !props.isDeterminate) {
|
|
60
|
-
throw new InvalidIndicatorPropsError('progress > 0 for an indeterminate progress indicator', props);
|
|
61
|
-
}
|
|
62
|
-
this.canvasRef = react_1.default.createRef();
|
|
63
|
-
}
|
|
64
|
-
componentDidMount() {
|
|
65
|
-
this.updateCanvas();
|
|
66
|
-
if (this.props.timeIncrement) {
|
|
67
|
-
this.tickHandle = setInterval(this.tickFunction, this.props.refreshRate);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
componentDidUpdate() {
|
|
71
|
-
this.updateCanvas();
|
|
72
|
-
}
|
|
73
|
-
updateCanvas() {
|
|
74
|
-
if (!this.canvasRef.current) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
assets_1.PlaceholderKit.clearCanvas(this.canvasRef.current);
|
|
78
|
-
assets_1.PlaceholderKit.drawProgressIndication(this.canvasRef.current, this.state.time, this.props.progress || 0, this.props.isDeterminate || true);
|
|
79
|
-
this.symbolDrawFunction()(this.canvasRef.current, this.state.time, this.props.symbolRotationMultiplier || 0, this.props.crossRotationMultiplier || 0);
|
|
80
|
-
}
|
|
81
|
-
componentWillUnmount() {
|
|
82
|
-
if (this.tickHandle) {
|
|
83
|
-
clearInterval(this.tickHandle);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
render() {
|
|
87
|
-
// TODO: Actually handle the small size rendering in PaintCode.
|
|
88
|
-
const dim = exports.indicatorSizeDimensionsMap.get(this.props.size);
|
|
89
|
-
return react_1.default.createElement("canvas", { ref: this.canvasRef, width: dim, height: dim });
|
|
90
|
-
}
|
|
91
|
-
symbolDrawFunction() {
|
|
92
|
-
switch (this.props.symbols) {
|
|
93
|
-
case IndicatorKind.Author:
|
|
94
|
-
return assets_1.PlaceholderKit.drawAuthorSymbols;
|
|
95
|
-
case IndicatorKind.ContributorDetail:
|
|
96
|
-
return assets_1.PlaceholderKit.drawContributorDetailSymbols;
|
|
97
|
-
case IndicatorKind.Contributors:
|
|
98
|
-
return assets_1.PlaceholderKit.drawContributorSymbols;
|
|
99
|
-
case IndicatorKind.Project:
|
|
100
|
-
return assets_1.PlaceholderKit.drawProjectSymbols;
|
|
101
|
-
case IndicatorKind.ReferenceLibrary:
|
|
102
|
-
return assets_1.PlaceholderKit.drawReferenceLibrarySymbols;
|
|
103
|
-
default:
|
|
104
|
-
throw new InvalidIndicatorPropsError('Invalid key "symbols" in props', this.props);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
exports.ProgressIndicator = ProgressIndicator;
|
|
109
|
-
ProgressIndicator.defaultProps = {
|
|
110
|
-
progress: 0,
|
|
111
|
-
size: IndicatorSize.Large,
|
|
112
|
-
isDeterminate: false,
|
|
113
|
-
timeIncrement: 0.001,
|
|
114
|
-
symbolRotationMultiplier: 6.0,
|
|
115
|
-
crossRotationMultiplier: 0.5,
|
|
116
|
-
refreshRate: 25,
|
|
117
|
-
};
|
|
118
|
-
/*export class LargeDeterminateProjectsProgressIndicator extends ProgressIndicator {
|
|
119
|
-
public static defaultProps = {
|
|
120
|
-
progress: 0,
|
|
121
|
-
size: IndicatorSize.Large,
|
|
122
|
-
isDeterminate: false,
|
|
123
|
-
timeIncrement: 0.001,
|
|
124
|
-
symbolRotationMultiplier: 6.0,
|
|
125
|
-
crossRotationMultiplier: 0.5,
|
|
126
|
-
refreshRate: 25,
|
|
127
|
-
symbols: IndicatorKind.Project,
|
|
128
|
-
}
|
|
129
|
-
}*/
|
|
130
|
-
//# sourceMappingURL=ProgressIndicator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressIndicator.js","sourceRoot":"","sources":["../../../src/components/ProgressIndicator.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAEH,gDAA2E;AAC3E,kDAAyB;AAEzB,IAAY,aAMX;AAND,WAAY,aAAa;IACvB,qDAAM,CAAA;IACN,2EAAiB,CAAA;IACjB,iEAAY,CAAA;IACZ,uDAAO,CAAA;IACP,yEAAgB,CAAA;AAClB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AM,EAAE,GAAG,GAAI,CAAA;IACjE,CAAC;IAQO,kBAAkB;QACxB,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;YAC1B,KAAK,aAAa,CAAC,MAAM;gBACvB,OAAO,uBAAc,CAAC,iBAAiB,CAAA;YACzC,KAAK,aAAa,CAAC,iBAAiB;gBAClC,OAAO,uBAAc,CAAC,4BAA4B,CAAA;YACpD,KAAK,aAAa,CAAC,YAAY;gBAC7B,OAAO,uBAAc,CAAC,sBAAsB,CAAA;YAC9C,KAAK,aAAa,CAAC,OAAO;gBACxB,OAAO,uBAAc,CAAC,kBAAkB,CAAA;YAC1C,KAAK,aAAa,CAAC,gBAAgB;gBACjC,OAAO,uBAAc,CAAC,2BAA2B,CAAA;YACnD;gBACE,MAAM,IAAI,0BAA0B,CAClC,gCAAgC,EAChC,IAAI,CAAC,KAAK,CACX,CAAA;SACJ;IACH,CAAC;;AAnGH,8CAoGC;AAhGe,8BAAY,GAAG;IAC3B,QAAQ,EAAE,CAAC;IACX,IAAI,EAAE,aAAa,CAAC,KAAK;IACzB,aAAa,EAAE,KAAK;IACpB,aAAa,EAAE,KAAK;IACpB,wBAAwB,EAAE,GAAG;IAC7B,uBAAuB,EAAE,GAAG;IAC5B,WAAW,EAAE,EAAE;CAChB,CAAA;AA0FH;;;;;;;;;;;GAWG"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
-
*
|
|
4
|
-
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
-
*
|
|
6
|
-
* The Original Code is manuscripts-frontend.
|
|
7
|
-
*
|
|
8
|
-
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
-
*
|
|
10
|
-
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
-
*/
|
|
12
|
-
import React, { useEffect, useState } from 'react';
|
|
13
|
-
import styled from 'styled-components';
|
|
14
|
-
import { IndicatorKind, IndicatorSize, ProgressIndicator, } from './ProgressIndicator';
|
|
15
|
-
const PlaceholderContainer = styled.div `
|
|
16
|
-
height: 100%;
|
|
17
|
-
flex: 1;
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
align-items: center;
|
|
22
|
-
`;
|
|
23
|
-
export const ManuscriptPlaceholder = () => (React.createElement(PlaceholderContainer, null,
|
|
24
|
-
React.createElement(ProgressIndicator, { isDeterminate: false, size: IndicatorSize.Large, symbols: IndicatorKind.Project })));
|
|
25
|
-
export const ProjectPlaceholder = () => (React.createElement(PlaceholderContainer, null,
|
|
26
|
-
React.createElement(ProgressIndicator, { isDeterminate: false, size: IndicatorSize.Large, symbols: IndicatorKind.Project })));
|
|
27
|
-
const ProgressGroup = styled.div `
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
align-items: center;
|
|
31
|
-
justify-content: center;
|
|
32
|
-
`;
|
|
33
|
-
const ProgressMessage = styled.div `
|
|
34
|
-
color: ${(props) => props.theme.colors.text.secondary};
|
|
35
|
-
font-size: ${(props) => props.theme.font.size.xlarge};
|
|
36
|
-
margin: ${(props) => props.theme.grid.unit * 4}px;
|
|
37
|
-
`;
|
|
38
|
-
const ProgressMessageSubtitle = styled.div `
|
|
39
|
-
color: ${(props) => props.theme.colors.text.secondary};
|
|
40
|
-
font-size: ${(props) => props.theme.font.size.normal};
|
|
41
|
-
font-weight: ${(props) => props.theme.font.weight.light};
|
|
42
|
-
`;
|
|
43
|
-
const ProgressMessageContainer = ({ delay = 0, title, subtitle }) => {
|
|
44
|
-
const [delayed, setDelayed] = useState(false);
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
const timer = window.setTimeout(() => {
|
|
47
|
-
setDelayed(true);
|
|
48
|
-
}, delay);
|
|
49
|
-
return () => window.clearTimeout(timer);
|
|
50
|
-
}, [delay]);
|
|
51
|
-
return (React.createElement(React.Fragment, null,
|
|
52
|
-
React.createElement(ProgressMessage, null, title),
|
|
53
|
-
delayed && React.createElement(ProgressMessageSubtitle, null, subtitle)));
|
|
54
|
-
};
|
|
55
|
-
export const DataLoadingPlaceholder = () => (React.createElement(PlaceholderContainer, null,
|
|
56
|
-
React.createElement(ProgressGroup, null,
|
|
57
|
-
React.createElement(ProgressIndicator, { isDeterminate: false, size: IndicatorSize.Medium, symbols: IndicatorKind.Project }),
|
|
58
|
-
React.createElement(ProgressMessageContainer, { title: 'Loading...' }))));
|
|
59
|
-
//# sourceMappingURL=Placeholders.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Placeholders.js","sourceRoot":"","sources":["../../../src/components/Placeholders.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClD,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EACL,aAAa,EACb,aAAa,EACb,iBAAiB,GAClB,MAAM,qBAAqB,CAAA;AAE5B,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;CAOtC,CAAA;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAa,GAAG,EAAE,CAAC,CACnD,oBAAC,oBAAoB;IACnB,oBAAC,iBAAiB,IAChB,aAAa,EAAE,KAAK,EACpB,IAAI,EAAE,aAAa,CAAC,KAAK,EACzB,OAAO,EAAE,aAAa,CAAC,OAAO,GA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GAAG,EAAE;YACnC,UAAU,CAAC,IAAI,CAAC,CAAA;QAClB,CAAC,EAAE,KAAK,CAAC,CAAA;QAET,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;IACzC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IAEX,OAAO,CACL;QACE,oBAAC,eAAe,QAAE,KAAK,CAAmB;QACzC,OAAO,IAAI,oBAAC,uBAAuB,QAAE,QAAQ,CAA2B,CACxE,CACJ,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAa,GAAG,EAAE,CAAC,CACpD,oBAAC,oBAAoB;IACnB,oBAAC,aAAa;QACZ,oBAAC,iBAAiB,IAChB,aAAa,EAAE,KAAK,EACpB,IAAI,EAAE,aAAa,CAAC,MAAM,EAC1B,OAAO,EAAE,aAAa,CAAC,OAAO,GAC9B;QACF,oBAAC,wBAAwB,IAAC,KAAK,EAAE,YAAY,GAAI,CACnC,CACK,CACxB,CAAA"}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
-
*
|
|
4
|
-
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
-
*
|
|
6
|
-
* The Original Code is manuscripts-frontend.
|
|
7
|
-
*
|
|
8
|
-
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
-
*
|
|
10
|
-
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
-
*/
|
|
12
|
-
import { PlaceholderKit } from '@manuscripts/assets';
|
|
13
|
-
import React from 'react';
|
|
14
|
-
export var IndicatorKind;
|
|
15
|
-
(function (IndicatorKind) {
|
|
16
|
-
IndicatorKind[IndicatorKind["Author"] = 0] = "Author";
|
|
17
|
-
IndicatorKind[IndicatorKind["ContributorDetail"] = 1] = "ContributorDetail";
|
|
18
|
-
IndicatorKind[IndicatorKind["Contributors"] = 2] = "Contributors";
|
|
19
|
-
IndicatorKind[IndicatorKind["Project"] = 3] = "Project";
|
|
20
|
-
IndicatorKind[IndicatorKind["ReferenceLibrary"] = 4] = "ReferenceLibrary";
|
|
21
|
-
})(IndicatorKind || (IndicatorKind = {}));
|
|
22
|
-
// TODO: Actually provide small sizes in PaintCode project.
|
|
23
|
-
export var IndicatorSize;
|
|
24
|
-
(function (IndicatorSize) {
|
|
25
|
-
// Small,
|
|
26
|
-
IndicatorSize[IndicatorSize["Medium"] = 0] = "Medium";
|
|
27
|
-
IndicatorSize[IndicatorSize["Large"] = 1] = "Large";
|
|
28
|
-
})(IndicatorSize || (IndicatorSize = {}));
|
|
29
|
-
export const indicatorSizeDimensionsMap = new Map([
|
|
30
|
-
[IndicatorSize.Medium, 160],
|
|
31
|
-
[IndicatorSize.Large, 375],
|
|
32
|
-
[undefined, 100],
|
|
33
|
-
]);
|
|
34
|
-
export class InvalidIndicatorPropsError extends Error {
|
|
35
|
-
constructor(message, props) {
|
|
36
|
-
super(message);
|
|
37
|
-
this.props = props;
|
|
38
|
-
Object.setPrototypeOf(this, new.target.prototype);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
export class ProgressIndicator extends React.Component {
|
|
42
|
-
constructor(props) {
|
|
43
|
-
super(props);
|
|
44
|
-
this.state = {
|
|
45
|
-
time: 0,
|
|
46
|
-
};
|
|
47
|
-
this.tickFunction = () => {
|
|
48
|
-
this.setState({
|
|
49
|
-
time: this.state.time + (this.props.timeIncrement || 0),
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
if (props.progress && props.progress > 0 && !props.isDeterminate) {
|
|
53
|
-
throw new InvalidIndicatorPropsError('progress > 0 for an indeterminate progress indicator', props);
|
|
54
|
-
}
|
|
55
|
-
this.canvasRef = React.createRef();
|
|
56
|
-
}
|
|
57
|
-
componentDidMount() {
|
|
58
|
-
this.updateCanvas();
|
|
59
|
-
if (this.props.timeIncrement) {
|
|
60
|
-
this.tickHandle = setInterval(this.tickFunction, this.props.refreshRate);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
componentDidUpdate() {
|
|
64
|
-
this.updateCanvas();
|
|
65
|
-
}
|
|
66
|
-
updateCanvas() {
|
|
67
|
-
if (!this.canvasRef.current) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
PlaceholderKit.clearCanvas(this.canvasRef.current);
|
|
71
|
-
PlaceholderKit.drawProgressIndication(this.canvasRef.current, this.state.time, this.props.progress || 0, this.props.isDeterminate || true);
|
|
72
|
-
this.symbolDrawFunction()(this.canvasRef.current, this.state.time, this.props.symbolRotationMultiplier || 0, this.props.crossRotationMultiplier || 0);
|
|
73
|
-
}
|
|
74
|
-
componentWillUnmount() {
|
|
75
|
-
if (this.tickHandle) {
|
|
76
|
-
clearInterval(this.tickHandle);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
render() {
|
|
80
|
-
// TODO: Actually handle the small size rendering in PaintCode.
|
|
81
|
-
const dim = indicatorSizeDimensionsMap.get(this.props.size);
|
|
82
|
-
return React.createElement("canvas", { ref: this.canvasRef, width: dim, height: dim });
|
|
83
|
-
}
|
|
84
|
-
symbolDrawFunction() {
|
|
85
|
-
switch (this.props.symbols) {
|
|
86
|
-
case IndicatorKind.Author:
|
|
87
|
-
return PlaceholderKit.drawAuthorSymbols;
|
|
88
|
-
case IndicatorKind.ContributorDetail:
|
|
89
|
-
return PlaceholderKit.drawContributorDetailSymbols;
|
|
90
|
-
case IndicatorKind.Contributors:
|
|
91
|
-
return PlaceholderKit.drawContributorSymbols;
|
|
92
|
-
case IndicatorKind.Project:
|
|
93
|
-
return PlaceholderKit.drawProjectSymbols;
|
|
94
|
-
case IndicatorKind.ReferenceLibrary:
|
|
95
|
-
return PlaceholderKit.drawReferenceLibrarySymbols;
|
|
96
|
-
default:
|
|
97
|
-
throw new InvalidIndicatorPropsError('Invalid key "symbols" in props', this.props);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
ProgressIndicator.defaultProps = {
|
|
102
|
-
progress: 0,
|
|
103
|
-
size: IndicatorSize.Large,
|
|
104
|
-
isDeterminate: false,
|
|
105
|
-
timeIncrement: 0.001,
|
|
106
|
-
symbolRotationMultiplier: 6.0,
|
|
107
|
-
crossRotationMultiplier: 0.5,
|
|
108
|
-
refreshRate: 25,
|
|
109
|
-
};
|
|
110
|
-
/*export class LargeDeterminateProjectsProgressIndicator extends ProgressIndicator {
|
|
111
|
-
public static defaultProps = {
|
|
112
|
-
progress: 0,
|
|
113
|
-
size: IndicatorSize.Large,
|
|
114
|
-
isDeterminate: false,
|
|
115
|
-
timeIncrement: 0.001,
|
|
116
|
-
symbolRotationMultiplier: 6.0,
|
|
117
|
-
crossRotationMultiplier: 0.5,
|
|
118
|
-
refreshRate: 25,
|
|
119
|
-
symbols: IndicatorKind.Project,
|
|
120
|
-
}
|
|
121
|
-
}*/
|
|
122
|
-
//# sourceMappingURL=ProgressIndicator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressIndicator.js","sourceRoot":"","sources":["../../../src/components/ProgressIndicator.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,cAAc,EAAyB,MAAM,qBAAqB,CAAA;AAC3E,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,CAAN,IAAY,aAMX;AAND,WAAY,aAAa;IACvB,qDAAM,CAAA;IACN,2EAAiB,CAAA;IACjB,i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I,CAAC,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAI,CAAA;IACjE,CAAC;IAQO,kBAAkB;QACxB,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;YAC1B,KAAK,aAAa,CAAC,MAAM;gBACvB,OAAO,cAAc,CAAC,iBAAiB,CAAA;YACzC,KAAK,aAAa,CAAC,iBAAiB;gBAClC,OAAO,cAAc,CAAC,4BAA4B,CAAA;YACpD,KAAK,aAAa,CAAC,YAAY;gBAC7B,OAAO,cAAc,CAAC,sBAAsB,CAAA;YAC9C,KAAK,aAAa,CAAC,OAAO;gBACxB,OAAO,cAAc,CAAC,kBAAkB,CAAA;YAC1C,KAAK,aAAa,CAAC,gBAAgB;gBACjC,OAAO,cAAc,CAAC,2BAA2B,CAAA;YACnD;gBACE,MAAM,IAAI,0BAA0B,CAClC,gCAAgC,EAChC,IAAI,CAAC,KAAK,CACX,CAAA;SACJ;IACH,CAAC;;AA/Fa,8BAAY,GAAG;IAC3B,QAAQ,EAAE,CAAC;IACX,IAAI,EAAE,aAAa,CAAC,KAAK;IACzB,aAAa,EAAE,KAAK;IACpB,aAAa,EAAE,KAAK;IACpB,wBAAwB,EAAE,GAAG;IAC7B,uBAAuB,EAAE,GAAG;IAC5B,WAAW,EAAE,EAAE;CAChB,CAAA;AA0FH;;;;;;;;;;;GAWG"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
|
3
|
-
*
|
|
4
|
-
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
|
5
|
-
*
|
|
6
|
-
* The Original Code is manuscripts-frontend.
|
|
7
|
-
*
|
|
8
|
-
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
|
9
|
-
*
|
|
10
|
-
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
|
|
11
|
-
*/
|
|
12
|
-
import React from 'react';
|
|
13
|
-
export declare enum IndicatorKind {
|
|
14
|
-
Author = 0,
|
|
15
|
-
ContributorDetail = 1,
|
|
16
|
-
Contributors = 2,
|
|
17
|
-
Project = 3,
|
|
18
|
-
ReferenceLibrary = 4
|
|
19
|
-
}
|
|
20
|
-
export declare enum IndicatorSize {
|
|
21
|
-
Medium = 0,
|
|
22
|
-
Large = 1
|
|
23
|
-
}
|
|
24
|
-
export declare const indicatorSizeDimensionsMap: Map<IndicatorSize | undefined, number>;
|
|
25
|
-
export interface BaseIndicatorProps {
|
|
26
|
-
readonly isDeterminate?: boolean;
|
|
27
|
-
readonly timeIncrement?: number;
|
|
28
|
-
readonly refreshRate?: number;
|
|
29
|
-
readonly symbolRotationMultiplier?: number;
|
|
30
|
-
readonly crossRotationMultiplier?: number;
|
|
31
|
-
readonly symbols?: IndicatorKind;
|
|
32
|
-
}
|
|
33
|
-
export interface DeterminateIndicatorProps {
|
|
34
|
-
readonly progress?: number;
|
|
35
|
-
}
|
|
36
|
-
export interface SizedIndicatorProps {
|
|
37
|
-
readonly size?: IndicatorSize;
|
|
38
|
-
}
|
|
39
|
-
export type IndicatorProps = BaseIndicatorProps & DeterminateIndicatorProps & SizedIndicatorProps;
|
|
40
|
-
export interface IndicatorState {
|
|
41
|
-
time: number;
|
|
42
|
-
}
|
|
43
|
-
export declare class InvalidIndicatorPropsError extends Error {
|
|
44
|
-
readonly props: IndicatorProps;
|
|
45
|
-
constructor(message: string, props: IndicatorProps);
|
|
46
|
-
}
|
|
47
|
-
export declare class ProgressIndicator extends React.Component<IndicatorProps, IndicatorState> {
|
|
48
|
-
static defaultProps: {
|
|
49
|
-
progress: number;
|
|
50
|
-
size: IndicatorSize;
|
|
51
|
-
isDeterminate: boolean;
|
|
52
|
-
timeIncrement: number;
|
|
53
|
-
symbolRotationMultiplier: number;
|
|
54
|
-
crossRotationMultiplier: number;
|
|
55
|
-
refreshRate: number;
|
|
56
|
-
};
|
|
57
|
-
state: Readonly<IndicatorState>;
|
|
58
|
-
private readonly canvasRef;
|
|
59
|
-
private tickHandle;
|
|
60
|
-
constructor(props: IndicatorProps);
|
|
61
|
-
componentDidMount(): void;
|
|
62
|
-
componentDidUpdate(): void;
|
|
63
|
-
updateCanvas(): void;
|
|
64
|
-
componentWillUnmount(): void;
|
|
65
|
-
render(): React.JSX.Element;
|
|
66
|
-
private tickFunction;
|
|
67
|
-
private symbolDrawFunction;
|
|
68
|
-
}
|