@manuscripts/article-editor 3.7.63-LEAN-4314.0 → 3.8.1-LEAN-4314.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/cjs/components/DelayUnmount.js +57 -0
  2. package/dist/cjs/components/DelayUnmount.js.map +1 -0
  3. package/dist/cjs/components/SearchReplace/AdvancedSearch.js +84 -0
  4. package/dist/cjs/components/SearchReplace/AdvancedSearch.js.map +1 -0
  5. package/dist/cjs/components/SearchReplace/SearchField.js +80 -0
  6. package/dist/cjs/components/SearchReplace/SearchField.js.map +1 -0
  7. package/dist/cjs/components/SearchReplace/SearchReplace.js +182 -0
  8. package/dist/cjs/components/SearchReplace/SearchReplace.js.map +1 -0
  9. package/dist/cjs/components/SearchReplace/index.js +29 -0
  10. package/dist/cjs/components/SearchReplace/index.js.map +1 -0
  11. package/dist/cjs/components/projects/EditorContainer.js +1 -0
  12. package/dist/cjs/components/projects/EditorContainer.js.map +1 -1
  13. package/dist/cjs/components/projects/ManuscriptPageContainer.js +3 -1
  14. package/dist/cjs/components/projects/ManuscriptPageContainer.js.map +1 -1
  15. package/dist/cjs/components/projects/ManuscriptToolbar.js +1 -1
  16. package/dist/cjs/components/projects/ManuscriptToolbar.js.map +1 -1
  17. package/dist/es/components/DelayUnmount.js +30 -0
  18. package/dist/es/components/DelayUnmount.js.map +1 -0
  19. package/dist/es/components/SearchReplace/AdvancedSearch.js +77 -0
  20. package/dist/es/components/SearchReplace/AdvancedSearch.js.map +1 -0
  21. package/dist/es/components/SearchReplace/SearchField.js +50 -0
  22. package/dist/es/components/SearchReplace/SearchField.js.map +1 -0
  23. package/dist/es/components/SearchReplace/SearchReplace.js +155 -0
  24. package/dist/es/components/SearchReplace/SearchReplace.js.map +1 -0
  25. package/dist/es/components/SearchReplace/index.js +13 -0
  26. package/dist/es/components/SearchReplace/index.js.map +1 -0
  27. package/dist/es/components/projects/EditorContainer.js +1 -0
  28. package/dist/es/components/projects/EditorContainer.js.map +1 -1
  29. package/dist/es/components/projects/ManuscriptPageContainer.js +3 -1
  30. package/dist/es/components/projects/ManuscriptPageContainer.js.map +1 -1
  31. package/dist/es/components/projects/ManuscriptToolbar.js +1 -1
  32. package/dist/es/components/projects/ManuscriptToolbar.js.map +1 -1
  33. package/dist/types/components/DelayUnmount.d.ts +17 -0
  34. package/dist/types/components/SearchReplace/AdvancedSearch.d.ts +19 -0
  35. package/dist/types/components/SearchReplace/SearchField.d.ts +19 -0
  36. package/dist/types/components/SearchReplace/SearchReplace.d.ts +13 -0
  37. package/dist/types/components/SearchReplace/index.d.ts +12 -0
  38. package/package.json +4 -4
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.DelayUnmount = void 0;
27
+ /*!
28
+ * 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.
29
+ *
30
+ * 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.
31
+ *
32
+ * The Original Code is manuscripts-frontend.
33
+ *
34
+ * The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
35
+ *
36
+ * All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
37
+ */
38
+ const react_1 = __importStar(require("react"));
39
+ const DelayUnmount = ({ isVisible, delay, children }) => {
40
+ const [shouldRender, setShouldRender] = (0, react_1.useState)(true);
41
+ (0, react_1.useEffect)(() => {
42
+ let timeoutId;
43
+ if (!isVisible && shouldRender) {
44
+ // @ts-ignore
45
+ timeoutId = setTimeout(() => {
46
+ setShouldRender(false);
47
+ }, delay || 200);
48
+ }
49
+ if (isVisible && !shouldRender) {
50
+ setShouldRender(true);
51
+ }
52
+ return () => clearTimeout(timeoutId);
53
+ }, [isVisible, delay, shouldRender]);
54
+ return shouldRender ? react_1.default.createElement(react_1.default.Fragment, null, children) : null;
55
+ };
56
+ exports.DelayUnmount = DelayUnmount;
57
+ //# sourceMappingURL=DelayUnmount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DelayUnmount.js","sourceRoot":"","sources":["../../../src/components/DelayUnmount.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+CAAkD;AAE3C,MAAM,YAAY,GAIpB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IACtC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAA;IAEtD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,SAAiB,CAAA;QACrB,IAAI,CAAC,SAAS,IAAI,YAAY,EAAE;YAC9B,aAAa;YACb,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE;gBAC1B,eAAe,CAAC,KAAK,CAAC,CAAA;YACxB,CAAC,EAAE,KAAK,IAAI,GAAG,CAAC,CAAA;SACjB;QACD,IAAI,SAAS,IAAI,CAAC,YAAY,EAAE;YAC9B,eAAe,CAAC,IAAI,CAAC,CAAA;SACtB;QACD,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;IACtC,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,CAAA;IAEpC,OAAO,YAAY,CAAC,CAAC,CAAC,8DAAG,QAAQ,CAAI,CAAC,CAAC,CAAC,IAAI,CAAA;AAC9C,CAAC,CAAA;AAtBY,QAAA,YAAY,gBAsBxB"}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Advanced = void 0;
7
+ /*!
8
+ * 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.
9
+ *
10
+ * 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.
11
+ *
12
+ * The Original Code is manuscripts-frontend.
13
+ *
14
+ * The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
15
+ *
16
+ * All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
17
+ */
18
+ const style_guide_1 = require("@manuscripts/style-guide");
19
+ const react_1 = __importDefault(require("react"));
20
+ const styled_components_1 = __importDefault(require("styled-components"));
21
+ const SearchField_1 = require("./SearchField");
22
+ const Advanced = ({ isOpen, handleClose, setNewSearchValue, value, movePrev, moveNext, replaceAll, replaceCurrent, setReplaceValue, total, current, caseSensitive, setCaseSensitive, ignoreDiacritics, setIgnoreDiacritics, onInputFocus, }) => (react_1.default.createElement(react_1.default.Fragment, null,
23
+ react_1.default.createElement(style_guide_1.DraggableModal, { isOpen: isOpen, onRequestClose: () => handleClose() },
24
+ react_1.default.createElement(style_guide_1.ModalHeader, null,
25
+ react_1.default.createElement(style_guide_1.CloseButton, { onClick: () => handleClose(), "data-cy": "modal-close-button" })),
26
+ react_1.default.createElement(SearchForm, null,
27
+ react_1.default.createElement("h3", null, "Find and Replace"),
28
+ react_1.default.createElement(FieldGroup, null,
29
+ react_1.default.createElement(Label, null, "Find"),
30
+ react_1.default.createElement(SearchField_1.SearchField, { value: value, onInputFocus: () => onInputFocus(), total: total, current: current, setNewSearchValue: setNewSearchValue })),
31
+ react_1.default.createElement(FieldGroup, null,
32
+ react_1.default.createElement(Label, null, "Replace With"),
33
+ react_1.default.createElement(style_guide_1.TextField, { onChange: (e) => {
34
+ setReplaceValue(e.target.value);
35
+ }, autoComplete: "off", role: "searchbox", spellCheck: false, placeholder: 'Replace with', "aria-label": "Replace with", type: 'text' })),
36
+ react_1.default.createElement(OptionsGroup, null,
37
+ react_1.default.createElement(CheckBoxGroup, null,
38
+ react_1.default.createElement(style_guide_1.CheckboxField, { id: "caseSensitive", checked: caseSensitive, onChange: (e) => setCaseSensitive(e.target.checked) }),
39
+ react_1.default.createElement(CheckBoxLabelSpaced, { htmlFor: "caseSensitive" }, "Match case")),
40
+ react_1.default.createElement(CheckBoxGroup, null,
41
+ react_1.default.createElement(style_guide_1.CheckboxField, { id: "ignoreDiacritics", checked: ignoreDiacritics, onChange: (e) => setIgnoreDiacritics(e.target.checked) }),
42
+ react_1.default.createElement(CheckBoxLabelSpaced, { htmlFor: "ignoreDiacritics" }, "Ignore diacritics (e.g. \u00E4 = a, E = \u00C9, \u05D0\u05B7 = \u05D0)"))),
43
+ react_1.default.createElement(ButtonsSection, null,
44
+ react_1.default.createElement(style_guide_1.SecondaryButton, { onClick: () => replaceCurrent() }, "Replace"),
45
+ react_1.default.createElement(style_guide_1.SecondaryButton, { onClick: () => replaceAll() }, "Replace All"),
46
+ react_1.default.createElement(style_guide_1.PrimaryButton, { onClick: () => movePrev() }, "Previous"),
47
+ react_1.default.createElement(style_guide_1.PrimaryButton, { onClick: () => moveNext() }, "Next"))))));
48
+ exports.Advanced = Advanced;
49
+ const CheckBoxLabelSpaced = (0, styled_components_1.default)(style_guide_1.CheckboxLabel) `
50
+ margin-left: 0.5rem;
51
+ `;
52
+ const CheckBoxGroup = styled_components_1.default.div `
53
+ margin: 0.5rem 0;
54
+ `;
55
+ const OptionsGroup = styled_components_1.default.div `
56
+ display: flex;
57
+ flex-flow: column;
58
+ max-width: 350px;
59
+ margin: 0.5rem 0 2.5rem auto;
60
+ `;
61
+ const FieldGroup = styled_components_1.default.div `
62
+ display: flex;
63
+ margin-bottom: 2rem;
64
+ align-items: center;
65
+ justify-content: space-between;
66
+ & > input {
67
+ max-width: 350px;
68
+ }
69
+ `;
70
+ const Label = (0, styled_components_1.default)(style_guide_1.TextFieldLabel) `
71
+ text-transform: none;
72
+ `;
73
+ const ButtonsSection = styled_components_1.default.div `
74
+ display: flex;
75
+ justify-content: space-between;
76
+ button {
77
+ min-width: 100px;
78
+ }
79
+ `;
80
+ const SearchForm = styled_components_1.default.div `
81
+ min-width: 465px;
82
+ max-width: 100%;
83
+ `;
84
+ //# sourceMappingURL=AdvancedSearch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdvancedSearch.js","sourceRoot":"","sources":["../../../../src/components/SearchReplace/AdvancedSearch.tsx"],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GAAG,CAAA;;;;;;CAMhC,CAAA;AACD,MAAM,UAAU,GAAG,2BAAM,CAAC,GAAG,CAAA;;;CAG5B,CAAA"}
@@ -0,0 +1,80 @@
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.SearchField = void 0;
41
+ const style_guide_1 = require("@manuscripts/style-guide");
42
+ const react_1 = __importStar(require("react"));
43
+ const styled_components_1 = __importDefault(require("styled-components"));
44
+ const SearchField = ({ setNewSearchValue, value, current, total, onInputFocus }) => {
45
+ const input = (0, react_1.useRef)(null);
46
+ (0, react_1.useEffect)(() => {
47
+ input.current?.focus();
48
+ }, []);
49
+ return (react_1.default.createElement(FieldWrapper, null,
50
+ react_1.default.createElement(style_guide_1.TextField, { onChange: (e) => {
51
+ setNewSearchValue(e.target.value);
52
+ }, autoComplete: "off", role: "searchbox", value: value, spellCheck: false, placeholder: 'Find in document', "aria-label": "Find in document", onFocus: () => onInputFocus(), type: "text", ref: input }),
53
+ value && (react_1.default.createElement(Counter, null,
54
+ total === 0 ? 0 : Math.max(1, current + 1),
55
+ " of ",
56
+ total))));
57
+ };
58
+ exports.SearchField = SearchField;
59
+ const FieldWrapper = (0, styled_components_1.default)(style_guide_1.TextField.withComponent('div')) `
60
+ position: relative;
61
+ display: flex;
62
+ padding: 0;
63
+ align-items: center;
64
+ max-width: 350px;
65
+ ${style_guide_1.TextField} {
66
+ border: none;
67
+ }
68
+ &:focus-within {
69
+ border-color: ${(props) => props.theme.colors.border.field.hover};
70
+ background-color: ${(props) => props.theme.colors.background.fifth};
71
+ }
72
+ `;
73
+ const Counter = styled_components_1.default.div `
74
+ color: #ccc;
75
+ line-height: 1;
76
+ flex: 1 0 auto;
77
+ padding: 0 16px 0 8px;
78
+ pointer-events: none;
79
+ `;
80
+ //# sourceMappingURL=SearchField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchField.js","sourceRoot":"","sources":["../../../../src/components/SearchReplace/SearchField.tsx"],"names":[],"mappings":";AAAA;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AM,CAAC,KAAK,CAAC,KAAK;wBAC5C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK;;CAErE,CAAA;AAED,MAAM,OAAO,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;;CAMzB,CAAA"}
@@ -0,0 +1,182 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.SearchReplace = void 0;
38
+ const body_editor_1 = require("@manuscripts/body-editor");
39
+ const style_guide_1 = require("@manuscripts/style-guide");
40
+ const react_1 = __importStar(require("react"));
41
+ const styled_components_1 = __importStar(require("styled-components"));
42
+ const store_1 = require("../../store");
43
+ const DelayUnmount_1 = require("../DelayUnmount");
44
+ const AdvancedSearch_1 = require("./AdvancedSearch");
45
+ const SearchField_1 = require("./SearchField");
46
+ const SearchReplace = () => {
47
+ const [editor] = (0, store_1.useStore)((state) => state.editor);
48
+ const [replacement, setReplacement] = (0, react_1.useState)('');
49
+ const setPluginState = (0, react_1.useCallback)(function (values) {
50
+ const view = editor?.view;
51
+ if (view) {
52
+ const tr = view.state.tr;
53
+ tr.setMeta(body_editor_1.searchReplacePluginKey, values);
54
+ view.dispatch(tr);
55
+ }
56
+ }, [editor?.view]);
57
+ const [newSearchValue, setNewSearchValue] = (0, react_1.useState)('');
58
+ (0, react_1.useEffect)(() => {
59
+ const timeout = setTimeout(() => {
60
+ setPluginState({ value: newSearchValue });
61
+ }, 400);
62
+ return () => clearTimeout(timeout);
63
+ }, [newSearchValue, setPluginState]);
64
+ if (!editor) {
65
+ return null;
66
+ }
67
+ const pluginState = body_editor_1.searchReplacePluginKey.getState(editor.state);
68
+ if (!pluginState) {
69
+ return null;
70
+ }
71
+ const advanced = pluginState?.activeAdvanced;
72
+ const isActive = pluginState ? pluginState.active : false;
73
+ const current = pluginState.currentMatch;
74
+ const matches = pluginState?.matches;
75
+ const selection = editor.state.selection;
76
+ const value = pluginState?.value || '';
77
+ const caseSensitive = pluginState?.caseSensitive || false;
78
+ const ignoreDiacritics = pluginState?.ignoreDiacritics || false;
79
+ function moveMatch(side) {
80
+ const newMatch = (0, body_editor_1.getNewMatch)(side, current, selection, matches);
81
+ setPluginState({
82
+ currentMatch: newMatch,
83
+ highlightCurrent: true,
84
+ });
85
+ }
86
+ const setAdvanced = (val) => setPluginState({ activeAdvanced: val });
87
+ const deactivate = () => setPluginState({ active: false });
88
+ // replace only currently selected match
89
+ const replaceCurrent = () => {
90
+ const view = editor.view;
91
+ if (view) {
92
+ const tr = view.state.tr;
93
+ tr.replaceWith(matches[current].from, matches[current].to, view.state.schema.text(replacement));
94
+ view.dispatch(tr);
95
+ /*
96
+ since replacing current match of search will shorten the list by one, the next item will be located
97
+ at the same index as the current, however we still need to check if there is actually a next item (current + 1) which would guarantee
98
+ that 'current' will be valid once current 'current' is replaced and excluded from the matches list.
99
+ */
100
+ const newCurrent = matches.length <= 1 ? -1 : matches[current + 1] ? current : 0;
101
+ view.dispatch(view.state.tr.setMeta(body_editor_1.searchReplacePluginKey, {
102
+ value,
103
+ currentMatch: newCurrent,
104
+ highlightCurrent: true,
105
+ }));
106
+ }
107
+ };
108
+ const replaceAll = () => {
109
+ const view = editor.view;
110
+ if (view) {
111
+ const tr = view.state.tr;
112
+ if (matches) {
113
+ matches.forEach(({ from, to }) => {
114
+ tr.replaceWith(tr.mapping.map(from), tr.mapping.map(to), view.state.schema.text(replacement));
115
+ });
116
+ }
117
+ tr.setMeta('massSearchReplace', true); // needed to make tc-plugin not to freak out about a large amount of steps
118
+ view.dispatch(tr);
119
+ view.dispatch(view.state.tr.setMeta(body_editor_1.searchReplacePluginKey, { value }));
120
+ }
121
+ };
122
+ if (advanced) {
123
+ return (react_1.default.createElement(AdvancedSearch_1.Advanced, { isOpen: advanced, setNewSearchValue: setNewSearchValue, value: newSearchValue, setIgnoreDiacritics: (val) => setPluginState({ ignoreDiacritics: val }), setCaseSensitive: (val) => setPluginState({ caseSensitive: val }), replaceAll: replaceAll, replaceCurrent: replaceCurrent, moveNext: () => moveMatch('right'), movePrev: () => moveMatch('left'), setReplaceValue: setReplacement, ignoreDiacritics: ignoreDiacritics, caseSensitive: caseSensitive, handleClose: () => {
124
+ setAdvanced(false);
125
+ deactivate();
126
+ }, current: current, total: matches.length, onInputFocus: () => {
127
+ setPluginState({
128
+ highlightCurrent: true,
129
+ });
130
+ } }));
131
+ }
132
+ return (react_1.default.createElement(react_1.default.Fragment, null,
133
+ react_1.default.createElement(DelayUnmount_1.DelayUnmount, { isVisible: isActive },
134
+ react_1.default.createElement(Search, { className: isActive ? 'active' : 'inactive' },
135
+ react_1.default.createElement(SearchField_1.SearchField, { value: newSearchValue, current: current, onInputFocus: () => {
136
+ setPluginState({
137
+ highlightCurrent: true,
138
+ });
139
+ }, total: matches.length, setNewSearchValue: setNewSearchValue }),
140
+ react_1.default.createElement(style_guide_1.IconButton, { onClick: () => setAdvanced(true) },
141
+ react_1.default.createElement(style_guide_1.DotsIcon, null)),
142
+ react_1.default.createElement(style_guide_1.CloseButton, { onClick: () => deactivate(), "data-cy": "modal-close-button" }),
143
+ react_1.default.createElement(style_guide_1.IconButton, { onClick: () => moveMatch('left') },
144
+ react_1.default.createElement(style_guide_1.ArrowUpIcon, null)),
145
+ react_1.default.createElement(style_guide_1.IconButton, { onClick: () => moveMatch('right') },
146
+ react_1.default.createElement(ArrowDownIcon, null))))));
147
+ };
148
+ exports.SearchReplace = SearchReplace;
149
+ const ArrowDownIcon = (0, styled_components_1.default)(style_guide_1.ArrowUpIcon) `
150
+ transform: scaleY(-1);
151
+ `;
152
+ const inAnimation = (0, styled_components_1.keyframes) `
153
+ 0% {
154
+ top: 50%;
155
+ opacity: 0;
156
+ }
157
+ 100% {
158
+ top: 100%;
159
+ transform: scale(1);
160
+ }
161
+ }`;
162
+ const Search = styled_components_1.default.div `
163
+ display: flex;
164
+ padding: 0.5rem;
165
+ width: 440px;
166
+ position: absolute;
167
+ top: 50%;
168
+ right: 1rem;
169
+ background: #fff;
170
+ border: 1px solid #f2f2f2;
171
+ border-top: none;
172
+ transition: all 0.2s ease;
173
+ &.active {
174
+ animation: ${inAnimation} 0.2s ease-in-out;
175
+ top: 100%;
176
+ opacity: 1;
177
+ }
178
+ &.inactive {
179
+ opacity: 0;
180
+ }
181
+ `;
182
+ //# sourceMappingURL=SearchReplace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchReplace.js","sourceRoot":"","sources":["../../../../src/components/SearchReplace/SearchReplace.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0DAIiC;AACjC,0DAKiC;AACjC,+CAA+D;AAC/D,uEAAqD;AAErD,uCAAsC;AACtC,kDAA8C;AAC9C,qDAA2C;AAC3C,+CAA2C;AAEpC,MAAM,aAAa,GAAa,GAAG,EAAE;IAC1C,MAAM,CAAC,MAAM,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAClD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAA;IAElD,MAAM,cAAc,GAAG,IAAA,mBAAW,EAChC,UAAU,MAAyC;QACjD,MAAM,IAAI,GAAG,MAAM,EAAE,IAAI,CAAA;QACzB,IAAI,IAAI,EAAE;YACR,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAA;YACxB,EAAE,CAAC,OAAO,CAAC,oCAAsB,EAAE,MAAM,CAAC,CAAA;YAC1C,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;SAClB;IACH,CAAC,EACD,CAAC,MAAM,EAAE,IAAI,CAAC,CACf,CAAA;IAED,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAA;IAExD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;YAC9B,cAAc,CAAC,EAAE,KAAK,EAAE,c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AO3B,CAAA"}
@@ -0,0 +1,29 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
25
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ __exportStar(require("./SearchReplace"), exports);
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/SearchReplace/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;AAEH,kDAA+B"}
@@ -42,6 +42,7 @@ exports.EditorContainerInner = styled_components_1.default.div `
42
42
  exports.EditorHeader = styled_components_1.default.div `
