@manuscripts/article-editor 1.9.4 → 1.9.5

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 (408) hide show
  1. package/dist/cjs/src/components/Sidebar/Sidebar.js +1 -2
  2. package/dist/cjs/src/components/Sidebar/Sidebar.js.map +1 -1
  3. package/dist/cjs/src/components/Support.js +129 -0
  4. package/dist/cjs/src/components/Support.js.map +1 -0
  5. package/dist/cjs/src/components/inspector/ElementStyleInspector.js +14 -0
  6. package/dist/cjs/src/components/inspector/ElementStyleInspector.js.map +1 -0
  7. package/dist/cjs/src/components/inspector/StatisticsInspector.js +39 -0
  8. package/dist/cjs/src/components/inspector/StatisticsInspector.js.map +1 -0
  9. package/dist/cjs/src/components/library/CitationModal.js +2 -2
  10. package/dist/cjs/src/components/library/CitationModal.js.map +1 -1
  11. package/dist/cjs/src/components/library/CitationModel.js +210 -0
  12. package/dist/cjs/src/components/library/CitationModel.js.map +1 -0
  13. package/dist/cjs/src/components/library/CitationProperties.js +67 -0
  14. package/dist/cjs/src/components/library/CitationProperties.js.map +1 -0
  15. package/dist/cjs/src/components/library/ExternalSearch.js +156 -0
  16. package/dist/cjs/src/components/library/ExternalSearch.js.map +1 -0
  17. package/dist/cjs/src/components/library/GlobalLibrary.js +133 -0
  18. package/dist/cjs/src/components/library/GlobalLibrary.js.map +1 -0
  19. package/dist/cjs/src/components/library/LibraryCollectionCategories.js +53 -0
  20. package/dist/cjs/src/components/library/LibraryCollectionCategories.js.map +1 -0
  21. package/dist/cjs/src/components/library/LibraryForm.js +437 -0
  22. package/dist/cjs/src/components/library/LibraryForm.js.map +1 -0
  23. package/dist/cjs/src/components/library/LibraryItems.js +116 -0
  24. package/dist/cjs/src/components/library/LibraryItems.js.map +1 -0
  25. package/dist/cjs/src/components/library/LibraryPageContainer.js +107 -0
  26. package/dist/cjs/src/components/library/LibraryPageContainer.js.map +1 -0
  27. package/dist/cjs/src/components/library/LibrarySidebar.js +172 -0
  28. package/dist/cjs/src/components/library/LibrarySidebar.js.map +1 -0
  29. package/dist/cjs/src/components/library/Messages.js +25 -0
  30. package/dist/cjs/src/components/library/Messages.js.map +1 -0
  31. package/dist/cjs/src/components/library/ProjectLibrary.js +96 -0
  32. package/dist/cjs/src/components/library/ProjectLibrary.js.map +1 -0
  33. package/dist/cjs/src/components/menu/ApplicationMenus.js +79 -0
  34. package/dist/cjs/src/components/menu/ApplicationMenus.js.map +1 -0
  35. package/dist/cjs/src/components/metadata/HeaderFigure.js +147 -0
  36. package/dist/cjs/src/components/metadata/HeaderFigure.js.map +1 -0
  37. package/dist/cjs/src/components/metadata/Metadata.js +103 -0
  38. package/dist/cjs/src/components/metadata/Metadata.js.map +1 -0
  39. package/dist/cjs/src/components/metadata/MetadataContainer.js +203 -0
  40. package/dist/cjs/src/components/metadata/MetadataContainer.js.map +1 -0
  41. package/dist/cjs/src/components/metadata/TitleFieldContainer.js +56 -0
  42. package/dist/cjs/src/components/metadata/TitleFieldContainer.js.map +1 -0
  43. package/dist/cjs/src/components/projects/ApplicationMenus.js +97 -0
  44. package/dist/cjs/src/components/projects/ApplicationMenus.js.map +1 -0
  45. package/dist/cjs/src/components/projects/CategorisedKeywordsInput.js +439 -0
  46. package/dist/cjs/src/components/projects/CategorisedKeywordsInput.js.map +1 -0
  47. package/dist/cjs/src/components/projects/KeywordsInput.js +80 -0
  48. package/dist/cjs/src/components/projects/KeywordsInput.js.map +1 -0
  49. package/dist/cjs/src/components/projects/SortableManuscript.js +102 -0
  50. package/dist/cjs/src/components/projects/SortableManuscript.js.map +1 -0
  51. package/dist/cjs/src/components/projects/lean-workflow/ApplicationMenusLW.js +102 -0
  52. package/dist/cjs/src/components/projects/lean-workflow/ApplicationMenusLW.js.map +1 -0
  53. package/dist/cjs/src/components/projects/lean-workflow/CommentList.js +289 -0
  54. package/dist/cjs/src/components/projects/lean-workflow/CommentList.js.map +1 -0
  55. package/dist/cjs/src/components/projects/lean-workflow/CommentsTab.js +41 -0
  56. package/dist/cjs/src/components/projects/lean-workflow/CommentsTab.js.map +1 -0
  57. package/dist/cjs/src/components/projects/lean-workflow/ContentTab.js +66 -0
  58. package/dist/cjs/src/components/projects/lean-workflow/ContentTab.js.map +1 -0
  59. package/dist/cjs/src/components/projects/lean-workflow/EditorElement.js +252 -0
  60. package/dist/cjs/src/components/projects/lean-workflow/EditorElement.js.map +1 -0
  61. package/dist/cjs/src/components/projects/lean-workflow/ExceptionDialog.js +150 -0
  62. package/dist/cjs/src/components/projects/lean-workflow/ExceptionDialog.js.map +1 -0
  63. package/dist/cjs/src/components/projects/lean-workflow/ManuscriptPageContainerLW.js +187 -0
  64. package/dist/cjs/src/components/projects/lean-workflow/ManuscriptPageContainerLW.js.map +1 -0
  65. package/dist/cjs/src/components/projects/lean-workflow/SaveStatusController.js +53 -0
  66. package/dist/cjs/src/components/projects/lean-workflow/SaveStatusController.js.map +1 -0
  67. package/dist/cjs/src/components/projects/lean-workflow/TrackChangesStyles.js +106 -0
  68. package/dist/cjs/src/components/projects/lean-workflow/TrackChangesStyles.js.map +1 -0
  69. package/dist/cjs/src/components/projects/lean-workflow/icons/DeleteIcon.js +27 -0
  70. package/dist/cjs/src/components/projects/lean-workflow/icons/DeleteIcon.js.map +1 -0
  71. package/dist/cjs/src/components/projects/lean-workflow/icons/GroupIcon.js +29 -0
  72. package/dist/cjs/src/components/projects/lean-workflow/icons/GroupIcon.js.map +1 -0
  73. package/dist/cjs/src/components/projects/lean-workflow/icons/LinkIcon.js +23 -0
  74. package/dist/cjs/src/components/projects/lean-workflow/icons/LinkIcon.js.map +1 -0
  75. package/dist/cjs/src/components/projects/lean-workflow/icons/TemplateIcon.js +23 -0
  76. package/dist/cjs/src/components/projects/lean-workflow/icons/TemplateIcon.js.map +1 -0
  77. package/dist/cjs/src/components/projects/lean-workflow/provider/UserProvider.js +38 -0
  78. package/dist/cjs/src/components/projects/lean-workflow/provider/UserProvider.js.map +1 -0
  79. package/dist/cjs/src/components/requirements/RequirementContainer.js +58 -0
  80. package/dist/cjs/src/components/requirements/RequirementContainer.js.map +1 -0
  81. package/dist/cjs/src/components/requirements/RequirementsData.js +129 -0
  82. package/dist/cjs/src/components/requirements/RequirementsData.js.map +1 -0
  83. package/dist/cjs/src/components/requirements/RequirementsIcons.js +34 -0
  84. package/dist/cjs/src/components/requirements/RequirementsIcons.js.map +1 -0
  85. package/dist/cjs/src/components/requirements/RequirementsInspector.js +150 -0
  86. package/dist/cjs/src/components/requirements/RequirementsInspector.js.map +1 -0
  87. package/dist/cjs/src/components/requirements/RequirementsList.js +84 -0
  88. package/dist/cjs/src/components/requirements/RequirementsList.js.map +1 -0
  89. package/dist/cjs/src/components/requirements/SectionValidations.js +47 -0
  90. package/dist/cjs/src/components/requirements/SectionValidations.js.map +1 -0
  91. package/dist/cjs/src/components/toolbar/ListToolbarItemStyles.js +85 -0
  92. package/dist/cjs/src/components/toolbar/ListToolbarItemStyles.js.map +1 -0
  93. package/dist/cjs/src/components/toolbar/ManuscriptToolbar.js +111 -0
  94. package/dist/cjs/src/components/toolbar/ManuscriptToolbar.js.map +1 -0
  95. package/dist/cjs/src/components/toolbar/OrderdListToolbarItem.js +190 -0
  96. package/dist/cjs/src/components/toolbar/OrderdListToolbarItem.js.map +1 -0
  97. package/dist/cjs/src/components/track-changes/useEditorStore.js +60 -0
  98. package/dist/cjs/src/components/track-changes/useEditorStore.js.map +1 -0
  99. package/dist/cjs/src/hooks/use-create-editor.js +0 -18
  100. package/dist/cjs/src/hooks/use-create-editor.js.map +1 -1
  101. package/dist/cjs/src/hooks/use-requirements-validation.js +87 -0
  102. package/dist/cjs/src/hooks/use-requirements-validation.js.map +1 -0
  103. package/dist/cjs/src/lib/apollo.js +41 -0
  104. package/dist/cjs/src/lib/apollo.js.map +1 -0
  105. package/dist/cjs/src/lib/lean-workflow-gql.js +40 -0
  106. package/dist/cjs/src/lib/lean-workflow-gql.js.map +1 -0
  107. package/dist/cjs/src/lib/replace-attachments-ids.js +49 -0
  108. package/dist/cjs/src/lib/replace-attachments-ids.js.map +1 -0
  109. package/dist/cjs/src/postgres-data/Bibilo.js +33 -0
  110. package/dist/cjs/src/postgres-data/Bibilo.js.map +1 -0
  111. package/dist/cjs/src/quarterback/api/auth.js +7 -0
  112. package/dist/cjs/src/quarterback/api/auth.js.map +1 -0
  113. package/dist/cjs/src/quarterback/api/comment.js +13 -0
  114. package/dist/cjs/src/quarterback/api/comment.js.map +1 -0
  115. package/dist/cjs/src/quarterback/api/methodsV2.js +124 -0
  116. package/dist/cjs/src/quarterback/api/methodsV2.js.map +1 -0
  117. package/dist/cjs/src/quarterback/api/snapshot.js +16 -0
  118. package/dist/cjs/src/quarterback/api/snapshot.js.map +1 -0
  119. package/dist/cjs/src/quarterback/useAuthStore.js +80 -0
  120. package/dist/cjs/src/quarterback/useAuthStore.js.map +1 -0
  121. package/dist/cjs/src/quarterback/useCommentStore.js +178 -0
  122. package/dist/cjs/src/quarterback/useCommentStore.js.map +1 -0
  123. package/dist/cjs/src/quarterback/useDocStore.js +121 -0
  124. package/dist/cjs/src/quarterback/useDocStore.js.map +1 -0
  125. package/dist/cjs/src/quarterback/usePouchStore.js +75 -0
  126. package/dist/cjs/src/quarterback/usePouchStore.js.map +1 -0
  127. package/dist/cjs/src/quarterback/useSnapshotStore.js +140 -0
  128. package/dist/cjs/src/quarterback/useSnapshotStore.js.map +1 -0
  129. package/dist/cjs/src/store/BiblioTools.js +3 -0
  130. package/dist/cjs/src/store/BiblioTools.js.map +1 -0
  131. package/dist/cjs/stories/Citation.stories.js +43 -0
  132. package/dist/cjs/stories/Citation.stories.js.map +1 -0
  133. package/dist/cjs/stories/LibrarySidebar.stories.js +188 -0
  134. package/dist/cjs/stories/LibrarySidebar.stories.js.map +1 -0
  135. package/dist/cjs/stories/Metadata.stories.js +53 -0
  136. package/dist/cjs/stories/Metadata.stories.js.map +1 -0
  137. package/dist/cjs/stories/Notification.stories.js +62 -0
  138. package/dist/cjs/stories/Notification.stories.js.map +1 -0
  139. package/dist/cjs/stories/Page.stories.js +50 -0
  140. package/dist/cjs/stories/Page.stories.js.map +1 -0
  141. package/dist/cjs/stories/Panel.stories.js +62 -0
  142. package/dist/cjs/stories/Panel.stories.js.map +1 -0
  143. package/dist/cjs/stories/Placeholders.stories.js +23 -0
  144. package/dist/cjs/stories/Placeholders.stories.js.map +1 -0
  145. package/dist/cjs/stories/PopperButtons.stories.js +27 -0
  146. package/dist/cjs/stories/PopperButtons.stories.js.map +1 -0
  147. package/dist/cjs/stories/Progress.stories.js +25 -0
  148. package/dist/cjs/stories/Progress.stories.js.map +1 -0
  149. package/dist/cjs/stories/ProgressIndicator.stories.js +33 -0
  150. package/dist/cjs/stories/ProgressIndicator.stories.js.map +1 -0
  151. package/dist/cjs/stories/ReloadDialog.stories.js +21 -0
  152. package/dist/cjs/stories/ReloadDialog.stories.js.map +1 -0
  153. package/dist/cjs/stories/RequirementsInspector.stories.js +159 -0
  154. package/dist/cjs/stories/RequirementsInspector.stories.js.map +1 -0
  155. package/dist/cjs/stories/RequirmentsList.stories.js +36 -0
  156. package/dist/cjs/stories/RequirmentsList.stories.js.map +1 -0
  157. package/dist/cjs/stories/SelectField.stories.js +34 -0
  158. package/dist/cjs/stories/SelectField.stories.js.map +1 -0
  159. package/dist/cjs/stories/Support.stories.js +32 -0
  160. package/dist/cjs/stories/Support.stories.js.map +1 -0
  161. package/dist/cjs/stories/data/doc.js +27 -0
  162. package/dist/cjs/stories/data/doc.js.map +1 -0
  163. package/dist/cjs/stories/data/validationData.js +44 -0
  164. package/dist/cjs/stories/data/validationData.js.map +1 -0
  165. package/dist/es/src/components/Sidebar/Sidebar.js +1 -2
  166. package/dist/es/src/components/Sidebar/Sidebar.js.map +1 -1
  167. package/dist/es/src/components/Support.js +100 -0
  168. package/dist/es/src/components/Support.js.map +1 -0
  169. package/dist/es/src/components/inspector/ElementStyleInspector.js +13 -0
  170. package/dist/es/src/components/inspector/ElementStyleInspector.js.map +1 -0
  171. package/dist/es/src/components/inspector/StatisticsInspector.js +32 -0
  172. package/dist/es/src/components/inspector/StatisticsInspector.js.map +1 -0
  173. package/dist/es/src/components/library/CitationModal.js +2 -2
  174. package/dist/es/src/components/library/CitationModal.js.map +1 -1
  175. package/dist/es/src/components/library/CitationModel.js +180 -0
  176. package/dist/es/src/components/library/CitationModel.js.map +1 -0
  177. package/dist/es/src/components/library/CitationProperties.js +60 -0
  178. package/dist/es/src/components/library/CitationProperties.js.map +1 -0
  179. package/dist/es/src/components/library/ExternalSearch.js +127 -0
  180. package/dist/es/src/components/library/ExternalSearch.js.map +1 -0
  181. package/dist/es/src/components/library/GlobalLibrary.js +104 -0
  182. package/dist/es/src/components/library/GlobalLibrary.js.map +1 -0
  183. package/dist/es/src/components/library/LibraryCollectionCategories.js +45 -0
  184. package/dist/es/src/components/library/LibraryCollectionCategories.js.map +1 -0
  185. package/dist/es/src/components/library/LibraryForm.js +409 -0
  186. package/dist/es/src/components/library/LibraryForm.js.map +1 -0
  187. package/dist/es/src/components/library/LibraryItems.js +86 -0
  188. package/dist/es/src/components/library/LibraryItems.js.map +1 -0
  189. package/dist/es/src/components/library/LibraryPageContainer.js +80 -0
  190. package/dist/es/src/components/library/LibraryPageContainer.js.map +1 -0
  191. package/dist/es/src/components/library/LibrarySidebar.js +165 -0
  192. package/dist/es/src/components/library/LibrarySidebar.js.map +1 -0
  193. package/dist/es/src/components/library/Messages.js +18 -0
  194. package/dist/es/src/components/library/Messages.js.map +1 -0
  195. package/dist/es/src/components/library/ProjectLibrary.js +67 -0
  196. package/dist/es/src/components/library/ProjectLibrary.js.map +1 -0
  197. package/dist/es/src/components/menu/ApplicationMenus.js +72 -0
  198. package/dist/es/src/components/menu/ApplicationMenus.js.map +1 -0
  199. package/dist/es/src/components/metadata/HeaderFigure.js +117 -0
  200. package/dist/es/src/components/metadata/HeaderFigure.js.map +1 -0
  201. package/dist/es/src/components/metadata/Metadata.js +73 -0
  202. package/dist/es/src/components/metadata/Metadata.js.map +1 -0
  203. package/dist/es/src/components/metadata/MetadataContainer.js +178 -0
  204. package/dist/es/src/components/metadata/MetadataContainer.js.map +1 -0
  205. package/dist/es/src/components/metadata/TitleFieldContainer.js +49 -0
  206. package/dist/es/src/components/metadata/TitleFieldContainer.js.map +1 -0
  207. package/dist/es/src/components/projects/ApplicationMenus.js +67 -0
  208. package/dist/es/src/components/projects/ApplicationMenus.js.map +1 -0
  209. package/dist/es/src/components/projects/CategorisedKeywordsInput.js +409 -0
  210. package/dist/es/src/components/projects/CategorisedKeywordsInput.js.map +1 -0
  211. package/dist/es/src/components/projects/KeywordsInput.js +73 -0
  212. package/dist/es/src/components/projects/KeywordsInput.js.map +1 -0
  213. package/dist/es/src/components/projects/SortableManuscript.js +72 -0
  214. package/dist/es/src/components/projects/SortableManuscript.js.map +1 -0
  215. package/dist/es/src/components/projects/lean-workflow/ApplicationMenusLW.js +72 -0
  216. package/dist/es/src/components/projects/lean-workflow/ApplicationMenusLW.js.map +1 -0
  217. package/dist/es/src/components/projects/lean-workflow/CommentList.js +259 -0
  218. package/dist/es/src/components/projects/lean-workflow/CommentList.js.map +1 -0
  219. package/dist/es/src/components/projects/lean-workflow/CommentsTab.js +34 -0
  220. package/dist/es/src/components/projects/lean-workflow/CommentsTab.js.map +1 -0
  221. package/dist/es/src/components/projects/lean-workflow/ContentTab.js +59 -0
  222. package/dist/es/src/components/projects/lean-workflow/ContentTab.js.map +1 -0
  223. package/dist/es/src/components/projects/lean-workflow/EditorElement.js +227 -0
  224. package/dist/es/src/components/projects/lean-workflow/EditorElement.js.map +1 -0
  225. package/dist/es/src/components/projects/lean-workflow/ExceptionDialog.js +120 -0
  226. package/dist/es/src/components/projects/lean-workflow/ExceptionDialog.js.map +1 -0
  227. package/dist/es/src/components/projects/lean-workflow/ManuscriptPageContainerLW.js +159 -0
  228. package/dist/es/src/components/projects/lean-workflow/ManuscriptPageContainerLW.js.map +1 -0
  229. package/dist/es/src/components/projects/lean-workflow/SaveStatusController.js +23 -0
  230. package/dist/es/src/components/projects/lean-workflow/SaveStatusController.js.map +1 -0
  231. package/dist/es/src/components/projects/lean-workflow/TrackChangesStyles.js +99 -0
  232. package/dist/es/src/components/projects/lean-workflow/TrackChangesStyles.js.map +1 -0
  233. package/dist/es/src/components/projects/lean-workflow/icons/DeleteIcon.js +20 -0
  234. package/dist/es/src/components/projects/lean-workflow/icons/DeleteIcon.js.map +1 -0
  235. package/dist/es/src/components/projects/lean-workflow/icons/GroupIcon.js +22 -0
  236. package/dist/es/src/components/projects/lean-workflow/icons/GroupIcon.js.map +1 -0
  237. package/dist/es/src/components/projects/lean-workflow/icons/LinkIcon.js +16 -0
  238. package/dist/es/src/components/projects/lean-workflow/icons/LinkIcon.js.map +1 -0
  239. package/dist/es/src/components/projects/lean-workflow/icons/TemplateIcon.js +16 -0
  240. package/dist/es/src/components/projects/lean-workflow/icons/TemplateIcon.js.map +1 -0
  241. package/dist/es/src/components/projects/lean-workflow/provider/UserProvider.js +11 -0
  242. package/dist/es/src/components/projects/lean-workflow/provider/UserProvider.js.map +1 -0
  243. package/dist/es/src/components/requirements/RequirementContainer.js +51 -0
  244. package/dist/es/src/components/requirements/RequirementContainer.js.map +1 -0
  245. package/dist/es/src/components/requirements/RequirementsData.js +99 -0
  246. package/dist/es/src/components/requirements/RequirementsData.js.map +1 -0
  247. package/dist/es/src/components/requirements/RequirementsIcons.js +24 -0
  248. package/dist/es/src/components/requirements/RequirementsIcons.js.map +1 -0
  249. package/dist/es/src/components/requirements/RequirementsInspector.js +118 -0
  250. package/dist/es/src/components/requirements/RequirementsInspector.js.map +1 -0
  251. package/dist/es/src/components/requirements/RequirementsList.js +54 -0
  252. package/dist/es/src/components/requirements/RequirementsList.js.map +1 -0
  253. package/dist/es/src/components/requirements/SectionValidations.js +40 -0
  254. package/dist/es/src/components/requirements/SectionValidations.js.map +1 -0
  255. package/dist/es/src/components/toolbar/ListToolbarItemStyles.js +59 -0
  256. package/dist/es/src/components/toolbar/ListToolbarItemStyles.js.map +1 -0
  257. package/dist/es/src/components/toolbar/ManuscriptToolbar.js +104 -0
  258. package/dist/es/src/components/toolbar/ManuscriptToolbar.js.map +1 -0
  259. package/dist/es/src/components/toolbar/OrderdListToolbarItem.js +158 -0
  260. package/dist/es/src/components/toolbar/OrderdListToolbarItem.js.map +1 -0
  261. package/dist/es/src/components/track-changes/useEditorStore.js +57 -0
  262. package/dist/es/src/components/track-changes/useEditorStore.js.map +1 -0
  263. package/dist/es/src/hooks/use-create-editor.js +0 -18
  264. package/dist/es/src/hooks/use-create-editor.js.map +1 -1
  265. package/dist/es/src/hooks/use-requirements-validation.js +83 -0
  266. package/dist/es/src/hooks/use-requirements-validation.js.map +1 -0
  267. package/dist/es/src/lib/apollo.js +35 -0
  268. package/dist/es/src/lib/apollo.js.map +1 -0
  269. package/dist/es/src/lib/lean-workflow-gql.js +33 -0
  270. package/dist/es/src/lib/lean-workflow-gql.js.map +1 -0
  271. package/dist/es/src/lib/replace-attachments-ids.js +44 -0
  272. package/dist/es/src/lib/replace-attachments-ids.js.map +1 -0
  273. package/dist/es/src/postgres-data/Bibilo.js +29 -0
  274. package/dist/es/src/postgres-data/Bibilo.js.map +1 -0
  275. package/dist/es/src/quarterback/api/auth.js +3 -0
  276. package/dist/es/src/quarterback/api/auth.js.map +1 -0
  277. package/dist/es/src/quarterback/api/comment.js +6 -0
  278. package/dist/es/src/quarterback/api/comment.js.map +1 -0
  279. package/dist/es/src/quarterback/api/methodsV2.js +111 -0
  280. package/dist/es/src/quarterback/api/methodsV2.js.map +1 -0
  281. package/dist/es/src/quarterback/api/snapshot.js +8 -0
  282. package/dist/es/src/quarterback/api/snapshot.js.map +1 -0
  283. package/dist/es/src/quarterback/useAuthStore.js +51 -0
  284. package/dist/es/src/quarterback/useAuthStore.js.map +1 -0
  285. package/dist/es/src/quarterback/useCommentStore.js +149 -0
  286. package/dist/es/src/quarterback/useCommentStore.js.map +1 -0
  287. package/dist/es/src/quarterback/useDocStore.js +92 -0
  288. package/dist/es/src/quarterback/useDocStore.js.map +1 -0
  289. package/dist/es/src/quarterback/usePouchStore.js +69 -0
  290. package/dist/es/src/quarterback/usePouchStore.js.map +1 -0
  291. package/dist/es/src/quarterback/useSnapshotStore.js +114 -0
  292. package/dist/es/src/quarterback/useSnapshotStore.js.map +1 -0
  293. package/dist/es/src/store/BiblioTools.js +2 -0
  294. package/dist/es/src/store/BiblioTools.js.map +1 -0
  295. package/dist/es/stories/Citation.stories.js +38 -0
  296. package/dist/es/stories/Citation.stories.js.map +1 -0
  297. package/dist/es/stories/LibrarySidebar.stories.js +183 -0
  298. package/dist/es/stories/LibrarySidebar.stories.js.map +1 -0
  299. package/dist/es/stories/Metadata.stories.js +48 -0
  300. package/dist/es/stories/Metadata.stories.js.map +1 -0
  301. package/dist/es/stories/Notification.stories.js +57 -0
  302. package/dist/es/stories/Notification.stories.js.map +1 -0
  303. package/dist/es/stories/Page.stories.js +45 -0
  304. package/dist/es/stories/Page.stories.js.map +1 -0
  305. package/dist/es/stories/Panel.stories.js +57 -0
  306. package/dist/es/stories/Panel.stories.js.map +1 -0
  307. package/dist/es/stories/Placeholders.stories.js +18 -0
  308. package/dist/es/stories/Placeholders.stories.js.map +1 -0
  309. package/dist/es/stories/PopperButtons.stories.js +22 -0
  310. package/dist/es/stories/PopperButtons.stories.js.map +1 -0
  311. package/dist/es/stories/Progress.stories.js +20 -0
  312. package/dist/es/stories/Progress.stories.js.map +1 -0
  313. package/dist/es/stories/ProgressIndicator.stories.js +28 -0
  314. package/dist/es/stories/ProgressIndicator.stories.js.map +1 -0
  315. package/dist/es/stories/ReloadDialog.stories.js +16 -0
  316. package/dist/es/stories/ReloadDialog.stories.js.map +1 -0
  317. package/dist/es/stories/RequirementsInspector.stories.js +154 -0
  318. package/dist/es/stories/RequirementsInspector.stories.js.map +1 -0
  319. package/dist/es/stories/RequirmentsList.stories.js +31 -0
  320. package/dist/es/stories/RequirmentsList.stories.js.map +1 -0
  321. package/dist/es/stories/SelectField.stories.js +29 -0
  322. package/dist/es/stories/SelectField.stories.js.map +1 -0
  323. package/dist/es/stories/Support.stories.js +27 -0
  324. package/dist/es/stories/Support.stories.js.map +1 -0
  325. package/dist/es/stories/data/doc.js +21 -0
  326. package/dist/es/stories/data/doc.js.map +1 -0
  327. package/dist/es/stories/data/validationData.js +41 -0
  328. package/dist/es/stories/data/validationData.js.map +1 -0
  329. package/dist/types/src/components/Support.d.ts +13 -0
  330. package/dist/types/src/components/inspector/ElementStyleInspector.d.ts +13 -0
  331. package/dist/types/src/components/inspector/StatisticsInspector.d.ts +17 -0
  332. package/dist/types/src/components/library/CitationModel.d.ts +18 -0
  333. package/dist/types/src/components/library/CitationProperties.d.ts +17 -0
  334. package/dist/types/src/components/library/ExternalSearch.d.ts +19 -0
  335. package/dist/types/src/components/library/GlobalLibrary.d.ts +20 -0
  336. package/dist/types/src/components/library/LibraryCollectionCategories.d.ts +15 -0
  337. package/dist/types/src/components/library/LibraryForm.d.ts +20 -0
  338. package/dist/types/src/components/library/LibraryItems.d.ts +12 -0
  339. package/dist/types/src/components/library/LibraryPageContainer.d.ts +14 -0
  340. package/dist/types/src/components/library/LibrarySidebar.d.ts +21 -0
  341. package/dist/types/src/components/library/Messages.d.ts +15 -0
  342. package/dist/types/src/components/library/ProjectLibrary.d.ts +23 -0
  343. package/dist/types/src/components/menu/ApplicationMenus.d.ts +19 -0
  344. package/dist/types/src/components/metadata/HeaderFigure.d.ts +13 -0
  345. package/dist/types/src/components/metadata/Metadata.d.ts +60 -0
  346. package/dist/types/src/components/metadata/MetadataContainer.d.ts +21 -0
  347. package/dist/types/src/components/metadata/TitleFieldContainer.d.ts +19 -0
  348. package/dist/types/src/components/projects/ApplicationMenus.d.ts +20 -0
  349. package/dist/types/src/components/projects/CategorisedKeywordsInput.d.ts +6 -0
  350. package/dist/types/src/components/projects/KeywordsInput.d.ts +17 -0
  351. package/dist/types/src/components/projects/SortableManuscript.d.ts +18 -0
  352. package/dist/types/src/components/projects/lean-workflow/ApplicationMenusLW.d.ts +20 -0
  353. package/dist/types/src/components/projects/lean-workflow/CommentList.d.ts +18 -0
  354. package/dist/types/src/components/projects/lean-workflow/CommentsTab.d.ts +7 -0
  355. package/dist/types/src/components/projects/lean-workflow/ContentTab.d.ts +6 -0
  356. package/dist/types/src/components/projects/lean-workflow/EditorElement.d.ts +18 -0
  357. package/dist/types/src/components/projects/lean-workflow/ExceptionDialog.d.ts +4 -0
  358. package/dist/types/src/components/projects/lean-workflow/ManuscriptPageContainerLW.d.ts +18 -0
  359. package/dist/types/src/components/projects/lean-workflow/SaveStatusController.d.ts +17 -0
  360. package/dist/types/src/components/projects/lean-workflow/TrackChangesStyles.d.ts +13 -0
  361. package/dist/types/src/components/projects/lean-workflow/icons/DeleteIcon.d.ts +13 -0
  362. package/dist/types/src/components/projects/lean-workflow/icons/GroupIcon.d.ts +15 -0
  363. package/dist/types/src/components/projects/lean-workflow/icons/LinkIcon.d.ts +13 -0
  364. package/dist/types/src/components/projects/lean-workflow/icons/TemplateIcon.d.ts +13 -0
  365. package/dist/types/src/components/projects/lean-workflow/provider/UserProvider.d.ts +22 -0
  366. package/dist/types/src/components/requirements/RequirementContainer.d.ts +19 -0
  367. package/dist/types/src/components/requirements/RequirementsData.d.ts +21 -0
  368. package/dist/types/src/components/requirements/RequirementsIcons.d.ts +16 -0
  369. package/dist/types/src/components/requirements/RequirementsInspector.d.ts +23 -0
  370. package/dist/types/src/components/requirements/RequirementsList.d.ts +16 -0
  371. package/dist/types/src/components/requirements/SectionValidations.d.ts +21 -0
  372. package/dist/types/src/components/toolbar/ListToolbarItemStyles.d.ts +25 -0
  373. package/dist/types/src/components/toolbar/ManuscriptToolbar.d.ts +22 -0
  374. package/dist/types/src/components/toolbar/OrderdListToolbarItem.d.ts +24 -0
  375. package/dist/types/src/components/track-changes/useEditorStore.d.ts +36 -0
  376. package/dist/types/src/hooks/use-requirements-validation.d.ts +22 -0
  377. package/dist/types/src/lib/apollo.d.ts +13 -0
  378. package/dist/types/src/lib/lean-workflow-gql.d.ts +66 -0
  379. package/dist/types/src/lib/replace-attachments-ids.d.ts +15 -0
  380. package/dist/types/src/postgres-data/Bibilo.d.ts +33 -0
  381. package/dist/types/src/quarterback/api/auth.d.ts +13 -0
  382. package/dist/types/src/quarterback/api/comment.d.ts +16 -0
  383. package/dist/types/src/quarterback/api/methodsV2.d.ts +32 -0
  384. package/dist/types/src/quarterback/api/snapshot.d.ts +17 -0
  385. package/dist/types/src/quarterback/useAuthStore.d.ts +61 -0
  386. package/dist/types/src/quarterback/useCommentStore.d.ts +30 -0
  387. package/dist/types/src/quarterback/useDocStore.d.ts +19 -0
  388. package/dist/types/src/quarterback/usePouchStore.d.ts +30 -0
  389. package/dist/types/src/quarterback/useSnapshotStore.d.ts +29 -0
  390. package/dist/types/src/store/BiblioTools.d.ts +21 -0
  391. package/dist/types/stories/Citation.stories.d.ts +12 -0
  392. package/dist/types/stories/LibrarySidebar.stories.d.ts +12 -0
  393. package/dist/types/stories/Metadata.stories.d.ts +12 -0
  394. package/dist/types/stories/Notification.stories.d.ts +12 -0
  395. package/dist/types/stories/Page.stories.d.ts +12 -0
  396. package/dist/types/stories/Panel.stories.d.ts +12 -0
  397. package/dist/types/stories/Placeholders.stories.d.ts +12 -0
  398. package/dist/types/stories/PopperButtons.stories.d.ts +12 -0
  399. package/dist/types/stories/Progress.stories.d.ts +12 -0
  400. package/dist/types/stories/ProgressIndicator.stories.d.ts +12 -0
  401. package/dist/types/stories/ReloadDialog.stories.d.ts +12 -0
  402. package/dist/types/stories/RequirementsInspector.stories.d.ts +12 -0
  403. package/dist/types/stories/RequirmentsList.stories.d.ts +12 -0
  404. package/dist/types/stories/SelectField.stories.d.ts +12 -0
  405. package/dist/types/stories/Support.stories.d.ts +12 -0
  406. package/dist/types/stories/data/doc.d.ts +14 -0
  407. package/dist/types/stories/data/validationData.d.ts +13 -0
  408. package/package.json +4 -5
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.js","sourceRoot":"","sources":["../../../../../src/components/Sidebar/Sideb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AG,CAAA;;;;CAIxC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;CAMlC,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;eAEzB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;;;CAIlD,CAAA"}
@@ -0,0 +1,100 @@
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 DocumentationIcon from '@manuscripts/assets/react/Documentation';
13
+ import SupportIcon from '@manuscripts/assets/react/Support';
14
+ import { IconButton } from '@manuscripts/style-guide';
15
+ import React from 'react';
16
+ import { Manager, Popper, Reference } from 'react-popper';
17
+ import styled, { css } from 'styled-components';
18
+ import { useDropdown } from '../hooks/use-dropdown';
19
+ import { Popup } from './nav/Updates';
20
+ const Button = styled(IconButton).attrs(() => ({
21
+ size: 56,
22
+ })) `
23
+ color: ${(props) => props.theme.colors.text.secondary};
24
+ padding: ${(props) => props.theme.grid.unit * 2}px;
25
+ `;
26
+ const StyledSupportIcon = styled(SupportIcon) `
27
+ g {
28
+ stroke: currentColor;
29
+ }
30
+
31
+ &:hover {
32
+ g {
33
+ stroke: #7fb5d5;
34
+ }
35
+ }
36
+ `;
37
+ const linkStyle = css `
38
+ display: flex;
39
+ padding: ${(props) => props.theme.grid.unit * 2}px
40
+ ${(props) => props.theme.grid.unit * 4}px;
41
+ align-items: center;
42
+ font-size: ${(props) => props.theme.font.size.normal};
43
+ color: ${(props) => props.theme.colors.text.primary};
44
+ text-decoration: none;
45
+
46
+ &:hover {
47
+ background: ${(props) => props.theme.colors.background.fifth};
48
+ }
49
+ `;
50
+ const ExternalMenuLink = styled.a.attrs({
51
+ target: '_blank',
52
+ rel: 'noopener noreferer',
53
+ }) `
54
+ ${linkStyle}
55
+ `;
56
+ const MenuText = styled.div `
57
+ margin-left: ${(props) => props.theme.grid.unit * 2}px;
58
+ `;
59
+ const Menu = styled.div `
60
+ padding: ${(props) => props.theme.grid.unit * 2}px 0;
61
+ `;
62
+ const arrowTopBorderStyle = css `
63
+ bottom: -${(props) => props.theme.grid.unit * 2}px;
64
+ border-top: ${(props) => props.theme.grid.unit * 2}px solid
65
+ ${(props) => props.theme.colors.border.secondary};
66
+ `;
67
+ const arrowBottomBorderStyle = css `
68
+ top: -${(props) => props.theme.grid.unit * 2}px;
69
+ border-bottom: ${(props) => props.theme.grid.unit * 2}px solid
70
+ ${(props) => props.theme.colors.border.secondary};
71
+ `;
72
+ const Arrow = styled.div `
73
+ width: 0;
74
+ height: 0;
75
+ border-left: ${(props) => props.theme.grid.unit * 2}px solid transparent;
76
+ border-right: ${(props) => props.theme.grid.unit * 2}px solid transparent;
77
+ ${(props) => props['data-placement'] === 'top'
78
+ ? arrowTopBorderStyle
79
+ : arrowBottomBorderStyle};
80
+ position: absolute;
81
+ `;
82
+ const Container = styled.div `
83
+ position: relative;
84
+ `;
85
+ export const Support = React.memo(() => {
86
+ const { wrapperRef, toggleOpen, isOpen } = useDropdown();
87
+ return (React.createElement(Manager, null,
88
+ React.createElement("div", { ref: wrapperRef },
89
+ React.createElement(Reference, null, ({ ref }) => (React.createElement(Button, { ref: ref, onClick: toggleOpen },
90
+ React.createElement(StyledSupportIcon, { width: 32, height: 32 })))),
91
+ isOpen && (React.createElement(Popper, { placement: 'top' }, ({ ref, style, placement, arrowProps }) => (React.createElement("div", { ref: ref, style: { ...style, zIndex: 3 }, "data-placement": placement },
92
+ React.createElement(Container, null,
93
+ React.createElement(Popup, null,
94
+ React.createElement(Menu, null,
95
+ React.createElement(ExternalMenuLink, { href: 'https://support.manuscripts.io/' },
96
+ React.createElement(DocumentationIcon, null),
97
+ React.createElement(MenuText, null, "Documentation")))),
98
+ React.createElement(Arrow, { ...arrowProps, "data-placement": placement })))))))));
99
+ });
100
+ //# sourceMappingURL=Support.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Support.js","sourceRoot":"","sources":["../../../../src/components/Support.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,iBAAiB,MAAM,yCAAyC,CAAA;AACvE,OAAO,WAAW,MAAM,mCAAmC,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAErC,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7C,IAAI,EAAE,EAAE;CACT,CAAC,CAAC,CAAA;WACQ,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS;aAC1C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KA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C,MAAM,IAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU;gBACnC,oBAAC,iBAAiB,IAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,GAAI,CACrC,CACV,CACS;YAEX,MAAM,IAAI,CACT,oBAAC,MAAM,IAAC,SAAS,EAAE,KAAK,IACrB,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAC1C,6BACE,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,oBACd,SAAS;gBAEzB,oBAAC,SAAS;oBACR,oBAAC,KAAK;wBACJ,oBAAC,IAAI;4BACH,oBAAC,gBAAgB,IACf,IAAI,EAAE,iCAAiC;gCAEvC,oBAAC,iBAAiB,OAAG;gCACrB,oBAAC,QAAQ,wBAAyB,CACjB,CACd,CACD;oBAER,oBAAC,KAAK,OAAK,UAAU,oBAAkB,SAAS,GAAI,CAC1C,CACR,CACP,CACM,CACV,CACG,CACE,CACX,CAAA;AACH,CAAC,CAAC,CAAA"}
@@ -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
+ export {};
13
+ //# sourceMappingURL=ElementStyleInspector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElementStyleInspector.js","sourceRoot":"","sources":["../../../../../src/components/inspector/ElementStyleInspector.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
@@ -0,0 +1,32 @@
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 { Statistics } from '@manuscripts/body-editor';
13
+ import React from 'react';
14
+ import styled from 'styled-components';
15
+ import { InspectorSection, Subheading } from '../InspectorSection';
16
+ const InspectorSubsection = styled.div `
17
+ margin-left: ${(props) => props.theme.grid.unit * 2}px;
18
+
19
+ :not(:first-child) {
20
+ margin-top: ${(props) => props.theme.grid.unit * 4}px;
21
+ }
22
+ `;
23
+ export const StatisticsInspector = ({ manuscript, section }) => {
24
+ return (React.createElement(InspectorSection, { title: 'Statistics' },
25
+ React.createElement(InspectorSubsection, null,
26
+ React.createElement(Subheading, null, "Manuscript"),
27
+ React.createElement(Statistics, { node: manuscript })),
28
+ section && (React.createElement(InspectorSubsection, null,
29
+ React.createElement(Subheading, null, "Section"),
30
+ React.createElement(Statistics, { node: section })))));
31
+ };
32
+ //# sourceMappingURL=StatisticsInspector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatisticsInspector.js","sourceRoot":"","sources":["../../../../../src/components/inspector/StatisticsInspector.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAElE,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;iBACrB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;;kBAGnC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;CAErD,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAG3B,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE;IAC/B,OAAO,CACL,oBAAC,gBAAgB,IAAC,KAAK,EAAE,YAAY;QACnC,oBAAC,mBAAmB;YAClB,oBAAC,UAAU,qBAAwB;YAEnC,oBAAC,UAAU,IAAC,IAAI,EAAE,UAAU,GAAI,CACZ;QAErB,OAAO,IAAI,CACV,oBAAC,mBAAmB;YAClB,oBAAC,UAAU,kBAAqB;YAEhC,oBAAC,UAAU,IAAC,IAAI,EAAE,OAAO,GAAI,CACT,CACvB,CACgB,CACpB,CAAA;AACH,CAAC,CAAA"}
@@ -123,7 +123,7 @@ export const CitationModal = ({ editCitation, modelMap, saveCallback, selectedIt
123
123
  if (references.length <= 0) {
124
124
  return React.createElement(React.Fragment, null);
125
125
  }
126
- return (React.createElement(StyledModal, { "data-cy": "citations-modal", isOpen: editCitation, onRequestClose: stopEditing, shouldCloseOnOverlayClick: true },
126
+ return (React.createElement(StyledModal, { isOpen: editCitation, onRequestClose: stopEditing, shouldCloseOnOverlayClick: true },
127
127
  React.createElement(Dialog, { isOpen: showPendingChangeDialog, category: Category.confirmation, header: "You've made changes to this option", message: "Would you like to save or discard your changes?", actions: {
128
128
  secondary: {
129
129
  action: () => {
@@ -147,7 +147,7 @@ export const CitationModal = ({ editCitation, modelMap, saveCallback, selectedIt
147
147
  React.createElement(ReferencesSidebar, null,
148
148
  React.createElement(SidebarHeader, { title: 'References' }),
149
149
  React.createElement(ReferencesSidebarContent, { ref: ref },
150
- React.createElement(ReferencesInnerWrapper, { "data-cy": "references-list", style: { paddingTop: '0px' } }, [...displayableRefs.entries()].map(([index, item]) => (React.createElement(ReferenceButton, { key: index, id: item._id, onClick: onSelectReference, selected: selectedItem?._id === item._id, ref: selectedItem?._id === item._id
150
+ React.createElement(ReferencesInnerWrapper, { style: { paddingTop: '0px' } }, [...displayableRefs.entries()].map(([index, item]) => (React.createElement(ReferenceButton, { key: index, id: item._id, onClick: onSelectReference, selected: selectedItem?._id === item._id, ref: selectedItem?._id === item._id
151
151
  ? selectedReferenceNode
152
152
  : null },
153
153
  React.createElement(IconContainer, { "data-tip": true, "data-for": 'group-icon' },
@@ -1 +1 @@
1
- {"version":3,"file":"CitationModal.js","sourceRoot":"","sources":["../../../../../src/components/library/CitationModal.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,oBAAoB,MAAM,gDAAgD,CAAA;AACjF,OAAO,EAIL,WAAW,GACZ,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAW,EACX,WAAW,GACZ,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,WAAW,E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GtC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE;eACvC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;;CAGlD,CAAA;AAED,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;mBACb,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;CAEtD,CAAA"}
1
+ {"version":3,"file":"CitationModal.js","sourceRoot":"","sources":["../../../../../src/components/library/CitationModal.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,oBAAoB,MAAM,gDAAgD,CAAA;AACjF,OAAO,EAIL,WAAW,GACZ,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAW,EACX,WAAW,GACZ,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChF,OAAO,YAAY,MAAM,eAAe,CAAA;AACxC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AACvD,OAAO,EACL,SAAS,EACT,YAAY,EACZ,cAAc,EACd,aAAa,GACd,MA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); 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) 2022 Atypon Systems LLC. All Rights Reserved.
11
+ */
12
+ import ReferenceLibraryIcon from '@manuscripts/assets/react/ReferenceLibraryIcon';
13
+ import { ObjectTypes, } from '@manuscripts/json-schema';
14
+ import { shortLibraryItemMetadata } from '@manuscripts/library';
15
+ import { Category, CloseButton, Dialog, ModalContainer, ModalHeader, StyledModal, } from '@manuscripts/style-guide';
16
+ import { getModelsByType } from '@manuscripts/transform';
17
+ import { isEqual } from 'lodash-es';
18
+ import React, { useCallback, useEffect, useRef, useState } from 'react';
19
+ import ReactTooltip from 'react-tooltip';
20
+ import styled, { css } from 'styled-components';
21
+ import { ScrollableModalMain } from '../metadata/AuthorsModals';
22
+ import { GroupIcon } from '../projects/icons/GroupIcon';
23
+ import { ModalBody, ModalSidebar, SidebarContent, SidebarHeader, } from '../Sidebar';
24
+ import { CitedItemMetadata, CitedItemTitle } from './CitationEditor';
25
+ import ReferenceForm, { buildInitialValues, } from './ReferenceForm';
26
+ export const CitationModel = ({ editCitation, modelMap, saveCallback, selectedItem, setSelectedItem, setShowEditModel, deleteCallback, getReferences, }) => {
27
+ const stopEditing = useCallback(() => setShowEditModel(false), [setShowEditModel]);
28
+ const formMikRef = useRef(null);
29
+ const [{ referenceCount, references }, setReferences] = useState({
30
+ referenceCount: new Map(),
31
+ references: [],
32
+ });
33
+ const [showPendingChangeDialog, setShowPendingChangeDialog] = useState(false);
34
+ const onSelectReference = useCallback((e) => {
35
+ const other = formMikRef.current?.values;
36
+ if (!selectedItem || isEqual(buildInitialValues(selectedItem), other)) {
37
+ setSelectedItem(references.find(({ _id }) => _id === e.currentTarget.id));
38
+ }
39
+ else {
40
+ setShowPendingChangeDialog(true);
41
+ }
42
+ }, [references, selectedItem, setSelectedItem]);
43
+ useEffect(() => {
44
+ if (editCitation) {
45
+ getReferences(undefined)
46
+ .then((references) => {
47
+ const referenceCount = new Map();
48
+ getModelsByType(modelMap, ObjectTypes.Citation).map(({ embeddedCitationItems }) => embeddedCitationItems.map(({ bibliographyItem }) => {
49
+ let value = referenceCount.get(bibliographyItem);
50
+ referenceCount.set(bibliographyItem, (value && ++value) || 1);
51
+ }));
52
+ setReferences({ references, referenceCount });
53
+ })
54
+ .catch((e) => console.error(e));
55
+ }
56
+ }, [editCitation, getReferences, modelMap]);
57
+ const modelDeleteCallback = useCallback(() => {
58
+ deleteCallback();
59
+ setReferences({
60
+ referenceCount,
61
+ references: [
62
+ ...references.filter(({ _id }) => _id !== selectedItem?._id),
63
+ ],
64
+ });
65
+ }, [deleteCallback, referenceCount, references, selectedItem?._id]);
66
+ const modelSaveCallback = useCallback((item) => {
67
+ saveCallback(item);
68
+ setSelectedItem(item);
69
+ setReferences({
70
+ referenceCount,
71
+ references: [
72
+ ...references.map((ref) => (ref._id === item?._id ? item : ref)),
73
+ ],
74
+ });
75
+ }, [referenceCount, references, saveCallback, setSelectedItem]);
76
+ const disableDelete = ((selectedItem?._id && referenceCount.get(selectedItem._id)) || 0) > 0;
77
+ if (references.length < 1) {
78
+ return React.createElement(React.Fragment, null);
79
+ }
80
+ return (React.createElement(StyledModal, { isOpen: editCitation, onRequestClose: stopEditing, shouldCloseOnOverlayClick: true },
81
+ React.createElement(Dialog, { isOpen: showPendingChangeDialog, category: Category.confirmation, header: "You've made changes to this option", message: "Would you like to save or discard your changes?", actions: {
82
+ secondary: {
83
+ action: () => {
84
+ formMikRef.current?.resetForm();
85
+ setShowPendingChangeDialog(false);
86
+ },
87
+ title: 'Discard',
88
+ },
89
+ primary: {
90
+ action: () => {
91
+ modelSaveCallback(formMikRef.current?.values);
92
+ setShowPendingChangeDialog(false);
93
+ },
94
+ title: 'Save',
95
+ },
96
+ } }),
97
+ React.createElement(ModalContainer, null,
98
+ React.createElement(ModalHeader, null,
99
+ React.createElement(CloseButton, { onClick: stopEditing })),
100
+ React.createElement(ModalBody, null,
101
+ React.createElement(ReferencesSidebar, null,
102
+ React.createElement(SidebarHeader, { title: 'References' }),
103
+ React.createElement(ReferencesSidebarContent, null, references.map((item, index) => (React.createElement(ReferenceButton, { key: index, id: item._id, onClick: onSelectReference, selected: selectedItem?._id === item._id },
104
+ React.createElement(IconContainer, { "data-tip": true, "data-for": 'group-icon' },
105
+ React.createElement(ReferenceLibraryIcon, null),
106
+ React.createElement(GroupIcon, { numberOfCitations: referenceCount.get(item._id) || 0 }),
107
+ React.createElement(ReactTooltip, { disable: (referenceCount.get(item._id) || 0) < 1, id: 'group-icon', place: "bottom", effect: "solid", offset: { top: 40 }, className: "tooltip" }, "Number of times used in the document")),
108
+ React.createElement(Grid, null,
109
+ React.createElement(CitedItemTitle, { value: item.title || 'Untitled', withOverflow: true }),
110
+ React.createElement(CitedItemMetadata, null, shortLibraryItemMetadata(item)))))))),
111
+ React.createElement(ScrollableModalMain, null, selectedItem && (React.createElement(ReferenceForm, { item: selectedItem, formMikRef: formMikRef, disableDelete: disableDelete, deleteCallback: modelDeleteCallback, handleCancel: stopEditing, saveCallback: modelSaveCallback })))))));
112
+ };
113
+ const ReferencesSidebar = styled(ModalSidebar) `
114
+ width: 70%;
115
+ `;
116
+ const ReferencesSidebarContent = styled(SidebarContent) `
117
+ overflow-y: auto;
118
+ `;
119
+ const Grid = styled.div `
120
+ display: grid;
121
+ `;
122
+ export const Legend = styled.legend `
123
+ font: ${(props) => props.theme.font.weight.normal}
124
+ ${(props) => props.theme.font.size.xlarge} /
125
+ ${(props) => props.theme.font.lineHeight.large}
126
+ ${(props) => props.theme.font.family.sans};
127
+ letter-spacing: -0.4px;
128
+ color: ${(props) => props.theme.colors.text.secondary};
129
+ `;
130
+ export const Fields = styled.div `
131
+ padding: 16px;
132
+ `;
133
+ export const Label = styled.label `
134
+ display: flex;
135
+ flex-direction: column;
136
+ margin-bottom: 10px;
137
+ `;
138
+ export const Container = styled.div `
139
+ display: flex;
140
+ justify-content: space-between;
141
+ `;
142
+ export const Fieldset = styled.fieldset `
143
+ border: none;
144
+
145
+ &:not(:last-child) {
146
+ margin-bottom: 16px;
147
+ }
148
+ `;
149
+ const selectedReferenceStyle = css `
150
+ background: ${(props) => props.theme.colors.background.info};
151
+ border-top: 1px solid #bce7f6;
152
+ border-bottom: 1px solid #bce7f6;
153
+ `;
154
+ const ReferenceButton = styled.div `
155
+ cursor: pointer;
156
+ display: flex;
157
+ justify-content: flex-start;
158
+ padding: ${(props) => props.theme.grid.unit * 4}px 0;
159
+
160
+ path {
161
+ fill: #c9c9c9;
162
+ }
163
+
164
+ :hover {
165
+ background: ${(props) => props.theme.colors.background.info};
166
+ }
167
+
168
+ ${(props) => props.selected && selectedReferenceStyle}
169
+
170
+ .tooltip {
171
+ max-width: ${(props) => props.theme.grid.unit * 25}px;
172
+ padding: ${(props) => props.theme.grid.unit * 2}px;
173
+ border-radius: 6px;
174
+ }
175
+ `;
176
+ const IconContainer = styled.div `
177
+ padding-right: ${(props) => props.theme.grid.unit * 5}px;
178
+ position: relative;
179
+ `;
180
+ //# sourceMappingURL=CitationModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CitationModel.js","sourceRoot":"","sources":["../../../../../src/components/library/CitationModel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,oBAAoB,MAAM,gDAAgD,CAAA;AACjF,OAAO,EAIL,WAAW,GACZ,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,wBAAwB,EAAE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aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;mBACb,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;CAEtD,CAAA"}
@@ -0,0 +1,60 @@
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 from 'react';
14
+ import styled from 'styled-components';
15
+ export const CitationProperties = ({ properties, setProperties }) => {
16
+ return (React.createElement(React.Fragment, null,
17
+ React.createElement(FormGroup, null,
18
+ React.createElement(FormLabel, null, "Show"),
19
+ React.createElement("select", { value: properties.displayScheme || 'show-all', onChange: (event) => setProperties({
20
+ ...properties,
21
+ displayScheme: event.target.value,
22
+ }) },
23
+ React.createElement("option", { value: 'show-all' }, "Authors and year"),
24
+ React.createElement("option", { value: 'author-only' }, "Authors only"),
25
+ React.createElement("option", { value: 'suppress-author' }, "No authors"),
26
+ React.createElement("option", { value: 'composite' }, "Composite"))),
27
+ React.createElement(FormGroup, null,
28
+ React.createElement(FormLabel, null, "Prefix"),
29
+ React.createElement(TextField, { type: 'text', value: properties.prefix, onChange: (event) => setProperties({
30
+ ...properties,
31
+ prefix: event.target.value,
32
+ }) })),
33
+ React.createElement(FormGroup, null,
34
+ React.createElement(FormLabel, null, "Suffix"),
35
+ React.createElement(TextField, { type: 'text', value: properties.suffix, onChange: (event) => setProperties({
36
+ ...properties,
37
+ suffix: event.target.value,
38
+ }) })),
39
+ properties.displayScheme === 'composite' && (React.createElement(FormGroup, null,
40
+ React.createElement(FormLabel, null, "Infix"),
41
+ React.createElement(TextField, { type: 'text', value: properties.infix, onChange: (event) => setProperties({
42
+ ...properties,
43
+ infix: event.target.value,
44
+ }) })))));
45
+ };
46
+ const FormGroup = styled.div `
47
+ margin: ${(props) => props.theme.grid.unit * 4}px 0;
48
+ display: flex;
49
+ align-items: center;
50
+
51
+ ${TextField} {
52
+ padding: 2px;
53
+ flex: 1;
54
+ }
55
+ `;
56
+ const FormLabel = styled.label `
57
+ flex-shrink: 0;
58
+ width: 50px;
59
+ `;
60
+ //# sourceMappingURL=CitationProperties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CitationProperties.js","sourceRoot":"","sources":["../../../../../src/components/library/CitationProperties.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAItC,MAAM,CAAC,MAAM,kBAAkB,GAG1B,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,EAAE,EAAE;IACrC,OAAO,CACL;QACE,oBAAC,SAAS;YACR,oBAAC,SAAS,eAAiB;YAC3B,gCACE,KAAK,EAAE,UAAU,CAAC,aAAa,IAAI,UAAU,EAC7C,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAClB,aAAa,CAAC;oBACZ,GAAG,UAAU;oBACb,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,KAAsB;iBACnD,CAAC;gBAGJ,gCAAQ,KAAK,EAAE,UAAU,uBAA2B;gBACpD,gCAAQ,KAAK,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SAAS,GAAG,MAAM,CAAC,KAAK,CAAA;;;CAG7B,CAAA"}
@@ -0,0 +1,127 @@
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 { estimateID } from '@manuscripts/library';
13
+ import { buildBibliographyItem } from '@manuscripts/transform';
14
+ import React, { useCallback, useEffect, useState } from 'react';
15
+ import styled from 'styled-components';
16
+ import config from '../../config';
17
+ import { sources } from '../../lib/sources';
18
+ import { useStore } from '../../store';
19
+ import { Main } from '../Page';
20
+ import Search, { SearchWrapper } from '../Search';
21
+ import { SearchResults } from './SearchResults';
22
+ export const ExternalSearch = React.memo(({ debouncedQuery, projectLibrary, query, setQuery }) => {
23
+ const [{ projectID, saveBiblioItem }] = useStore((store) => ({
24
+ projectID: store.projectID,
25
+ saveBiblioItem: store.saveBiblioItem,
26
+ }));
27
+ const [sourceID] = useStore((store) => store.librarySourceID);
28
+ const [error, setError] = useState();
29
+ const [searching, setSearching] = useState(false);
30
+ const [fetching, setFetching] = useState(new Set());
31
+ const [selected, setSelected] = useState();
32
+ const [results, setResults] = useState();
33
+ const [source, setSource] = useState();
34
+ useEffect(() => {
35
+ const source = sources.find((item) => item.id === sourceID);
36
+ setSource(source);
37
+ }, [sourceID]);
38
+ useEffect(() => {
39
+ const selected = new Map();
40
+ for (const item of projectLibrary.values()) {
41
+ selected.set(estimateID(item), item);
42
+ }
43
+ setSelected(selected);
44
+ }, [projectLibrary]);
45
+ useEffect(() => {
46
+ setError(undefined);
47
+ setResults(undefined);
48
+ setSearching(Boolean(query));
49
+ }, [query, sourceID]);
50
+ useEffect(() => {
51
+ if (source && debouncedQuery) {
52
+ source
53
+ .search(debouncedQuery, 20, config.support.email)
54
+ .then((result) => {
55
+ setResults(result);
56
+ })
57
+ .catch((error) => {
58
+ console.error(error);
59
+ setError('There was an error running this search');
60
+ })
61
+ .finally(() => {
62
+ setSearching(false);
63
+ })
64
+ .catch((error) => {
65
+ console.error(error);
66
+ setError('There was an error running this search');
67
+ });
68
+ }
69
+ }, [debouncedQuery, source]);
70
+ const handleAdd = useCallback((item) => saveBiblioItem(item, projectID), [projectID, saveBiblioItem]);
71
+ const handleSelect = useCallback((id, item) => {
72
+ if (!source) {
73
+ throw new Error('No source defined');
74
+ }
75
+ if (!selected) {
76
+ throw new Error('Selected map not built');
77
+ }
78
+ const estimatedID = estimateID(item);
79
+ if (selected.has(estimatedID)) {
80
+ return; // already added
81
+ }
82
+ setFetching((fetching) => {
83
+ fetching.add(estimatedID);
84
+ return new Set([...fetching]);
85
+ });
86
+ source
87
+ .fetch(item, config.support.email)
88
+ .then((data) => {
89
+ const item = buildBibliographyItem(data);
90
+ return handleAdd(item);
91
+ })
92
+ .then(() => {
93
+ window.setTimeout(() => {
94
+ setFetching((fetching) => {
95
+ fetching.delete(estimatedID);
96
+ return new Set([...fetching]);
97
+ });
98
+ }, 100);
99
+ })
100
+ .catch((error) => {
101
+ console.error('failed to add', error);
102
+ setError('There was an error saving this item to the library');
103
+ });
104
+ }, [handleAdd, selected, source]);
105
+ const handleQueryChange = useCallback((event) => {
106
+ setQuery(event.target.value);
107
+ }, [setQuery]);
108
+ if (!source) {
109
+ return null;
110
+ }
111
+ if (!selected) {
112
+ return null;
113
+ }
114
+ return (React.createElement(Main, null,
115
+ React.createElement(Container, null,
116
+ React.createElement(SearchWrapper, null,
117
+ React.createElement(Search, { autoComplete: 'off', autoFocus: true, handleSearchChange: handleQueryChange, placeholder: `Search ${source.name}`, type: 'search', value: query || '' })),
118
+ React.createElement(SearchResults, { error: error, fetching: fetching, handleSelect: handleSelect, results: results, searching: searching, selected: selected }))));
119
+ });
120
+ const Container = styled.div `
121
+ flex: 1;
122
+ display: flex;
123
+ flex-direction: column;
124
+ overflow: hidden;
125
+ height: 100%;
126
+ `;
127
+ //# sourceMappingURL=ExternalSearch.js.map