@manuscripts/style-guide 1.13.13-LEAN-3722.0 → 1.13.13
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/{TableFootnotesSelector.js → FootnotesSelector.js} +7 -7
- package/dist/cjs/index.js +1 -1
- package/dist/es/components/{TableFootnotesSelector.js → FootnotesSelector.js} +5 -5
- package/dist/es/index.js +1 -1
- package/dist/types/components/{TableFootnotesSelector.d.ts → FootnotesSelector.d.ts} +2 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +3 -3
|
@@ -41,7 +41,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
41
41
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
42
|
};
|
|
43
43
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
-
exports.
|
|
44
|
+
exports.FootnotesSelector = void 0;
|
|
45
45
|
const react_1 = __importStar(require("react"));
|
|
46
46
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
47
47
|
const Button_1 = require("./Button");
|
|
@@ -77,7 +77,7 @@ const AddNewFootnote = (0, styled_components_1.default)(Button_1.ButtonGroup) `
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
`;
|
|
80
|
-
const
|
|
80
|
+
const FootnotesSelector = ({ notes, inlineFootnote, onAdd, onInsert, onCancel, addNewLabel }) => {
|
|
81
81
|
let selectedNotesMap;
|
|
82
82
|
if (inlineFootnote) {
|
|
83
83
|
const rids = inlineFootnote.attrs.rids;
|
|
@@ -104,18 +104,18 @@ const TableFootnotesSelector = ({ notes, inlineFootnote, onAdd, onInsert, onCanc
|
|
|
104
104
|
};
|
|
105
105
|
return (react_1.default.createElement(Container, null,
|
|
106
106
|
react_1.default.createElement(NotesContainer, null,
|
|
107
|
-
react_1.default.createElement(
|
|
107
|
+
react_1.default.createElement(FootnotesList, { notes: notes, inlineFootnote: inlineFootnote, isSelected: isSelected, onSelect: toggleSelection })),
|
|
108
108
|
react_1.default.createElement(Actions, null,
|
|
109
109
|
react_1.default.createElement(AddNewFootnote, null,
|
|
110
110
|
react_1.default.createElement(Button_1.IconTextButton, { onClick: onAdd },
|
|
111
111
|
react_1.default.createElement(icons_1.AddNewIcon, null),
|
|
112
|
-
|
|
112
|
+
addNewLabel || 'Add new')),
|
|
113
113
|
react_1.default.createElement(Button_1.ButtonGroup, null,
|
|
114
114
|
react_1.default.createElement(Button_1.SecondaryButton, { onClick: onCancel }, "Cancel"),
|
|
115
115
|
react_1.default.createElement(Button_1.PrimaryButton, { onClick: handleClick, disabled: selections.size === 0 && !inlineFootnote }, inlineFootnote ? 'Update' : 'Insert')))));
|
|
116
116
|
};
|
|
117
|
-
exports.
|
|
118
|
-
const
|
|
117
|
+
exports.FootnotesSelector = FootnotesSelector;
|
|
118
|
+
const FootnotesList = ({ notes, isSelected, onSelect, inlineFootnote }) => {
|
|
119
119
|
const selectedNotes = [];
|
|
120
120
|
const remainingNotes = [];
|
|
121
121
|
notes.forEach((note) => {
|
|
@@ -170,5 +170,5 @@ const NoteText = styled_components_1.default.div `
|
|
|
170
170
|
color: ${(props) => props.theme.colors.text.primary};
|
|
171
171
|
flex: 1;
|
|
172
172
|
font-weight: ${(props) => props.theme.font.weight.normal};
|
|
173
|
-
margin-top:
|
|
173
|
+
margin-top: 2px;
|
|
174
174
|
`;
|
package/dist/cjs/index.js
CHANGED
|
@@ -48,7 +48,7 @@ __exportStar(require("./components/FileManager/util"), exports);
|
|
|
48
48
|
__exportStar(require("./components/Resizer"), exports);
|
|
49
49
|
__exportStar(require("./components/SaveStatus"), exports);
|
|
50
50
|
__exportStar(require("./components/StyledModal"), exports);
|
|
51
|
-
__exportStar(require("./components/
|
|
51
|
+
__exportStar(require("./components/FootnotesSelector"), exports);
|
|
52
52
|
__exportStar(require("./components/Sidebar"), exports);
|
|
53
53
|
__exportStar(require("./components/RichText"), exports);
|
|
54
54
|
__exportStar(require("./components/TextField"), exports);
|
|
@@ -48,7 +48,7 @@ const AddNewFootnote = styled(ButtonGroup) `
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
`;
|
|
51
|
-
export const
|
|
51
|
+
export const FootnotesSelector = ({ notes, inlineFootnote, onAdd, onInsert, onCancel, addNewLabel }) => {
|
|
52
52
|
let selectedNotesMap;
|
|
53
53
|
if (inlineFootnote) {
|
|
54
54
|
const rids = inlineFootnote.attrs.rids;
|
|
@@ -75,17 +75,17 @@ export const TableFootnotesSelector = ({ notes, inlineFootnote, onAdd, onInsert,
|
|
|
75
75
|
};
|
|
76
76
|
return (React.createElement(Container, null,
|
|
77
77
|
React.createElement(NotesContainer, null,
|
|
78
|
-
React.createElement(
|
|
78
|
+
React.createElement(FootnotesList, { notes: notes, inlineFootnote: inlineFootnote, isSelected: isSelected, onSelect: toggleSelection })),
|
|
79
79
|
React.createElement(Actions, null,
|
|
80
80
|
React.createElement(AddNewFootnote, null,
|
|
81
81
|
React.createElement(IconTextButton, { onClick: onAdd },
|
|
82
82
|
React.createElement(AddNewIcon, null),
|
|
83
|
-
|
|
83
|
+
addNewLabel || 'Add new')),
|
|
84
84
|
React.createElement(ButtonGroup, null,
|
|
85
85
|
React.createElement(SecondaryButton, { onClick: onCancel }, "Cancel"),
|
|
86
86
|
React.createElement(PrimaryButton, { onClick: handleClick, disabled: selections.size === 0 && !inlineFootnote }, inlineFootnote ? 'Update' : 'Insert')))));
|
|
87
87
|
};
|
|
88
|
-
const
|
|
88
|
+
const FootnotesList = ({ notes, isSelected, onSelect, inlineFootnote }) => {
|
|
89
89
|
const selectedNotes = [];
|
|
90
90
|
const remainingNotes = [];
|
|
91
91
|
notes.forEach((note) => {
|
|
@@ -140,5 +140,5 @@ const NoteText = styled.div `
|
|
|
140
140
|
color: ${(props) => props.theme.colors.text.primary};
|
|
141
141
|
flex: 1;
|
|
142
142
|
font-weight: ${(props) => props.theme.font.weight.normal};
|
|
143
|
-
margin-top:
|
|
143
|
+
margin-top: 2px;
|
|
144
144
|
`;
|
package/dist/es/index.js
CHANGED
|
@@ -28,7 +28,7 @@ export * from './components/FileManager/util';
|
|
|
28
28
|
export * from './components/Resizer';
|
|
29
29
|
export * from './components/SaveStatus';
|
|
30
30
|
export * from './components/StyledModal';
|
|
31
|
-
export * from './components/
|
|
31
|
+
export * from './components/FootnotesSelector';
|
|
32
32
|
export * from './components/Sidebar';
|
|
33
33
|
export * from './components/RichText';
|
|
34
34
|
export * from './components/TextField';
|
|
@@ -19,10 +19,11 @@ export type FootnoteWithIndex = {
|
|
|
19
19
|
node: FootnoteNode;
|
|
20
20
|
index?: string;
|
|
21
21
|
};
|
|
22
|
-
export declare const
|
|
22
|
+
export declare const FootnotesSelector: React.FC<{
|
|
23
23
|
notes: FootnoteWithIndex[];
|
|
24
24
|
inlineFootnote?: InlineFootnoteNode;
|
|
25
25
|
onAdd: () => void;
|
|
26
26
|
onInsert: (notes: FootnoteWithIndex[]) => void;
|
|
27
27
|
onCancel: () => void;
|
|
28
|
+
addNewLabel?: string;
|
|
28
29
|
}>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export * from './components/FileManager/util';
|
|
|
29
29
|
export * from './components/Resizer';
|
|
30
30
|
export * from './components/SaveStatus';
|
|
31
31
|
export * from './components/StyledModal';
|
|
32
|
-
export * from './components/
|
|
32
|
+
export * from './components/FootnotesSelector';
|
|
33
33
|
export * from './components/Sidebar';
|
|
34
34
|
export * from './components/RichText';
|
|
35
35
|
export * from './components/TextField';
|
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.13.13
|
|
4
|
+
"version": "1.13.13",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-style-guide",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@manuscripts/json-schema": "2.2.10",
|
|
36
|
-
"@manuscripts/transform": "2.3.
|
|
36
|
+
"@manuscripts/transform": "2.3.19",
|
|
37
37
|
"@reach/tabs": "^0.18.0",
|
|
38
38
|
"date-fns": "^2.29.3",
|
|
39
39
|
"formik": "^2.2.9",
|
|
@@ -109,4 +109,4 @@
|
|
|
109
109
|
"@types/react": "^17.0.2",
|
|
110
110
|
"jackspeak": "2.1.1"
|
|
111
111
|
}
|
|
112
|
-
}
|
|
112
|
+
}
|