43
43
  background: ${(props) => props.theme.colors.background.primary};
44
44
  z-index: 6;
45
+ position: relative;
45
46
  border-bottom: 1px solid #f2f2f2;
46
47
  `;
47
48
  exports.EditorBody = styled_components_1.default.div `
@@ -1 +1 @@
1
- {"version":3,"file":"EditorContainer.js","sourceRoot":"","sources":["../../../../src/components/projects/EditorContainer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAEH,0EAAsC;AAEzB,QAAA,eAAe,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;;;UAO/B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;WACnC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;gBAE/B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO;CAC/D,CAAA;AAEY,QAAA,oBAAoB,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;;;gBAO9B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO;;;CAG/D,CAAA;AAEY,QAAA,YAAY,GAAG,2BAAM,CAAC,GAAG,CAAA;gBACtB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO;;;CAG/D,CAAA;AAEY,QAAA,UAAU,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;aAIvB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;MAC3C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAA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eAC3B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc;uBAClC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM;;;CAGxD,CAAA"}
@@ -24,6 +24,7 @@ const styled_components_1 = __importDefault(require("styled-components"));
24
24
  const use_tracking_visibility_1 = require("../../hooks/use-tracking-visibility");
25
25
  const store_1 = require("../../store");
26
26
  const Page_1 = require("../Page");
27
+ const SearchReplace_1 = require("../SearchReplace");
27
28
  const UtilitiesEffects_1 = __importDefault(require("../UtilitiesEffects"));
28
29
  const EditorContainer_1 = require("./EditorContainer");
29
30
  const EditorElement_1 = __importDefault(require("./EditorElement"));
@@ -65,7 +66,8 @@ const ManuscriptPageView = () => {
65
66
  !can.editWithoutTracking && (react_1.default.createElement(react_1.default.Fragment, null,
66
67
  react_1.default.createElement(Label, null, "Show tracked changes"),
67
68
  react_1.default.createElement(style_guide_1.IconButton, { defaultColor: true, onClick: toggleTrackingVisibility }, trackingVisible ? react_1.default.createElement(style_guide_1.SliderOnIcon, null) : react_1.default.createElement(style_guide_1.SliderOffIcon, null))))),
68
- can.seeEditorToolbar && react_1.default.createElement(ManuscriptToolbar_1.ManuscriptToolbar, null)),
69
+ can.seeEditorToolbar && react_1.default.createElement(ManuscriptToolbar_1.ManuscriptToolbar, null),
70
+ react_1.default.createElement(SearchReplace_1.SearchReplace, null)),
69
71
  react_1.default.createElement(EditorContainer_1.EditorBody, { className: "editor-body" },
70
72
  react_1.default.createElement(TrackChangesStyles_1.TrackChangesStyles, null,
71
73
  react_1.default.createElement(EditorElement_1.default, null)))))),
