@manuscripts/style-guide 1.5.0-LEAN-3083 → 1.5.0-LEAN-2992
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/components/AffiliationsList.js +43 -0
- package/dist/cjs/components/AuthorsContainer.js +71 -0
- package/dist/cjs/components/AuthorsList/Author.js +99 -0
- package/dist/cjs/components/AuthorsList/AuthorsList.js +52 -0
- package/dist/cjs/components/AuthorsList/index.js +32 -0
- package/dist/cjs/components/Menus/Menus.js +62 -0
- package/dist/cjs/components/Menus/Shortcut.js +64 -0
- package/dist/cjs/components/Menus/Submenu.js +119 -0
- package/dist/cjs/components/Menus/index.js +17 -0
- package/dist/cjs/hooks/use-menus.js +89 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/lib/menus.js +22 -0
- package/dist/es/components/AffiliationsList.js +36 -0
- package/dist/es/components/AuthorsContainer.js +41 -0
- package/dist/es/components/AuthorsList/Author.js +69 -0
- package/dist/es/components/AuthorsList/AuthorsList.js +45 -0
- package/dist/es/components/AuthorsList/index.js +16 -0
- package/dist/es/components/Menus/Menus.js +55 -0
- package/dist/es/components/Menus/Shortcut.js +57 -0
- package/dist/es/components/Menus/Submenu.js +112 -0
- package/dist/es/components/Menus/index.js +1 -0
- package/dist/es/hooks/use-menus.js +85 -0
- package/dist/es/index.js +6 -0
- package/dist/es/lib/menus.js +18 -0
- package/dist/types/components/AffiliationsList.d.ts +22 -0
- package/dist/types/components/AuthorsContainer.d.ts +25 -0
- package/dist/types/components/AuthorsList/Author.d.ts +29 -0
- package/dist/types/components/AuthorsList/AuthorsList.d.ts +28 -0
- package/dist/types/components/AuthorsList/index.d.ts +16 -0
- package/dist/types/components/Menus/Menus.d.ts +24 -0
- package/dist/types/components/Menus/Shortcut.d.ts +23 -0
- package/dist/types/components/Menus/Submenu.d.ts +25 -0
- package/dist/types/components/Menus/index.d.ts +1 -0
- package/dist/types/hooks/use-menus.d.ts +7 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/lib/menus.d.ts +38 -0
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2021 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Contributor } from '@manuscripts/json-schema';
|
|
17
|
+
import React from 'react';
|
|
18
|
+
import { AuthorData } from '../types';
|
|
19
|
+
export declare const AuthorsContainer: React.FC<{
|
|
20
|
+
authorData: AuthorData;
|
|
21
|
+
showEditButton: boolean;
|
|
22
|
+
disableEditButton?: boolean;
|
|
23
|
+
startEditing: () => void;
|
|
24
|
+
selectAuthor: (data: Contributor) => void;
|
|
25
|
+
}>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2019 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Contributor } from '@manuscripts/json-schema';
|
|
17
|
+
import React from 'react';
|
|
18
|
+
import { AuthorAffiliation as AuthorAffiliationT } from '../../types';
|
|
19
|
+
interface AuthorProps {
|
|
20
|
+
author: Contributor;
|
|
21
|
+
affiliations?: AuthorAffiliationT[];
|
|
22
|
+
jointFirstAuthor: boolean;
|
|
23
|
+
showEditButton?: boolean;
|
|
24
|
+
disableEditButton?: boolean;
|
|
25
|
+
selectAuthor?: (data: Contributor) => void;
|
|
26
|
+
startEditing?: () => void;
|
|
27
|
+
}
|
|
28
|
+
export declare const Author: React.FunctionComponent<AuthorProps>;
|
|
29
|
+
export default Author;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2019 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Contributor } from '@manuscripts/json-schema';
|
|
17
|
+
import React from 'react';
|
|
18
|
+
import { AuthorAffiliation } from '../../types';
|
|
19
|
+
interface Props {
|
|
20
|
+
authors: Contributor[];
|
|
21
|
+
authorAffiliations: Map<string, AuthorAffiliation[]>;
|
|
22
|
+
showEditButton?: boolean;
|
|
23
|
+
disableEditButton?: boolean;
|
|
24
|
+
startEditing?: () => void;
|
|
25
|
+
selectAuthor?: (data: Contributor) => void;
|
|
26
|
+
}
|
|
27
|
+
export declare const AuthorsList: React.FunctionComponent<Props>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2019 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export * from './AuthorsList';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2019 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import React, { Ref } from 'react';
|
|
17
|
+
import { Menu } from '../../lib/menus';
|
|
18
|
+
interface MenusProps {
|
|
19
|
+
menus: Menu[];
|
|
20
|
+
innerRef: Ref<HTMLDivElement>;
|
|
21
|
+
handleClick: (position: number[]) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare const Menus: React.FC<MenusProps>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2019 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import { MenuShortcut } from '../../lib/menus';
|
|
18
|
+
export declare const ShortcutContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
19
|
+
interface ShortcutProps {
|
|
20
|
+
shortcut: MenuShortcut;
|
|
21
|
+
}
|
|
22
|
+
export declare const Shortcut: React.FC<ShortcutProps>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2019 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import { Menu, MenuSeparator } from '../../lib/menus';
|
|
18
|
+
export declare const Text: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
19
|
+
export declare const SubmenusContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
20
|
+
interface SubmenuProps {
|
|
21
|
+
menu: Menu | MenuSeparator;
|
|
22
|
+
handleClick: (position: number[]) => void;
|
|
23
|
+
}
|
|
24
|
+
export declare const Submenu: React.FC<SubmenuProps>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Menus';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -15,9 +15,12 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export { Theme } from './theme';
|
|
17
17
|
export * from './components/AffiliationsEditor';
|
|
18
|
+
export * from './components/AffiliationsList';
|
|
18
19
|
export * from './components/AuthorForm';
|
|
19
20
|
export * from './components/AuthorName';
|
|
21
|
+
export * from './components/AuthorsList';
|
|
20
22
|
export * from './components/AuthorsDND';
|
|
23
|
+
export * from './components/AuthorsContainer';
|
|
21
24
|
export * from './components/AlertMessage';
|
|
22
25
|
export * from './components/Button';
|
|
23
26
|
export * from './components/ColorField';
|
|
@@ -51,12 +54,15 @@ export * from './components/Text';
|
|
|
51
54
|
export * from './components/ManuscriptNoteList';
|
|
52
55
|
export * from './components/Comments';
|
|
53
56
|
export * from './components/RelativeDate';
|
|
57
|
+
export * from './components/Menus';
|
|
54
58
|
export * from './hooks/use-dropdown';
|
|
55
59
|
export * from './hooks/use-files';
|
|
60
|
+
export * from './hooks/use-menus';
|
|
56
61
|
export { useDeepCompareMemo, useDeepCompareCallback, } from './hooks/use-deep-compare';
|
|
57
62
|
export * from './lib/authors';
|
|
58
63
|
export * from './lib/capabilities';
|
|
59
64
|
export * from './lib/files';
|
|
60
65
|
export * from './lib/comments';
|
|
66
|
+
export * from './lib/menus';
|
|
61
67
|
export { default as errorsDecoder } from './lib/errors-decoder';
|
|
62
68
|
export * from './types';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2024 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export interface MenuShortcut {
|
|
17
|
+
mac: string;
|
|
18
|
+
pc: string;
|
|
19
|
+
}
|
|
20
|
+
export interface MenuSpec {
|
|
21
|
+
id: string;
|
|
22
|
+
label: string;
|
|
23
|
+
role?: string;
|
|
24
|
+
shortcut?: MenuShortcut;
|
|
25
|
+
isActive?: boolean;
|
|
26
|
+
isEnabled: boolean;
|
|
27
|
+
run?: () => void;
|
|
28
|
+
submenu?: (MenuSpec | MenuSeparator)[];
|
|
29
|
+
}
|
|
30
|
+
export interface Menu extends MenuSpec {
|
|
31
|
+
isOpen: boolean;
|
|
32
|
+
submenu?: (Menu | MenuSeparator)[];
|
|
33
|
+
}
|
|
34
|
+
export type MenuSeparator = {
|
|
35
|
+
role: 'separator';
|
|
36
|
+
};
|
|
37
|
+
export declare const isMenuSeparator: (menu: any) => menu is MenuSeparator;
|
|
38
|
+
export type MenuPointer = [number, number, number];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/style-guide",
|
|
3
3
|
"description": "Shared components for Manuscripts applications",
|
|
4
|
-
"version": "1.5.0-LEAN-
|
|
4
|
+
"version": "1.5.0-LEAN-2992",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-style-guide",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|