@brightspot/ui 3.0.1-cms-ui-migration.1 → 3.0.1-cms-ui-migration.3

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 (303) hide show
  1. package/README.md +54 -35
  2. package/dist/custom-elements.json +2536 -2536
  3. package/dist/storybook/assets/{ActionBar.stories-BhdqLyzJ.js → ActionBar.stories-CSxtZl7v.js} +1 -1
  4. package/dist/storybook/assets/{ActionItem.stories-17zjMCkO.js → ActionItem.stories-BWcMRMP3.js} +1 -1
  5. package/dist/storybook/assets/{Avatar.stories-C5m3-zOH.js → Avatar.stories-CYTUGXzH.js} +1 -1
  6. package/dist/storybook/assets/{AvatarGroup.stories-DE88PJ6w.js → AvatarGroup.stories-CSYBYo_5.js} +1 -1
  7. package/dist/storybook/assets/{Badge.stories-D905HmvO.js → Badge.stories-LuF4BuVr.js} +1 -1
  8. package/dist/storybook/assets/{Button-ANyLESGb.js → Button-CrXCMxHb.js} +1 -1
  9. package/dist/storybook/assets/{Button.stories-DbH6q5L3.js → Button.stories-JVwxdrdM.js} +1 -1
  10. package/dist/storybook/assets/{ButtonGroup.stories-loqgAB7p.js → ButtonGroup.stories-qtq64a1H.js} +1 -1
  11. package/dist/storybook/assets/{Celebrate.stories-CRO3rSgp.js → Celebrate.stories-DjTtaSd6.js} +1 -1
  12. package/dist/storybook/assets/{Checkbox.stories-SZtgfbFe.js → Checkbox.stories-v1Pr5mL6.js} +1 -1
  13. package/dist/storybook/assets/{CircularProgress.stories-VayPxO4M.js → CircularProgress.stories-DkV7PJ4D.js} +1 -1
  14. package/dist/storybook/assets/{ClipboardMixin.stories-0EB2O2zT.js → ClipboardMixin.stories-Dh5c7uSM.js} +1 -1
  15. package/dist/storybook/assets/{Color-6BZIO3FS-CFpcD80i.js → Color-6BZIO3FS-B1gcREt6.js} +1 -1
  16. package/dist/storybook/assets/{Colors.stories-BJGM6xnp.js → Colors.stories-DnubtRqn.js} +1 -1
  17. package/dist/storybook/assets/{CombinedEffects.stories-DUwocYcn.js → CombinedEffects.stories-By6akSve.js} +1 -1
  18. package/dist/storybook/assets/{ComponentStatesMixin-MUqdPCf7.js → ComponentStatesMixin-CPLGv3h-.js} +1 -1
  19. package/dist/storybook/assets/{ComponentStatesMixin.stories-DjrxNwE7.js → ComponentStatesMixin.stories-CiQ_lyhm.js} +1 -1
  20. package/dist/storybook/assets/{CopyToClipboard.stories-DptOcPq6.js → CopyToClipboard.stories-cJ7rl3mj.js} +1 -1
  21. package/dist/storybook/assets/{Debounce.stories-BbcIWmhD.js → Debounce.stories-Bw-goobU.js} +1 -1
  22. package/dist/storybook/assets/{DocsRenderer-LL677BLK-Yy8fjeNG.js → DocsRenderer-LL677BLK-CNW57dGQ.js} +3 -3
  23. package/dist/storybook/assets/{Dropdown.stories-Du3LrBR6.js → Dropdown.stories-CwC3HXXd.js} +1 -1
  24. package/dist/storybook/assets/{EmptyState.stories-Dy9P8aOY.js → EmptyState.stories-BUEJwuhP.js} +1 -1
  25. package/dist/storybook/assets/{Events.stories-DvdVQxDf.js → Events.stories-D1mf9buv.js} +1 -1
  26. package/dist/storybook/assets/{Heading.stories-BQ1jFOKn.js → Heading.stories-DO906G4P.js} +1 -1
  27. package/dist/storybook/assets/{HueRipple.stories-CrZFjnRl.js → HueRipple.stories-BOySRSZB.js} +1 -1
  28. package/dist/storybook/assets/{Icon.stories-C2Tj8Lx1.js → Icon.stories-BsqgTbdG.js} +1 -1
  29. package/dist/storybook/assets/{IconButton.stories-DFqouOJb.js → IconButton.stories-aza1AAKk.js} +1 -1
  30. package/dist/storybook/assets/{LinearProgress.stories-DtNw3QX3.js → LinearProgress.stories-CDYmiiex.js} +1 -1
  31. package/dist/storybook/assets/{Pagination.stories-CFiZ9APs.js → Pagination.stories-LXB-x7YB.js} +1 -1
  32. package/dist/storybook/assets/{Popover.stories-DkkTuYag.js → Popover.stories-DY1HesPJ.js} +1 -1
  33. package/dist/storybook/assets/{ReadyMixin-BA01Vm_B.js → ReadyMixin-DmOC67IJ.js} +1 -1
  34. package/dist/storybook/assets/{RovingTabindexMixin.stories-BesAqt48.js → RovingTabindexMixin.stories-BWy0Rq8d.js} +1 -1
  35. package/dist/storybook/assets/{Rtc.stories-iTw43rjp.js → Rtc.stories-DrmdqqbI.js} +1 -1
  36. package/dist/storybook/assets/{ScrollShadow.stories-QYqQCcAo.js → ScrollShadow.stories-DiKFPazh.js} +1 -1
  37. package/dist/storybook/assets/{Switch.stories-BKArq9Mk.js → Switch.stories-BgFnw8_z.js} +1 -1
  38. package/dist/storybook/assets/{Tab.stories-8UdDPvE5.js → Tab.stories-c2wLMooF.js} +1 -1
  39. package/dist/storybook/assets/{Tabs.stories-BPGMZ552.js → Tabs.stories-CjH8seNP.js} +1 -1
  40. package/dist/storybook/assets/{Throttle.stories-CYl5d0r6.js → Throttle.stories-CXysc_QE.js} +1 -1
  41. package/dist/storybook/assets/{Tooltip.stories-cZ0zSlwX.js → Tooltip.stories-6qzyByPm.js} +1 -1
  42. package/dist/storybook/assets/{Upload.stories-CPC7N0Ed.js → Upload.stories-BLxykydQ.js} +1 -1
  43. package/dist/storybook/assets/{UploadItem.stories-D0LClT0a.js → UploadItem.stories-CcfcqdJW.js} +1 -1
  44. package/dist/storybook/assets/{Welcome.stories-C8JUaRas.js → Welcome.stories-CzYS_3fH.js} +1 -1
  45. package/dist/storybook/assets/{Widget.stories-C1FxF24-.js → Widget.stories-Du7T4LAI.js} +1 -1
  46. package/dist/storybook/assets/{WithTooltip-65CFNBJE-BMBo-fie.js → WithTooltip-65CFNBJE-D4LfXdYt.js} +1 -1
  47. package/dist/storybook/assets/{blocks-BTsuXRXZ.js → blocks-DR3fGePu.js} +5 -5
  48. package/dist/storybook/assets/{formatter-EIJCOSYU-BJ1Cwrpx.js → formatter-EIJCOSYU-Cf01216O.js} +1 -1
  49. package/dist/storybook/assets/if-defined-DaMmbcIU.js +1 -0
  50. package/dist/storybook/assets/{iframe-B3YWTqkR.js → iframe-CQArUhO8.js} +4 -4
  51. package/dist/storybook/assets/{iframe-BgFj0b5u.css → iframe-D0roG0J-.css} +1 -1
  52. package/dist/storybook/assets/{index-BBUTVEdP.js → index-B1uI_67G.js} +1 -1
  53. package/dist/storybook/assets/{onFind-NC0lGo-r.js → onFind-BpFkN2Rh.js} +1 -1
  54. package/dist/storybook/assets/{onFind.stories-CqbwQgQF.js → onFind.stories-Cxdeg69X.js} +1 -1
  55. package/dist/storybook/assets/{onRemove.stories-Y8Ycs77o.js → onRemove.stories-BHEWpNrE.js} +1 -1
  56. package/dist/storybook/assets/{onVisible.stories-CcLUE35q.js → onVisible.stories-DFJ3S_ZS.js} +1 -1
  57. package/dist/storybook/assets/{style-map-MSB_ngx3.js → style-map-DJ83UC3V.js} +1 -1
  58. package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-BjkjEDMG.js → syntaxhighlighter-ED5Y7EFY-zYN83mxK.js} +1 -1
  59. package/dist/storybook/iframe.html +2 -2
  60. package/dist/storybook/project.json +1 -1
  61. package/dist/tailwind.config.d.ts +4 -1
  62. package/dist/tailwind.config.d.ts.map +1 -1
  63. package/dist/tailwind.config.js +0 -2
  64. package/dist/tailwind.config.js.map +1 -1
  65. package/dist/tailwind.config.ts +0 -2
  66. package/package.json +16 -2
  67. package/dist/storybook/assets/if-defined-BPCd2NXs.js +0 -1
  68. package/src/legacy/tool-ui/src/main/resources/settings.properties +0 -1
  69. package/src/legacy/tool-ui/src/main/webapp/WEB-INF/web.xml +0 -81
  70. package/src/legacy/tool-ui/src/main/webapp/script/bsp-uploader.js +0 -170
  71. package/src/legacy/tool-ui/src/main/webapp/script/bsp-utils.js +0 -393
  72. package/src/legacy/tool-ui/src/main/webapp/script/content/layout-element.js +0 -141
  73. package/src/legacy/tool-ui/src/main/webapp/script/input/query.js +0 -78
  74. package/src/legacy/tool-ui/src/main/webapp/script/input/workflow.js +0 -718
  75. package/src/legacy/tool-ui/src/main/webapp/script/jquery.extra.js +0 -633
  76. package/src/legacy/tool-ui/src/main/webapp/script/v3/Dropbox.js +0 -18
  77. package/src/legacy/tool-ui/src/main/webapp/script/v3/EditFieldUpdate.js +0 -406
  78. package/src/legacy/tool-ui/src/main/webapp/script/v3/EditFieldUpdateCache.js +0 -1
  79. package/src/legacy/tool-ui/src/main/webapp/script/v3/Notification.js +0 -151
  80. package/src/legacy/tool-ui/src/main/webapp/script/v3/content/edit.js +0 -194
  81. package/src/legacy/tool-ui/src/main/webapp/script/v3/content/state.js +0 -785
  82. package/src/legacy/tool-ui/src/main/webapp/script/v3/csrf.js +0 -35
  83. package/src/legacy/tool-ui/src/main/webapp/script/v3/dashboard.js +0 -65
  84. package/src/legacy/tool-ui/src/main/webapp/script/v3/input/dataTransfer.js +0 -129
  85. package/src/legacy/tool-ui/src/main/webapp/script/v3/input/file.js +0 -433
  86. package/src/legacy/tool-ui/src/main/webapp/script/v3/input/object.js +0 -743
  87. package/src/legacy/tool-ui/src/main/webapp/script/v3/input/read-only.js +0 -17
  88. package/src/legacy/tool-ui/src/main/webapp/script/v3/jquery.frame.js +0 -478
  89. package/src/legacy/tool-ui/src/main/webapp/script/v3/jquery.repeatable.js +0 -2406
  90. package/src/legacy/tool-ui/src/main/webapp/script/v3/plugin/popup.d.ts +0 -2
  91. package/src/legacy/tool-ui/src/main/webapp/script/v3/plugin/popup.js +0 -446
  92. package/src/legacy/tool-ui/src/main/webapp/script/v3/search-filters.js +0 -62
  93. package/src/legacy/tool-ui/src/main/webapp/script/v3/search.js +0 -53
  94. package/src/legacy/tool-ui/src/main/webapp/script/v3.js +0 -1049
  95. package/src/legacy/tool-ui/src/main/webapp/v4/Admin.js +0 -16
  96. package/src/legacy/tool-ui/src/main/webapp/v4/AutoExpand.js +0 -84
  97. package/src/legacy/tool-ui/src/main/webapp/v4/AutoSubmit.js +0 -68
  98. package/src/legacy/tool-ui/src/main/webapp/v4/Bridge.js +0 -536
  99. package/src/legacy/tool-ui/src/main/webapp/v4/CheckboxInput.js +0 -22
  100. package/src/legacy/tool-ui/src/main/webapp/v4/ColorInput.js +0 -5
  101. package/src/legacy/tool-ui/src/main/webapp/v4/ColorInputSpectrum.js +0 -107
  102. package/src/legacy/tool-ui/src/main/webapp/v4/ComboInput.js +0 -1491
  103. package/src/legacy/tool-ui/src/main/webapp/v4/CommunityWidget.js +0 -29
  104. package/src/legacy/tool-ui/src/main/webapp/v4/ContentEdit.js +0 -2427
  105. package/src/legacy/tool-ui/src/main/webapp/v4/ContentLock.js +0 -470
  106. package/src/legacy/tool-ui/src/main/webapp/v4/ContentReporting.js +0 -32
  107. package/src/legacy/tool-ui/src/main/webapp/v4/DataTable.js +0 -31
  108. package/src/legacy/tool-ui/src/main/webapp/v4/DateStringField.js +0 -485
  109. package/src/legacy/tool-ui/src/main/webapp/v4/Entry.js +0 -264
  110. package/src/legacy/tool-ui/src/main/webapp/v4/ExternalItemAuth.js +0 -16
  111. package/src/legacy/tool-ui/src/main/webapp/v4/Form.js +0 -31
  112. package/src/legacy/tool-ui/src/main/webapp/v4/Hierarchy.js +0 -100
  113. package/src/legacy/tool-ui/src/main/webapp/v4/Icon.ts +0 -49
  114. package/src/legacy/tool-ui/src/main/webapp/v4/ImageEditor.js +0 -2403
  115. package/src/legacy/tool-ui/src/main/webapp/v4/ImageEditorBundle.js +0 -5
  116. package/src/legacy/tool-ui/src/main/webapp/v4/LinkCarousel.js +0 -40
  117. package/src/legacy/tool-ui/src/main/webapp/v4/LinkList.js +0 -14
  118. package/src/legacy/tool-ui/src/main/webapp/v4/LinkTable.js +0 -123
  119. package/src/legacy/tool-ui/src/main/webapp/v4/Location.js +0 -19
  120. package/src/legacy/tool-ui/src/main/webapp/v4/LocationMap.js +0 -148
  121. package/src/legacy/tool-ui/src/main/webapp/v4/LookingGlass.js +0 -24
  122. package/src/legacy/tool-ui/src/main/webapp/v4/Message.js +0 -14
  123. package/src/legacy/tool-ui/src/main/webapp/v4/NumberBar.js +0 -32
  124. package/src/legacy/tool-ui/src/main/webapp/v4/Page.js +0 -890
  125. package/src/legacy/tool-ui/src/main/webapp/v4/Preview.js +0 -758
  126. package/src/legacy/tool-ui/src/main/webapp/v4/PreviewEditor.js +0 -86
  127. package/src/legacy/tool-ui/src/main/webapp/v4/PreviewOverlay.js +0 -1005
  128. package/src/legacy/tool-ui/src/main/webapp/v4/PubSub.js +0 -47
  129. package/src/legacy/tool-ui/src/main/webapp/v4/QueryField.js +0 -211
  130. package/src/legacy/tool-ui/src/main/webapp/v4/RegionMap.js +0 -215
  131. package/src/legacy/tool-ui/src/main/webapp/v4/RepeatableContentInputGroup.js +0 -160
  132. package/src/legacy/tool-ui/src/main/webapp/v4/RichTextEditor.js +0 -154
  133. package/src/legacy/tool-ui/src/main/webapp/v4/SearchFields.js +0 -281
  134. package/src/legacy/tool-ui/src/main/webapp/v4/SearchResult.js +0 -255
  135. package/src/legacy/tool-ui/src/main/webapp/v4/SharePreview.js +0 -56
  136. package/src/legacy/tool-ui/src/main/webapp/v4/Sortable.js +0 -874
  137. package/src/legacy/tool-ui/src/main/webapp/v4/StyleEmbeddedContent.js +0 -100
  138. package/src/legacy/tool-ui/src/main/webapp/v4/StyleguidePresets.js +0 -357
  139. package/src/legacy/tool-ui/src/main/webapp/v4/TabContainer.js +0 -360
  140. package/src/legacy/tool-ui/src/main/webapp/v4/Taxonomy.js +0 -27
  141. package/src/legacy/tool-ui/src/main/webapp/v4/ThemeBundleEditor.js +0 -224
  142. package/src/legacy/tool-ui/src/main/webapp/v4/TimedContent.js +0 -147
  143. package/src/legacy/tool-ui/src/main/webapp/v4/TimedContentBundle.js +0 -8
  144. package/src/legacy/tool-ui/src/main/webapp/v4/VideoEditor.js +0 -2417
  145. package/src/legacy/tool-ui/src/main/webapp/v4/VideoEditorBundle.js +0 -8
  146. package/src/legacy/tool-ui/src/main/webapp/v4/ViewMirror.js +0 -52
  147. package/src/legacy/tool-ui/src/main/webapp/v4/ViewPreview.d.ts +0 -13
  148. package/src/legacy/tool-ui/src/main/webapp/v4/ViewPreview.js +0 -177
  149. package/src/legacy/tool-ui/src/main/webapp/v4/Widget.js +0 -90
  150. package/src/legacy/tool-ui/src/main/webapp/v4/__mocks__/fileMock.js +0 -1
  151. package/src/legacy/tool-ui/src/main/webapp/v4/__mocks__/styleMock.js +0 -1
  152. package/src/legacy/tool-ui/src/main/webapp/v4/__mocks__/textArea.mock.js +0 -20
  153. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/globals.js +0 -770
  154. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/ProseMirror.test.js +0 -16
  155. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/index.html +0 -54
  156. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/comment_manager/CommentManager.test.js +0 -29
  157. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/comment_manager/index.html +0 -35
  158. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/custom_keyboard/CustomKeyboard.js +0 -42
  159. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/custom_keyboard/index.html +0 -37
  160. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/enhancement_manager/EnhancementManager.test.js +0 -288
  161. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/enhancement_manager/block.html +0 -38
  162. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/enhancement_manager/inline.html +0 -38
  163. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/enhancement_manager/no-popups.html +0 -38
  164. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/list_manager/ListManager.js +0 -257
  165. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/list_manager/index.html +0 -38
  166. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/menubar/hierarchal.html +0 -33
  167. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/menubar/index.html +0 -33
  168. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/menubar/menubar.test.js +0 -195
  169. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/menubar/small.html +0 -34
  170. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/menubar/tags.html +0 -34
  171. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/placeholder_manager/PlaceholderManager.test.js +0 -134
  172. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/placeholder_manager/has-editable-placeholder.html +0 -32
  173. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/placeholder_manager/has-text.html +0 -34
  174. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/placeholder_manager/index.html +0 -31
  175. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/table_manager/TableManager.test.js +0 -63
  176. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/table_manager/existing.html +0 -48
  177. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/track_manager/TrackManager.test.js +0 -291
  178. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/track_manager/existing.html +0 -39
  179. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/track_manager/insert.html +0 -37
  180. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/Sortable.test.js +0 -105
  181. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/ProseMirror.test.js +0 -41
  182. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/codemirror-shim.test.js +0 -72
  183. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/plugins/collab_manager/CollabManager.test.js +0 -46
  184. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/plugins/enhancement_manager/EnhancementManager.test.js +0 -84
  185. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/plugins/list_manager/ListManager.test.js +0 -54
  186. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/plugins/menubar/menubar.test.js +0 -183
  187. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/plugins/spellcheck/SpellCheck.test.js +0 -45
  188. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/settings/BSSerializer.test.js +0 -346
  189. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/settings/menuItemsBuilder.test.js +0 -226
  190. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/utilities.test.js +0 -118
  191. package/src/legacy/tool-ui/src/main/webapp/v4/appetizeio/Appetizeio.js +0 -5
  192. package/src/legacy/tool-ui/src/main/webapp/v4/appetizeio/AppetizeioEmbedded.js +0 -113
  193. package/src/legacy/tool-ui/src/main/webapp/v4/compat/Fetch.js +0 -16
  194. package/src/legacy/tool-ui/src/main/webapp/v4/compat/jquery.js +0 -32
  195. package/src/legacy/tool-ui/src/main/webapp/v4/compat/requirejs.js +0 -13
  196. package/src/legacy/tool-ui/src/main/webapp/v4/dom/Tether.js +0 -1
  197. package/src/legacy/tool-ui/src/main/webapp/v4/dom/TetherLayout.js +0 -1
  198. package/src/legacy/tool-ui/src/main/webapp/v4/dom/closest.js +0 -1
  199. package/src/legacy/tool-ui/src/main/webapp/v4/dom/create.js +0 -1
  200. package/src/legacy/tool-ui/src/main/webapp/v4/dom/find.js +0 -1
  201. package/src/legacy/tool-ui/src/main/webapp/v4/dom/findAll.js +0 -1
  202. package/src/legacy/tool-ui/src/main/webapp/v4/dom/ifClick.js +0 -1
  203. package/src/legacy/tool-ui/src/main/webapp/v4/dom/ifMatches.js +0 -1
  204. package/src/legacy/tool-ui/src/main/webapp/v4/dom/ifUnmodified.js +0 -1
  205. package/src/legacy/tool-ui/src/main/webapp/v4/dom/index.js +0 -5
  206. package/src/legacy/tool-ui/src/main/webapp/v4/dom/insertBefore.js +0 -1
  207. package/src/legacy/tool-ui/src/main/webapp/v4/dom/insertFirst.js +0 -1
  208. package/src/legacy/tool-ui/src/main/webapp/v4/dom/insertLast.js +0 -1
  209. package/src/legacy/tool-ui/src/main/webapp/v4/dom/onFind.js +0 -1
  210. package/src/legacy/tool-ui/src/main/webapp/v4/dom/onFindOnce.js +0 -1
  211. package/src/legacy/tool-ui/src/main/webapp/v4/dom/onRTEReady.js +0 -1
  212. package/src/legacy/tool-ui/src/main/webapp/v4/dom/onRemove.js +0 -1
  213. package/src/legacy/tool-ui/src/main/webapp/v4/dom/onVisible.js +0 -1
  214. package/src/legacy/tool-ui/src/main/webapp/v4/dom/previousUntil.js +0 -1
  215. package/src/legacy/tool-ui/src/main/webapp/v4/dom/resolveIconCompat.js +0 -40
  216. package/src/legacy/tool-ui/src/main/webapp/v4/rtc/Socket.js +0 -1
  217. package/src/legacy/tool-ui/src/main/webapp/v4/rtc/index.js +0 -1
  218. package/src/legacy/tool-ui/src/main/webapp/v4/rte/ProseMirror.js +0 -909
  219. package/src/legacy/tool-ui/src/main/webapp/v4/rte/README.md +0 -68
  220. package/src/legacy/tool-ui/src/main/webapp/v4/rte/codemirror-shim.d.ts +0 -8
  221. package/src/legacy/tool-ui/src/main/webapp/v4/rte/codemirror-shim.js +0 -274
  222. package/src/legacy/tool-ui/src/main/webapp/v4/rte/collab-workflow.jpeg +0 -0
  223. package/src/legacy/tool-ui/src/main/webapp/v4/rte/interchangeable.ts +0 -250
  224. package/src/legacy/tool-ui/src/main/webapp/v4/rte/mention.js +0 -90
  225. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/PluginProvider.js +0 -124
  226. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/README.md +0 -46
  227. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/ai_inline_manager/AIInlineManager.ts +0 -124
  228. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/ai_inline_manager/views/AIInlineView.ts +0 -1019
  229. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/ai_manager/AiManager.ts +0 -199
  230. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/collab_manager/CollabManager.js +0 -339
  231. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/collab_manager/views/AvatarView.js +0 -96
  232. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/comment_manager/CommentManager.js +0 -348
  233. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/custom_keyboard/CustomKeyboard.js +0 -110
  234. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/custom_keyboard/README.md +0 -29
  235. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/EnhancementManager.js +0 -428
  236. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/README.md +0 -63
  237. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/commands.js +0 -690
  238. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/constants.js +0 -12
  239. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/enhancement-creation.jpeg +0 -0
  240. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/index.js +0 -15
  241. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/rte-flow.jpeg +0 -0
  242. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/views/ActionButtonView.js +0 -86
  243. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/views/BlockSubmenuView.js +0 -60
  244. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/views/EnhancementView.js +0 -208
  245. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/views/PreviewView.js +0 -102
  246. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/views/SubmenuView.js +0 -365
  247. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/find_replace_manager/FindReplaceManager.js +0 -239
  248. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/find_replace_manager/views/FindView.js +0 -604
  249. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/fullscreen_manager/FullscreenManager.js +0 -57
  250. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/fullscreen_manager/README.md +0 -26
  251. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/fullscreen_manager/commands.js +0 -16
  252. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/fullscreen_manager/index.js +0 -4
  253. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/fullscreen_manager/views/FullscreenView.js +0 -474
  254. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/html_editor_manager/htmlEditorManager.js +0 -66
  255. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/html_editor_manager/views/HtmlEditorView.js +0 -97
  256. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/list_manager/ListManager.js +0 -342
  257. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/list_manager/README.md +0 -50
  258. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/list_manager/commands.js +0 -207
  259. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/list_manager/constants.js +0 -26
  260. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/list_manager/index.js +0 -4
  261. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/menubar/Menubar.js +0 -485
  262. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/menubar/README.md +0 -40
  263. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/menubar/views/MenuView.js +0 -842
  264. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/paste_manager/PasteManager.js +0 -368
  265. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/placeholder_manager/PlaceHolderManager.js +0 -128
  266. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/raw_text_manager/README.md +0 -13
  267. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/raw_text_manager/RawTextManager.js +0 -96
  268. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/spellcheck/index.js +0 -3
  269. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/spellcheck/spellcheck-plugin.js +0 -280
  270. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/spellcheck/spellcheck-service.js +0 -94
  271. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/table_manager/TableManager.js +0 -57
  272. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/table_manager/commands.js +0 -97
  273. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/table_manager/views/TableSizerView.js +0 -88
  274. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/table_manager/views/TableView.js +0 -613
  275. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/track_manager/README.md +0 -13
  276. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/track_manager/TrackManager.js +0 -905
  277. package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/BSSerializer.js +0 -819
  278. package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/README.md +0 -80
  279. package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/commands.js +0 -98
  280. package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/constants.d.ts +0 -84
  281. package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/constants.js +0 -87
  282. package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/index.js +0 -13
  283. package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/keymapBuilder.js +0 -223
  284. package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/menuItemsBuilder.js +0 -559
  285. package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/schemaBuilder.js +0 -1281
  286. package/src/legacy/tool-ui/src/main/webapp/v4/rte/utilities.d.ts +0 -4
  287. package/src/legacy/tool-ui/src/main/webapp/v4/rte/utilities.js +0 -359
  288. package/src/legacy/tool-ui/src/main/webapp/v4/theme/ColorRotator.js +0 -1
  289. package/src/legacy/tool-ui/src/main/webapp/v4/util/debounce.js +0 -1
  290. package/src/legacy/tool-ui/src/main/webapp/v4/util/getComponentKey.js +0 -1
  291. package/src/legacy/tool-ui/src/main/webapp/v4/util/noise.js +0 -1
  292. package/src/legacy/tool-ui/src/main/webapp/v4/util/repaint.js +0 -1
  293. package/src/legacy/tool-ui/src/main/webapp/v4/util/storage.js +0 -1
  294. package/src/legacy/tool-ui/src/main/webapp/v4/util/throttle.js +0 -1
  295. package/src/legacy/tool-ui/src/main/webapp/v4/widget/AssignmentContent.js +0 -33
  296. package/src/legacy/tool-ui/src/main/webapp/v4/widget/AssignmentDeskDashboard.js +0 -217
  297. package/src/legacy/tool-ui/src/main/webapp/v4/widget/AssociatedContentWidget.js +0 -7
  298. package/src/legacy/tool-ui/src/main/webapp/v4/widget/BulkUpload.js +0 -19
  299. package/src/legacy/tool-ui/src/main/webapp/v4/widget/Calendar.js +0 -7
  300. package/src/legacy/tool-ui/src/main/webapp/v4/widget/ClosableWindow.js +0 -13
  301. package/src/legacy/tool-ui/src/main/webapp/v4/widget/PitchAssignments.js +0 -25
  302. package/src/legacy/tool-ui/src/main/webapp/v4/widget/PitchContent.js +0 -33
  303. package/src/legacy/tool-ui/src/main/webapp/v4/widget/Revisions.js +0 -61