@@ -1 +1 @@
1
- {"version":3,"file":"ManuscriptPageContainer.js","sourceRoot":"","sources":["../../../../src/components/projects/ManuscriptPageContainer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAEH,sDAAmD;AACnD,8DAA2D;AAC3D,sDAAmD;AAEnD,0D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AAC,IAAI,GAAG,CAAC;MACpC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI;MAChC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE;;CAE1C,CAAA;AAED,MAAM,WAAW,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;CAK7B,CAAA;AAED,kBAAe,uBAAuB,CAAA"}
1
+ {"version":3,"file":"ManuscriptPageContainer.js","sourceRoot":"","sources":["../../../../src/components/projects/ManuscriptPageContainer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAEH,sDAAmD;AACnD,8DAA2D;AAC3D,sDAAmD;AAEnD,0DAOiC;AACjC,kDAAyB;AACzB,0EAAsC;AAEtC,iFAA2E;AAC3E,uCAAsC;AACtC,kCAA8B;AAC9B,oDAAgD;AAChD,2EAAkD;AAClD,uDAK0B;AAC1B,oEAA2C;AAC3C,4DAAmC;AACnC,uDAAmD;AACnD,4EAAmD;AACnD,2DAAuD;AACvD,6DAAyD;AAEzD,MAAM,uBAAuB,GAAa,GAAG,EAAE;IAC7C,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,KAAK,EAAE,EAAE;QAC/D,OAAO;YACL,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;SACzC,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,MAAM,GAAG,GAAG,IAAA,+BAAiB,EAAC;QAC5B,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,OAAO;QAChB,gBAAgB;KACjB,CAAC,CAAA;IAEF,OAAO,CACL,8BAAC,kCAAoB,IAAC,GAAG,EAAE,GAAG;QAC5B,8BAAC,kBAAkB,OAAG,CACD,CAC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AA;AACD,MAAM,OAAO,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;;;;CAQzB,CAAA;AACY,QAAA,wBAAwB,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;sBAI5B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS;CACvE,CAAA;AACY,QAAA,6BAA6B,GAAG,2BAAM,CAAC,GAAG,CAAA;;eAExC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc;;aAE5C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;MAC3C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;MACpC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI;MAChC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE;;CAE1C,CAAA;AAED,MAAM,WAAW,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;CAK7B,CAAA;AAED,kBAAe,uBAAuB,CAAA"}
@@ -103,7 +103,7 @@ const ManuscriptToolbar = () => {
103
103
  }
104
104
  return item.isEnabled(state);
105
105
  };
106
- return (react_1.default.createElement(exports.ToolbarContainer, { "data-cy": 'toolbar' },
106
+ return (react_1.default.createElement(exports.ToolbarContainer, { "data-cy": "toolbar" },
107
107
  react_1.default.createElement(exports.ToolbarGroup, null,
108
108
  react_1.default.createElement(body_editor_1.TypeSelector, { state: state, dispatch: view.dispatch, view: view })),
109
109
  Object.entries(body_editor_1.toolbar).map(([groupKey, group]) => (react_1.default.createElement(exports.ToolbarGroup, { key: groupKey }, Object.entries(group)
@@ -1 +1 @@
1
- {"version":3,"file":"ManuscriptTo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d,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,GAAG,EACT,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,IAAI,GACZ,CACH,CAAC,CAAC,CAAC,CACF,8BAAC,mBAAW,IAAC,GAAG,EAAE,GAAG;YACnB,8BAAC,aAAa,uBACK,IAAI,CAAC,KAAK,iBACd,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAClD,QAAQ,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,EACtC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACb,CAAC,CAAC,cAAc,EAAE,CAAA;oBAClB,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;oBAC9B,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAA;gBACtB,CAAC,IAEA,IAAI,CAAC,OAAO,CACC;YAChB,8BAAC,qBAAO,IAAC,EAAE,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,QAAQ,IACpC,IAAI,CAAC,KAAK,CACH,CACE,CACf,CACF,CACU,CAChB,CAAC,CACe,CACpB,CAAA;AACH,CAAC,CAAA;AA7EY,QAAA,iBAAiB,qBA6E7B"}
1
+ {"version":3,"file":"ManuscriptToolbar.js","sourceRoot":"","sources":["../../../../src/components/projects/ManuscriptToolbar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAEH,0DAIiC;AACjC,0DAAkE;AAElE,kDAAyB;AACzB,0EAAsC;AAEtC,yCAAwC;AACxC,uCAAsC;AACtC,uDAAmD;AAEtC,QAAA,WAAW,GAAG,2BAAM,CAAC,GAAG,CAAA;;;CAGpC,CAAA;AAED,MAAM,aAAa,GAAG,2BAAM,CAAC,MAAM,CAAC,KAAK,CAAC;IACxC,IAAI,EAAE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AAQ,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,EACtC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACb,CAAC,CAAC,cAAc,EAAE,CAAA;oBAClB,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;oBAC9B,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAA;gBACtB,CAAC,IAEA,IAAI,CAAC,OAAO,CACC;YAChB,8BAAC,qBAAO,IAAC,EAAE,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,QAAQ,IACpC,IAAI,CAAC,KAAK,CACH,CACE,CACf,CACF,CACU,CAChB,CAAC,CACe,CACpB,CAAA;AACH,CAAC,CAAA;AA7EY,QAAA,iBAAiB,qBA6E7B"}
@@ -0,0 +1,30 @@
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
+ export const DelayUnmount = ({ isVisible, delay, children }) => {
14
+ const [shouldRender, setShouldRender] = useState(true);
15
+ useEffect(() => {
16
+ let timeoutId;
17
+ if (!isVisible && shouldRender) {
18
+ // @ts-ignore
19
+ timeoutId = setTimeout(() => {
20
+ setShouldRender(false);
21
+ }, delay || 200);
22
+ }
23
+ if (isVisible && !shouldRender) {
24
+ setShouldRender(true);
25
+ }
26
+ return () => clearTimeout(timeoutId);
27
+ }, [isVisible, delay, shouldRender]);
28
+ return shouldRender ? React.createElement(React.Fragment, null, children) : null;
29
+ };
30
+ //# sourceMappingURL=DelayUnmount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DelayUnmount.js","sourceRoot":"","sources":["../../../src/components/DelayUnmount.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAElD,MAAM,CAAC,MAAM,YAAY,GAIpB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IACtC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAA;IAEtD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,SAAiB,CAAA;QACrB,IAAI,CAAC,SAAS,IAAI,YAAY,EAAE;YAC9B,aAAa;YACb,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE;gBAC1B,eAAe,CAAC,KAAK,CAAC,CAAA;YACxB,CAAC,EAAE,KAAK,IAAI,GAAG,CAAC,CAAA;SACjB;QACD,IAAI,SAAS,IAAI,CAAC,YAAY,EAAE;YAC9B,eAAe,CAAC,IAAI,CAAC,CAAA;SACtB;QACD,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;IACtC,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,CAAA;IAEpC,OAAO,YAAY,CAAC,CAAC,CAAC,0CAAG,QAAQ,CAAI,CAAC,CAAC,CAAC,IAAI,CAAA;AAC9C,CAAC,CAAA"}
@@ -0,0 +1,77 @@
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 { CheckboxField, CheckboxLabel, CloseButton, DraggableModal, ModalHeader, PrimaryButton, SecondaryButton, TextField, TextFieldLabel, } from '@manuscripts/style-guide';
13
+ import React from 'react';
14
+ import styled from 'styled-components';
15
+ import { SearchField } from './SearchField';
16
+ export const Advanced = ({ isOpen, handleClose, setNewSearchValue, value, movePrev, moveNext, replaceAll, replaceCurrent, setReplaceValue, total, current, caseSensitive, setCaseSensitive, ignoreDiacritics, setIgnoreDiacritics, onInputFocus, }) => (React.createElement(React.Fragment, null,
17
+ React.createElement(DraggableModal, { isOpen: isOpen, onRequestClose: () => handleClose() },
18
+ React.createElement(ModalHeader, null,
19
+ React.createElement(CloseButton, { onClick: () => handleClose(), "data-cy": "modal-close-button" })),
20
+ React.createElement(SearchForm, null,
21
+ React.createElement("h3", null, "Find and Replace"),
22
+ React.createElement(FieldGroup, null,
23
+ React.createElement(Label, null, "Find"),
24
+ React.createElement(SearchField, { value: value, onInputFocus: () => onInputFocus(), total: total, current: current, setNewSearchValue: setNewSearchValue })),
25
+ React.createElement(FieldGroup, null,
26
+ React.createElement(Label, null, "Replace With"),
27
+ React.createElement(TextField, { onChange: (e) => {
28
+ setReplaceValue(e.target.value);
29
+ }, autoComplete: "off", role: "searchbox", spellCheck: false, placeholder: 'Replace with', "aria-label": "Replace with", type: 'text' })),
30
+ React.createElement(OptionsGroup, null,
31
+ React.createElement(CheckBoxGroup, null,
32
+ React.createElement(CheckboxField, { id: "caseSensitive", checked: caseSensitive, onChange: (e) => setCaseSensitive(e.target.checked) }),
33
+ React.createElement(CheckBoxLabelSpaced, { htmlFor: "caseSensitive" }, "Match case")),
34
+ React.createElement(CheckBoxGroup, null,
35
+ React.createElement(CheckboxField, { id: "ignoreDiacritics", checked: ignoreDiacritics, onChange: (e) => setIgnoreDiacritics(e.target.checked) }),
36
+ React.createElement(CheckBoxLabelSpaced, { htmlFor: "ignoreDiacritics" }, "Ignore diacritics (e.g. \u00E4 = a, E = \u00C9, \u05D0\u05B7 = \u05D0)"))),
37
+ React.createElement(ButtonsSection, null,
38
+ React.createElement(SecondaryButton, { onClick: () => replaceCurrent() }, "Replace"),
39
+ React.createElement(SecondaryButton, { onClick: () => replaceAll() }, "Replace All"),
40
+ React.createElement(PrimaryButton, { onClick: () => movePrev() }, "Previous"),
41
+ React.createElement(PrimaryButton, { onClick: () => moveNext() }, "Next"))))));
42
+ const CheckBoxLabelSpaced = styled(CheckboxLabel) `
43
+ margin-left: 0.5rem;
44
+ `;
45
+ const CheckBoxGroup = styled.div `
46
+ margin: 0.5rem 0;
47
+ `;
48
+ const OptionsGroup = styled.div `
49
+ display: flex;
50
+ flex-flow: column;
51
+ max-width: 350px;
52
+ margin: 0.5rem 0 2.5rem auto;
53
+ `;
54
+ const FieldGroup = styled.div `
55
+ display: flex;
56
+ margin-bottom: 2rem;
57
+ align-items: center;
58
+ justify-content: space-between;
59
+ & > input {
60
+ max-width: 350px;
61
+ }
62
+ `;
63
+ const Label = styled(TextFieldLabel) `
64
+ text-transform: none;
65
+ `;
66
+ const ButtonsSection = styled.div `
67
+ display: flex;
68
+ justify-content: space-between;
69
+ button {
70
+ min-width: 100px;
71
+ }
72
+ `;
73
+ const SearchForm = styled.div `
74
+ min-width: 465px;
75
+ max-width: 100%;
76
+ `;
77
+ //# sourceMappingURL=AdvancedSearch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdvancedSearch.js","sourceRoot":"","sources":["../../../../src/components/SearchReplace/AdvancedSearch.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,aAAa,EACb,aAAa,EACb,WAAW,EACX,cAAc,EACd,WAAW,EACX,aAAa,EACb,eAAe,EACf,SAAS,EACT,cAAc,GACf,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,CAAC,MAAM,QAAQ,GAiBhB,CAAC,EACJ,MAAM,EACN,WAAW,EACX,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,cAAc,EACd,eAAe,EACf,KAAK,EACL,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,GACb,EAAE,EAAE,CAAC,CACJ;IACE,oBAAC,cAAc,IAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE;QACjE,oBAAC,WAAW;YACV,oBAAC,WAAW,IACV,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,aACpB,oBAAoB,GAC5B,CACU;QACd,oBAAC,UAAU;YACT,mDAAyB;YACzB,oBAAC,UAAU;gBACT,oBAAC,KAAK,eAAa;gBACnB,oBAAC,WAAW,IACV,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE,EAClC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,iBAAiB,EAAE,iBAAiB,GACpC,CACS;YACb,oBAAC,UAAU;gBACT,oBAAC,KAAK,uBAAqB;gBAC3B,oBAAC,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ED,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;;CAE/B,CAAA;AAED,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAK9B,CAAA;AAED,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;CAQ5B,CAAA;AAED,MAAM,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA;;CAEnC,CAAA;AAED,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;CAMhC,CAAA;AACD,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAG5B,CAAA"}
@@ -0,0 +1,50 @@
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 { TextField } from '@manuscripts/style-guide';
13
+ import React, { useEffect, useRef } from 'react';
14
+ import styled from 'styled-components';
15
+ export const SearchField = ({ setNewSearchValue, value, current, total, onInputFocus }) => {
16
+ const input = useRef(null);
17
+ useEffect(() => {
18
+ input.current?.focus();
19
+ }, []);
20
+ return (React.createElement(FieldWrapper, null,
21
+ React.createElement(TextField, { onChange: (e) => {
22
+ setNewSearchValue(e.target.value);
23
+ }, autoComplete: "off", role: "searchbox", value: value, spellCheck: false, placeholder: 'Find in document', "aria-label": "Find in document", onFocus: () => onInputFocus(), type: "text", ref: input }),
24
+ value && (React.createElement(Counter, null,
25
+ total === 0 ? 0 : Math.max(1, current + 1),
26
+ " of ",
27
+ total))));
28
+ };
29
+ const FieldWrapper = styled(TextField.withComponent('div')) `
30
+ position: relative;
31
+ display: flex;
32
+ padding: 0;
33
+ align-items: center;
34
+ max-width: 350px;
35
+ ${TextField} {
36
+ border: none;
37
+ }
38
+ &:focus-within {
39
+ border-color: ${(props) => props.theme.colors.border.field.hover};
40
+ background-color: ${(props) => props.theme.colors.background.fifth};
41
+ }
42
+ `;
43
+ const Counter = styled.div `
44
+ color: #ccc;
45
+ line-height: 1;
46
+ flex: 1 0 auto;
47
+ padding: 0 16px 0 8px;
48
+ pointer-events: none;
49
+ `;
50
+ //# sourceMappingURL=SearchField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchField.js","sourceRoot":"","sources":["../../../../src/components/SearchReplace/SearchField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,MAAM,CAAC,MAAM,WAAW,GAMnB,CAAC,EAAE,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE;IAClE,MAAM,KAAK,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAA;IAE5C,SAAS,CAAC,GAAG,EAAE;QACb,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,CAAA;IACxB,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,CACL,oBAAC,YAAY;QACX,oBAAC,SAAS,IACR,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;gBACd,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;YACnC,CAAC,EACD,YAAY,EAAC,KAAK,EAClB,IAAI,EAAC,WAAW,EAChB,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,KAAK,EACjB,WAAW,EAAE,kBAAkB,gBACpB,kBAAkB,EAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE,EAC7B,IAAI,EAAC,MAAM,EACX,GAAG,EAAE,KAAK,GACV;QACD,KAAK,IAAI,CACR,oBAAC,OAAO;YACL,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC;;YAAM,KAAK,CAC9C,CACX,CACY,CAChB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAA;;;;;;IAMvD,SAAS;;;;oBAIO,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK;wBAC5C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK;;CAErE,CAAA;AAED,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;CAMzB,CAAA"}
@@ -0,0 +1,155 @@
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 { getNewMatch, searchReplacePluginKey, } from '@manuscripts/body-editor';
13
+ import { ArrowUpIcon, CloseButton, DotsIcon, IconButton, } from '@manuscripts/style-guide';
14
+ import React, { useCallback, useEffect, useState } from 'react';
15
+ import styled, { keyframes } from 'styled-components';
16
+ import { useStore } from '../../store';
17
+ import { DelayUnmount } from '../DelayUnmount';
18
+ import { Advanced } from './AdvancedSearch';
19
+ import { SearchField } from './SearchField';
20
+ export const SearchReplace = () => {
21
+ const [editor] = useStore((state) => state.editor);
22
+ const [replacement, setReplacement] = useState('');
23
+ const setPluginState = useCallback(function (values) {
24
+ const view = editor?.view;
25
+ if (view) {
26
+ const tr = view.state.tr;
27
+ tr.setMeta(searchReplacePluginKey, values);
28
+ view.dispatch(tr);
29
+ }
30
+ }, [editor?.view]);
31
+ const [newSearchValue, setNewSearchValue] = useState('');
32
+ useEffect(() => {
33
+ const timeout = setTimeout(() => {
34
+ setPluginState({ value: newSearchValue });
35
+ }, 400);
36
+ return () => clearTimeout(timeout);
37
+ }, [newSearchValue, setPluginState]);
38
+ if (!editor) {
39
+ return null;
40
+ }
41
+ const pluginState = searchReplacePluginKey.getState(editor.state);
42
+ if (!pluginState) {
43
+ return null;
44
+ }
45
+ const advanced = pluginState?.activeAdvanced;
46
+ const isActive = pluginState ? pluginState.active : false;
47
+ const current = pluginState.currentMatch;
48
+ const matches = pluginState?.matches;
49
+ const selection = editor.state.selection;
50
+ const value = pluginState?.value || '';
51
+ const caseSensitive = pluginState?.caseSensitive || false;
52
+ const ignoreDiacritics = pluginState?.ignoreDiacritics || false;
53
+ function moveMatch(side) {
54
+ const newMatch = getNewMatch(side, current, selection, matches);
55
+ setPluginState({
56
+ currentMatch: newMatch,
57
+ highlightCurrent: true,
58
+ });
59
+ }
60
+ const setAdvanced = (val) => setPluginState({ activeAdvanced: val });
61
+ const deactivate = () => setPluginState({ active: false });
62
+ // replace only currently selected match
63
+ const replaceCurrent = () => {
64
+ const view = editor.view;
65
+ if (view) {
66
+ const tr = view.state.tr;
67
+ tr.replaceWith(matches[current].from, matches[current].to, view.state.schema.text(replacement));
68
+ view.dispatch(tr);
69
+ /*
70
+ since replacing current match of search will shorten the list by one, the next item will be located
71
+ at the same index as the current, however we still need to check if there is actually a next item (current + 1) which would guarantee
72
+ that 'current' will be valid once current 'current' is replaced and excluded from the matches list.
73
+ */
74
+ const newCurrent = matches.length <= 1 ? -1 : matches[current + 1] ? current : 0;
75
+ view.dispatch(view.state.tr.setMeta(searchReplacePluginKey, {
76
+ value,
77
+ currentMatch: newCurrent,
78
+ highlightCurrent: true,
79
+ }));
80
+ }
81
+ };
82
+ const replaceAll = () => {
83
+ const view = editor.view;
84
+ if (view) {
85
+ const tr = view.state.tr;
86
+ if (matches) {
87
+ matches.forEach(({ from, to }) => {
88
+ tr.replaceWith(tr.mapping.map(from), tr.mapping.map(to), view.state.schema.text(replacement));
89
+ });
90
+ }
91
+ tr.setMeta('massSearchReplace', true); // needed to make tc-plugin not to freak out about a large amount of steps
92
+ view.dispatch(tr);
93
+ view.dispatch(view.state.tr.setMeta(searchReplacePluginKey, { value }));
94
+ }
95
+ };
96
+ if (advanced) {
97
+ return (React.createElement(Advanced, { isOpen: advanced, setNewSearchValue: setNewSearchValue, value: newSearchValue, setIgnoreDiacritics: (val) => setPluginState({ ignoreDiacritics: val }), setCaseSensitive: (val) => setPluginState({ caseSensitive: val }), replaceAll: replaceAll, replaceCurrent: replaceCurrent, moveNext: () => moveMatch('right'), movePrev: () => moveMatch('left'), setReplaceValue: setReplacement, ignoreDiacritics: ignoreDiacritics, caseSensitive: caseSensitive, handleClose: () => {
98
+ setAdvanced(false);
99
+ deactivate();
100
+ }, current: current, total: matches.length, onInputFocus: () => {
101
+ setPluginState({
102
+ highlightCurrent: true,
103
+ });
104
+ } }));
105
+ }
106
+ return (React.createElement(React.Fragment, null,
107
+ React.createElement(DelayUnmount, { isVisible: isActive },
108
+ React.createElement(Search, { className: isActive ? 'active' : 'inactive' },
109
+ React.createElement(SearchField, { value: newSearchValue, current: current, onInputFocus: () => {
110
+ setPluginState({
111
+ highlightCurrent: true,
112
+ });
113
+ }, total: matches.length, setNewSearchValue: setNewSearchValue }),
114
+ React.createElement(IconButton, { onClick: () => setAdvanced(true) },
115
+ React.createElement(DotsIcon, null)),
116
+ React.createElement(CloseButton, { onClick: () => deactivate(), "data-cy": "modal-close-button" }),
117
+ React.createElement(IconButton, { onClick: () => moveMatch('left') },
118
+ React.createElement(ArrowUpIcon, null)),
119
+ React.createElement(IconButton, { onClick: () => moveMatch('right') },
120
+ React.createElement(ArrowDownIcon, null))))));
121
+ };
122
+ const ArrowDownIcon = styled(ArrowUpIcon) `
123
+ transform: scaleY(-1);
124
+ `;
125
+ const inAnimation = keyframes `
126
+ 0% {
127
+ top: 50%;
128
+ opacity: 0;
129
+ }
130
+ 100% {
131
+ top: 100%;
132
+ transform: scale(1);
133
+ }
134
+ }`;
135
+ const Search = styled.div `
136
+ display: flex;
137
+ padding: 0.5rem;
138
+ width: 440px;
139
+ position: absolute;
140
+ top: 50%;
141
+ right: 1rem;
142
+ background: #fff;
143
+ border: 1px solid #f2f2f2;
144
+ border-top: none;
145
+ transition: all 0.2s ease;
146
+ &.active {
147
+ animation: ${inAnimation} 0.2s ease-in-out;
148
+ top: 100%;
149
+ opacity: 1;
150
+ }
151
+ &.inactive {
152
+ opacity: 0;
153
+ }
154
+ `;
155
+ //# sourceMappingURL=SearchReplace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchReplace.js","sourceRoot":"","sources":["../../../../src/components/SearchReplace/SearchReplace.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,WAAW,EACX,sBAAsB,GAE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 * 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
+ export * from './SearchReplace';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/SearchReplace/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,cAAc,iBAAiB,CAAA"}
@@ -36,6 +36,7 @@ export const EditorContainerInner = styled.div `
36
36
  export const EditorHeader = styled.div `
37
37
  background: ${(props) => props.theme.colors.background.primary};
38
38
  z-index: 6;
39
+ position: relative;
39
40
  border-bottom: 1px solid #f2f2f2;
40
41
  `;
41
42
  export const EditorBody = styled.div `
@@ -1 +1 @@
1
- {"version":3,"file":"EditorContainer.js","sourceRoot":"","sources":["../../../../src/components/projects/EditorContainer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;UAO/B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;WACnC,CAAC,KAAK,EAAE,EAAE,CAAC,KA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nC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;gBAE/B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO;CAC/D,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;gBAO9B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO;;;CAG/D,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;gBACtB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO;;;;CAI/D,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAA;;;;aAIvB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;MAC3C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;eAC3B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc;uBAClC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM;;;CAGxD,CAAA"}
@@ -18,6 +18,7 @@ import styled from 'styled-components';
18
18
  import { useTrackingVisibility } from '../../hooks/use-tracking-visibility';
19
19
  import { useStore } from '../../store';
20
20
  import { Main } from '../Page';
21
+ import { SearchReplace } from '../SearchReplace';
21
22
  import UtilitiesEffects from '../UtilitiesEffects';
22
23
  import { EditorBody, EditorContainer, EditorContainerInner, EditorHeader, } from './EditorContainer';
23
24
  import EditorElement from './EditorElement';
@@ -59,7 +60,8 @@ const ManuscriptPageView = () => {
59
60
  !can.editWithoutTracking && (React.createElement(React.Fragment, null,
60
61
  React.createElement(Label, null, "Show tracked changes"),
61
62
  React.createElement(IconButton, { defaultColor: true, onClick: toggleTrackingVisibility }, trackingVisible ? React.createElement(SliderOnIcon, null) : React.createElement(SliderOffIcon, null))))),
62
- can.seeEditorToolbar && React.createElement(ManuscriptToolbar, null)),
63
+ can.seeEditorToolbar && React.createElement(ManuscriptToolbar, null),
64
+ React.createElement(SearchReplace, null)),
63
65
  React.createElement(EditorBody, { className: "editor-body" },
64
66
  React.createElement(TrackChangesStyles, null,
65
67
  React.createElement(EditorElement, null)))))),
@@ -1 +1 @@
1
- {"version":3,"file":"ManuscriptPageContainer.js","sourceRoot":"","sources":["../../../../src/components/projects/ManuscriptPageContainer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,4CAA4C,CAAA;AACnD,OAAO,oDAAoD,CAAA;AAC3D,OAAO,4CAA4C,CAAA;AAEnD,OAAO,EACL,oBAAoB,EACpB,UAAU,EACV,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,cAAc,GACf,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,gBAAgB,MAAM,qBAAqB,CAAA;AAClD,OAAO,EACL,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,YAAY,GACb,MAAM,mBAAmB,CAAA;AAC1B,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAC3C,OAAO,SAAS,MAAM,aAAa,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,iB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AI,CAAC,IAAI;MAChC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE;;CAE1C,CAAA;AAED,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAK7B,CAAA;AAED,eAAe,uBAAuB,CAAA"}
1
+ {"version":3,"file":"ManuscriptPageContainer.js","sourceRoot":"","sources":["../../../../src/components/projects/ManuscriptPageContainer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,4CAA4C,CAAA;AACnD,OAAO,oDAAoD,CAAA;AAC3D,OAAO,4CAA4C,CAAA;AAEnD,OAAO,EACL,oBAAoB,EACpB,UAAU,EACV,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,cAAc,GACf,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,gBAAgB,MAAM,qBAAqB,CAAA;AAClD,OAAO,EACL,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,YAAY,GACb,MAAM,mBAAmB,CAAA;AAC1B,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAC3C,OAAO,SAAS,MAAM,aAAa,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,iBAAiB,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEzD,MAAM,uBAAuB,GAAa,G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AW,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAK7B,CAAA;AAED,eAAe,uBAAuB,CAAA"}
@@ -97,7 +97,7 @@ export const ManuscriptToolbar = () => {
97
97
  }
98
98
  return item.isEnabled(state);
99
99
  };
100
- return (React.createElement(ToolbarContainer, { "data-cy": 'toolbar' },
100
+ return (React.createElement(ToolbarContainer, { "data-cy": "toolbar" },
101
101
  React.createElement(ToolbarGroup, null,
102
102
  React.createElement(TypeSelector, { state: state, dispatch: view.dispatch, view: view })),
103
103
  Object.entries(toolbar).map(([groupKey, group]) => (React.createElement(ToolbarGroup, { key: groupKey }, Object.entries(group)
@@ -1 +1 @@
1
- {"version":3,"file":"ManuscriptToolbar.js","sourceRoot":"","sources":["../../../../src/components/projects/ManuscriptToolbar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,OAAO,EAEP,YAAY,GACb,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAElE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGpC,CAAA;AAED,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;IACxC,IAAI,EAAE,QAAQ;CACf,CAAC,CAEA;sBACoB,CAAC,KAAK,EAAE,EAAE,CAC5B,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO;sBACnD,CAAC,KAAK,EAAE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EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,QAAQ,IACpC,IAAI,CAAC,KAAK,CACH,CACE,CACf,CACF,CACU,CAChB,CAAC,CACe,CACpB,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,17 @@
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 const DelayUnmount: React.FC<{
14
+ isVisible: boolean;
15
+ children: React.ReactNode;
16
+ delay?: number;
17
+ }>;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ export declare const Advanced: React.FC<{
3
+ isOpen: boolean;
4
+ handleClose: () => void;
5
+ setNewSearchValue: (val: string) => void;
6
+ value: string;
7
+ replaceAll: () => void;
8
+ replaceCurrent: () => void;
9
+ moveNext: () => void;
10
+ movePrev: () => void;
11
+ setReplaceValue: (value: string) => void;
12
+ current: number;
13
+ total: number;
14
+ caseSensitive: boolean;
15
+ ignoreDiacritics: boolean;
16
+ setCaseSensitive: (val: boolean) => void;
17
+ setIgnoreDiacritics: (val: boolean) => void;
18
+ onInputFocus: () => void;
19
+ }>;
@@ -0,0 +1,19 @@
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 const SearchField: React.FC<{
14
+ setNewSearchValue: (val: string) => void;
15
+ value: string;
16
+ current: number;
17
+ total: number;
18
+ onInputFocus: () => void;
19
+ }>;
@@ -0,0 +1,13 @@
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 const SearchReplace: React.FC;
@@ -0,0 +1,12 @@
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
+ export * from './SearchReplace';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manuscripts/article-editor",
3
- "version": "3.7.63-LEAN-4314.0",
3
+ "version": "3.8.1-LEAN-4314.0",
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",
@@ -35,11 +35,11 @@
35
35
  "@fontsource/lato": "^4.5.10",
36
36
  "@fontsource/pt-sans": "^4.5.11",
37
37
  "@fontsource/pt-serif": "^4.5.11",
38
- "@manuscripts/body-editor": "2.7.58-LEAN-4314.0",
38
+ "@manuscripts/body-editor": "2.8.1-LEAN-4314.0",
39
39
  "@manuscripts/json-schema": "2.2.11",
40
40
  "@manuscripts/library": "1.3.11",
41
- "@manuscripts/style-guide": "2.0.36-LEAN-4314.0",
42
- "@manuscripts/track-changes-plugin": "1.9.4",
41
+ "@manuscripts/style-guide": "2.1.1-LEAN-4314.0",
42
+ "@manuscripts/track-changes-plugin": "1.10.0",
43
43
  "@manuscripts/transform": "3.0.45",
44
44
  "@popperjs/core": "^2.11.8",
45
45
  "@types/use-sync-external-store": "^0.0.6",