@@ -1,80 +0,0 @@
1
- # Brightspot Rich Text Editor Settings
2
-
3
- To make it easy to implement your own RTE or extend this one, settings that impact how the RTE functions are all located in this directory and are broken into separate files based on subject area. In theory, you could replace this whole folder with all your own settings and have an RTE with same base functionality but your own customized settings (e.g. menu items, key commands, schema, etc).
4
-
5
- ## Table of Contents
6
-
7
- 1. [Component and Directory Structure](#component-and-directory-structure)
8
- 1. [Commands](#commands)
9
- 1. [Constants](#constants)
10
- 1. [Keymap](#keymap)
11
- 1. [Menu Items](#menu-items)
12
- 1. [Schema](#schema)
13
-
14
- ## Component and Directory Structure
15
-
16
- ### Commands
17
-
18
- 1. [Commands](https://prosemirror.net/docs/guide/#commands) are the actions that Prosemirror calls when a user interacts with the RTE (most often used with a menu bar). Many useful commands are available through [Prosemirror's Commands plugin](https://github.com/ProseMirror/prosemirror-commands), but we also have our own. In our default setup, for example, we have a command that clears all formatting on selected text.
19
-
20
- #### Constants
21
-
22
- 1. Constants used throughout the RTE app.
23
-
24
- #### Keymap
25
-
26
- 1. Mapping of keyboard shortcuts to commands. Prosemirror comes with a Keymap plugin, but you will likely need to add more for things like a custom menubar.
27
-
28
- #### Menu Items
29
-
30
- 1. This defines what functionality the menu bar will contain. A menu item has the following configurations:
31
-
32
- ##### With Class Name and Material Icons
33
-
34
- ```js
35
- undo: {
36
- command: undo, // Maps to the command function name to be called
37
- dom: { // Describes how the menu item DOM is built
38
- className: 'rte2-toolbar-undo', // Self explanatory
39
- name: 'undo' // Shows up in the element title attribute
40
- },
41
- cluster: 'actions' // Indicates this is the start of a cluster. This will add a class to the menu item, `cluster` which you can then style. In our default set up, this adds a vertical rule in between the clusters.
42
- },
43
- ```
44
-
45
- ```less
46
- .rte2-toolbar-undo {
47
- &:extend(.IconButton all);
48
- --IconButton-name: 'undo'; // Name of the material icon to be used
49
- }
50
- ```
51
-
52
- See the [Material Icon site](https://material.io/tools/icons/?style=baseline) for available icons and their names. Plug the name into the `--IconButton-name` css rule as shown above.
53
-
54
- #### Schema
55
-
56
- 1. Defines the [schema](https://prosemirror.net/docs/guide/#schema) that maps DOM elements and styling to Prosemirror nodes and marks. This is a [Persistent Ordered Map](https://github.com/marijnh/orderedmap), so you can extend this if you only need to make a few modifications.
57
-
58
- ### Menu Items and Schema Configuration APIs
59
-
60
- 1. Menu items that are marks (bold, italics, etc) should be configured like the following example:
61
-
62
- ```js
63
- {
64
- "inline": true, // Must be inline
65
- "text": "B",
66
- "className": "rte2-toolbar-bold", // Must have a className. This will be used to style both the menu icon and the content in the RTE.
67
- "tooltip": "Bold",
68
- "style": "bold", // Must have a style. This will be used as the tag name in the RTE.
69
- "activeIfUnset": null
70
- }
71
- ```
72
-
73
- This is the format the current backend uses, so our PM code is adapted to work with what we already have in pace on the backend. Currently this configuration can be found in the page as globals, but the RTE can accept an object in this format from anywhere when the RTE is instantiated.
74
-
75
- 2. Nodes and Menu items representing the creation of list nodes and aligned blocks are handled with special commands and as such are defined in the code. However, the code looks for clues in the config to determine whether these nodes and menu options should be available for the RTE.
76
-
77
- - For aligned blocks, we are looking for `align` to be at the beginning of the style property value.
78
- - For lists, we are looking for the style to be `ul` or `ol`.
79
-
80
- 3. Enhancement menu items and nodes are in another PR and will be a part of this once these are all merged together.
@@ -1,98 +0,0 @@
1
- /* eslint-disable no-debugger */
2
- import { setBlockType } from 'prosemirror-commands'
3
- import { CellSelection } from 'prosemirror-tables'
4
- import { getObjectValue } from '../utilities'
5
-
6
- /**
7
- * Removes all marks in a given selection. The selection
8
- * is retrieved from the editor's state selection. The check for
9
- * empty content or no cursor ensure that the use has selected a range
10
- * of text (and not just clicked into text).
11
- */
12
- const clearFormatting = () => {
13
- return function (state, dispatch) {
14
- const { empty, $cursor, ranges } = state.selection
15
- const noDeleteList = ['comment', 'del', 'ins']
16
- if (empty && !$cursor) {
17
- return false
18
- }
19
-
20
- if (!dispatch || $cursor) {
21
- return true
22
- }
23
-
24
- const tr = state.tr
25
-
26
- ranges.forEach((range) => {
27
- const { $from, $to } = range
28
- state.doc.nodesBetween($from.pos, $to.pos, (node, pos) => {
29
- const marks = node.marks
30
- marks.forEach((mark) => {
31
- if (noDeleteList.indexOf(mark.type.name) !== -1) {
32
- return
33
- }
34
-
35
- tr.removeMark(pos, pos + node.nodeSize)
36
- })
37
- })
38
- })
39
-
40
- dispatch(tr.scrollIntoView())
41
-
42
- return true
43
- }
44
- }
45
-
46
- /**
47
- * Toggles the alignment of a selection. If the user is toggling an
48
- * off an alignment, then it should fall back to a default alignment,
49
- * to mirror our codemirror implementation (e.g. user selects alignCenter
50
- * menu uption but it is already selected, so that aligment is removed
51
- * and a the defaultAlignment is taken on.)
52
- *
53
- * @param {Prosemirror.NodeType} selectedAlignment The selected alignment
54
- * node that is being toggled
55
- * @param {Prosemirror.NodeType} defaultAlignment The default alignment
56
- * node to default to when the user is toggling off the selected alignment
57
- * @return {Boolean} Returning true to signal to Prosemirror that command
58
- * is complete
59
- */
60
- const toggleAlignment = (selectedAlignment, defaultAlignment) => {
61
- return function (state, dispatch) {
62
- const { $anchor, ranges } = state.selection
63
- let tr = state.tr
64
- if (state.selection instanceof CellSelection) {
65
- let isAligned = false
66
- for (let i = 0; i < ranges.length; i++) {
67
- const { $from } = ranges[i]
68
- const parent = $from.parent
69
- parent.descendants((node) => {
70
- if (!isAligned) {
71
- isAligned = node.hasMarkup(selectedAlignment)
72
- }
73
- })
74
- if (isAligned) {
75
- break
76
- }
77
- }
78
- const newAlignmentState = isAligned ? defaultAlignment : selectedAlignment
79
-
80
- ranges.forEach((range) => {
81
- const { $from, $to } = range
82
- tr = tr.setBlockType($from.pos, $to.pos, newAlignmentState)
83
- })
84
- dispatch(tr)
85
- } else {
86
- const parentNodeType = getObjectValue($anchor, 'parent.type.name')
87
- const newAlignmentState =
88
- parentNodeType === getObjectValue(selectedAlignment, 'name')
89
- ? defaultAlignment
90
- : selectedAlignment
91
- setBlockType(newAlignmentState)(state, dispatch)
92
- }
93
-
94
- return true
95
- }
96
- }
97
-
98
- export { clearFormatting, toggleAlignment }
@@ -1,84 +0,0 @@
1
- // TODO: Remove this file once index.js is converted to TypeScript.
2
- export const constants = {
3
- PM_PLUGIN_KEY: string,
4
- ATTRIBUTE: {
5
- ENHANCEMENT_DATA: string,
6
- },
7
- SELECTORS: {
8
- RICH_TEXT_AREA: string,
9
- },
10
- STYLES: {
11
- DISPLAY_NONE: string,
12
- },
13
- EVENTS: {
14
- CLICK: string,
15
- KEYDOWN: string,
16
- MOUSEOVER: string,
17
- MOUSEOUT: string,
18
- DBLCLICK: string,
19
- },
20
- CLASSES: {
21
- CMS_ALIGN_LEFT: string,
22
- RTE_ALIGN_LEFT: string,
23
- CMS_ALIGN_RIGHT: string,
24
- RTE_ALIGN_RIGHT: string,
25
- CMS_ALIGN_CENTER: string,
26
- RTE_ALIGN_CENTER: string,
27
- RTE_LIST_ORDERED: string,
28
- RTE_LIST_UNORDERED: string,
29
- CMS_LIST_ITEM_DIV: string,
30
- CMS_LI_LIST_ITEM_DIV: string,
31
- RTE_CORE_LINK: string,
32
- RTE_CORE_ELEMENT_START: string,
33
- RTE_CORE_ELEMENT_END: string,
34
- ENHANCEMENT: string,
35
- PM_AVATAR_WRAPPER: string,
36
- IS_PLACEHOLDER_CONTENT: string,
37
- },
38
- ELEMENTS: {
39
- DIV: string,
40
- OL: string,
41
- UL: string,
42
- LI: string,
43
- A: string,
44
- SPAN: string,
45
- },
46
- KEY_MAPPINGS: {
47
- MOD_Z: string,
48
- SHIFT_MOD_Z: string,
49
- MOD_Y: string,
50
- MOD_B: string,
51
- MOD_I: string,
52
- MOD_U: string,
53
- BACKSPACE: string,
54
- DELETE: string,
55
- ESCAPE: string,
56
- STRIKE: string,
57
- SUP: string,
58
- SUB: string,
59
- CLEAR: string,
60
- },
61
- NODES: {
62
- LISTS: {
63
- ol: string,
64
- ul: string,
65
- listItem: string,
66
- listItemDiv: string,
67
- },
68
- ALIGNED: {
69
- alignedLeft: string,
70
- alignedCenter: string,
71
- alignedRight: string,
72
- },
73
- TEXT: {
74
- text: string,
75
- },
76
- GROUPS: {
77
- block: string,
78
- inline: string,
79
- aligned: string,
80
- list: string,
81
- listItem: string,
82
- },
83
- },
84
- }
@@ -1,87 +0,0 @@
1
- const constants = {
2
- PM_PLUGIN_SUFFIX: '$',
3
- ATTRIBUTES: {
4
- ENHANCEMENT_DATA: 'enhancement-data',
5
- },
6
- SELECTORS: {
7
- RICH_TEXT_AREA: '.richtext',
8
- },
9
- STYLES: {
10
- DISPLAY_NONE: 'display: none',
11
- },
12
- EVENTS: {
13
- CLICK: 'click',
14
- KEYDOWN: 'keydown',
15
- MOUSEOVER: 'mouseover',
16
- MOUSEOUT: 'mouseout',
17
- DBLCLICK: 'dblclick',
18
- },
19
- CLASSES: {
20
- CMS_ALIGN_LEFT: 'cms-textAlign-left',
21
- RTE_ALIGN_LEFT: 'rte2-style-align-left',
22
- CMS_ALIGN_RIGHT: 'cms-textAlign-right',
23
- RTE_ALIGN_RIGHT: 'rte2-style-align-right',
24
- CMS_ALIGN_CENTER: 'cms-textAlign-center',
25
- RTE_ALIGN_CENTER: 'rte2-style-align-center',
26
- RTE_LIST_ORDERED: 'rte2-style-ol',
27
- RTE_LIST_UNORDERED: 'rte2-style-ul',
28
- CMS_LIST_ITEM_DIV: 'cms-list-item-div',
29
- CMS_LI_LIST_ITEM_DIV: 'li-cms-list-item-div',
30
- RTE_CORE_LINK: 'rte2-style-brightspot-core-link-LinkRichTextElement',
31
- RTE_CORE_ELEMENT_START:
32
- 'rte2-style-brightspot-core-link-LinkRichTextElement-start',
33
- RTE_CORE_ELEMENT_END:
34
- 'rte2-style-brightspot-core-link-LinkRichTextElement-end',
35
- ENHANCEMENT: 'Enhancement',
36
- PM_AVATAR_WRAPPER: 'ProseMirrorAvatarWrapper',
37
- IS_PLACEHOLDER_CONTENT: 'isPlaceholderContent',
38
- },
39
- ELEMENTS: {
40
- DIV: 'div',
41
- OL: 'ol',
42
- UL: 'ul',
43
- LI: 'li',
44
- A: 'a',
45
- SPAN: 'span',
46
- },
47
- KEY_MAPPINGS: {
48
- MOD_Z: 'Mod-z',
49
- SHIFT_MOD_Z: 'Shift-Mod-z',
50
- MOD_Y: 'Mod-y',
51
- MOD_B: 'Mod-b',
52
- MOD_I: 'Mod-i',
53
- MOD_U: 'Mod-u',
54
- BACKSPACE: 'Backspace',
55
- DELETE: 'Delete',
56
- ESCAPE: 'Escape',
57
- STRIKE: 'Mod-Shift-s',
58
- SUP: 'Mod-.',
59
- SUB: 'Mod-,',
60
- CLEAR: 'Mod-f',
61
- },
62
- NODES: {
63
- LISTS: {
64
- ol: 'ol',
65
- ul: 'ul',
66
- listItem: 'listItem',
67
- listItemDiv: 'listItemDiv',
68
- },
69
- ALIGNED: {
70
- alignedLeft: 'alignLeft',
71
- alignedCenter: 'alignCenter',
72
- alignedRight: 'alignRight',
73
- },
74
- TEXT: {
75
- text: 'text',
76
- },
77
- GROUPS: {
78
- block: 'block',
79
- inline: 'inline',
80
- aligned: 'aligned',
81
- list: 'list',
82
- listItem: 'listItem',
83
- },
84
- },
85
- }
86
-
87
- export { constants }
@@ -1,13 +0,0 @@
1
- import { buildSchemaFromConfig } from './schemaBuilder'
2
- import { constants } from './constants'
3
- import { clearFormatting } from './commands'
4
- import { buildMenuItemsFromConfig } from './menuItemsBuilder'
5
- import { buildKeymap } from './keymapBuilder'
6
-
7
- export {
8
- constants,
9
- clearFormatting,
10
- buildMenuItemsFromConfig,
11
- buildKeymap,
12
- buildSchemaFromConfig,
13
- }
@@ -1,223 +0,0 @@
1
- /* eslint-disable no-debugger */
2
- import {
3
- chainCommands,
4
- newlineInCode,
5
- createParagraphNear,
6
- liftEmptyBlock,
7
- toggleMark,
8
- splitBlock,
9
- splitBlockKeepMarks,
10
- } from 'prosemirror-commands'
11
- import { undo, redo } from 'prosemirror-history'
12
- import { clearFormatting, toggleAlignment } from './commands'
13
- import { constants } from './constants'
14
- import {
15
- liftListItem,
16
- sinkListItem,
17
- splitListItem,
18
- } from 'prosemirror-schema-list'
19
-
20
- const hasNavigator = typeof navigator !== 'undefined'
21
- const isMac = hasNavigator ? /Mac/.test(navigator.platform) : false
22
-
23
- // Maps schema mark name to array of key binding(s). [0] = Win|both, [1] = Mac
24
- const KEY_MAPPINGS = {
25
- bold: ['Mod-b'],
26
- italic: ['Mod-i'],
27
- underline: ['Mod-u'],
28
- strikethrough: ['Ctrl-Alt-x', 'Cmd-Shift-x'],
29
- superscript: ['Ctrl-Shift-+', 'Cmd-.'],
30
- subscript: ['Ctrl-=', 'Cmd-,'],
31
- html: ['Ctrl-Shift-c'],
32
- comment: ["Ctrl-Shift-'"],
33
- clear: ['Ctrl-Space', 'Cmd-\\'],
34
- undo: ['Mod-z'],
35
- redo: ['Mod-y', 'Mod-Shift-z'],
36
- alignLeft: ['Ctrl-Alt-l', 'Cmd-Shift-l'],
37
- alignCenter: ['Ctrl-Alt-e', 'Cmd-Shift-e'],
38
- alignRight: ['Ctrl-Alt-r', 'Cmd-Shift-r'],
39
- unicodeKeyboard: ['Mod-Shift-k'],
40
- find: ['Mod-f'],
41
- fullscreen: ['Mod-Shift-f'],
42
- ul: ['Mod-Shift-8'],
43
- ol: ['Mod-Shift-7'],
44
- indent: ['Ctrl-]'],
45
- outdent: ['Ctrl-['],
46
- }
47
-
48
- // Returns true if menuItems contains a className value ending with the normalized name.
49
- function hasMenubarItem(name, menuItems) {
50
- if (menuItems) {
51
- let normalizedName = name.replace(/[A-Z]/g, '-$&').toLowerCase()
52
-
53
- return (
54
- menuItems
55
- .flatMap((item) => item.items)
56
- .flatMap((button) => button.dom.className)
57
- .findIndex((name) => name.endsWith(normalizedName)) !== -1
58
- )
59
- }
60
- return false
61
- }
62
-
63
- // Captures 'Enter' key presses differentiating between when in a list or not.
64
- function handleEnter(createParagraphOnEnter) {
65
- return (EditorState, dispatch) => {
66
- const listItemType = EditorState.schema.nodes.listItem
67
- const grandParent = EditorState.selection.$from.node(-1)
68
-
69
- if (
70
- listItemType &&
71
- grandParent &&
72
- listItemType === EditorState.selection.$from.node(-1).type
73
- ) {
74
- return splitListItem(listItemType)(EditorState, dispatch)
75
- }
76
- // Note that 'splitBlockKeepMarks' is used to preserve marks after 'Enter' and all other
77
- // commands and their ordering are the default provided by ProseMirror.
78
- chainCommands(
79
- newlineInCode,
80
- createParagraphNear,
81
- liftEmptyBlock,
82
- createParagraphOnEnter
83
- ? (state, dispatch) => {
84
- return splitBlock(
85
- state,
86
- dispatch &&
87
- ((tr) => {
88
- const marks =
89
- state.storedMarks ||
90
- (state.selection.$to.parentOffset &&
91
- state.selection.$from.marks())
92
-
93
- state.selection.replaceWith(
94
- tr,
95
- EditorState.schema.nodes.line.create(),
96
- )
97
-
98
- if (marks) {
99
- tr.ensureMarks(marks)
100
- }
101
-
102
- dispatch(tr)
103
- }),
104
- )
105
- }
106
- : splitBlockKeepMarks,
107
- )(EditorState, dispatch)
108
- return true
109
- }
110
- }
111
-
112
- /**
113
- * Returns key mapping string based on users platform (Win|Mac).
114
- *
115
- * @param {*} name of mark defined in schema.
116
- */
117
- export function findKeyMapping(name) {
118
- let mapping = KEY_MAPPINGS[name]
119
- return !mapping
120
- ? undefined
121
- : mapping.length === 2
122
- ? isMac
123
- ? mapping[1]
124
- : mapping[0]
125
- : mapping[0]
126
- }
127
-
128
- /**
129
- * This is a little bit of a hack for key bindings that defer to an item in the menubar.
130
- * To conform to that API, the keymap trigger triggers a click on the corresponding menu
131
- * icon to insert the enhancement instead of calling the command directly.
132
- *
133
- * @param {string} className The class name of the menu icon to 'click'
134
- */
135
- export function keyMappingHandler(className) {
136
- return function (state, dispatch, editorView) {
137
- const menuPluginView = editorView.pluginViews.find((view) => {
138
- return view.myKey === `menubar${constants.PM_PLUGIN_SUFFIX}`
139
- })
140
- const menuIcon = menuPluginView.dom.getElementsByClassName(className)[0]
141
- if (menuIcon) {
142
- menuIcon.click()
143
- }
144
- }
145
- }
146
-
147
- export function buildKeymap(options, mapKeys) {
148
- const schema = options.schema
149
- let keys = {}
150
- let type
151
-
152
- function bind(key, cmd) {
153
- if (mapKeys) {
154
- let mapped = mapKeys[key]
155
- if (mapped === false) return
156
- if (mapped) key = mapped
157
- }
158
- keys[key] = cmd
159
- }
160
-
161
- // Windows with CapsLock enabled sends key as uppercase so will need to bind both.
162
- function bindAsUppercase(name, command) {
163
- if (!isMac) {
164
- bind(findKeyMapping(name).toUpperCase(), command)
165
- }
166
- }
167
-
168
- bind(findKeyMapping('undo'), undo)
169
- bindAsUppercase('undo', undo)
170
- bind(findKeyMapping('redo'), redo)
171
- bindAsUppercase('redo', redo)
172
- bind(findKeyMapping('clear'), (EditorState, dispatch) => {
173
- clearFormatting()(EditorState, dispatch)
174
- })
175
-
176
- // Bind key mappings to existing ProseMirror commands.
177
- ;[
178
- 'bold',
179
- 'italic',
180
- 'underline',
181
- 'strikethrough',
182
- 'superscript',
183
- 'subscript',
184
- ].forEach((markName) => {
185
- if ((type = schema.marks[markName])) {
186
- bind(findKeyMapping(type.name), toggleMark(type))
187
- bindAsUppercase(type.name, toggleMark(type))
188
- }
189
- })
190
-
191
- keys['Enter'] = handleEnter(RTE_CREATE_PARAGRAPH_ON_ENTER)
192
-
193
- if (RTE_CREATE_PARAGRAPH_ON_ENTER) {
194
- keys['Shift-Enter'] = handleEnter(false)
195
- }
196
-
197
- if ((type = schema.nodes.listItem)) {
198
- bind(findKeyMapping('indent'), sinkListItem(type))
199
- bind(findKeyMapping('outdent'), liftListItem(type))
200
- bind('Tab', sinkListItem(type))
201
- bind('Shift-Tab', liftListItem(type))
202
- bind('Shift-Enter', (EditorState, dispatch) => {
203
- chainCommands(
204
- newlineInCode(EditorState, dispatch),
205
- createParagraphNear(EditorState, dispatch),
206
- splitBlock(EditorState, dispatch),
207
- )
208
- })
209
- }
210
-
211
- // Bind key mappings to alignment buttons in toolbar.
212
- ;['alignLeft', 'alignCenter', 'alignRight'].forEach((name) => {
213
- if (
214
- (type = schema.nodes[name]) &&
215
- hasMenubarItem(name, options.menuItems)
216
- ) {
217
- bind(findKeyMapping(name), toggleAlignment(type, schema.nodes.line))
218
- bindAsUppercase(name, toggleAlignment(type, schema.nodes.line))
219
- }
220
- })
221
-
222
- return keys
223
- }