@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,342 +0,0 @@
1
- import { Plugin, PluginKey } from 'prosemirror-state'
2
- import { DecorationSet, Decoration } from 'prosemirror-view'
3
- import { keydownHandler } from 'prosemirror-keymap'
4
- import { constants } from '../../settings'
5
- import {
6
- DISTANCE_FROM_LIST_ITEM_TO_NEAREST_CHILD_BLOCK,
7
- ACTIONS,
8
- } from './constants'
9
- import { getEnhancementEditFormURL } from '../enhancement_manager/EnhancementManager'
10
- import { getIsInAList } from '../../utilities'
11
- import { findKeyMapping, keyMappingHandler } from '../../settings/keymapBuilder'
12
- import { html, render } from 'lit-html'
13
- import { v1 as uuidv1 } from 'uuid'
14
- import create from '../../../dom/create'
15
-
16
- if (!window.BRIGHTSPOT?.ui.cms.enableV5UI) {
17
- await import('./ListManager.less')
18
- }
19
-
20
- const key = new PluginKey('listManager')
21
- const keyHandler = {}
22
-
23
- keyHandler[findKeyMapping('ul')] = keyMappingHandler('rte2-toolbar-ul')
24
- keyHandler[findKeyMapping('ol')] = keyMappingHandler('rte2-toolbar-ol')
25
-
26
- /**
27
- * Lists' Magic States
28
- *
29
- * The following are states that a selection can be in
30
- * regarding lists. They are tightly coupled with an RTE
31
- * schema implementation to avoid code complexity, and
32
- * subsequently modifying the schema can impact the method of
33
- * determining a selection's state. We are abstracting this out
34
- * into methods in one spot for that reason.
35
- *
36
- * This also makes the code human-readable by giving the
37
- * methods names that correspond to a state. Selection state
38
- * regarding lists is derived by math (ranges, depths, etc),
39
- * equations, which can be difficult to read/understand quickly.
40
- */
41
-
42
- /**
43
- * Determines if the selection is pointing to the top level
44
- * list item in a list. When in this state, there are certain
45
- * rules the RTE should follow (e.g. the top level list item
46
- * can not be indented any further than it is).
47
- *
48
- * @param {Prosemirror.ResolvedPos} $from
49
- * @param {boolean} empty
50
- * @param {Prosemirror.NodeRange} range
51
- * @return {boolean}
52
- */
53
- const getIsTopOfExistingListItem = ($from, empty, range) => {
54
- if (
55
- empty ||
56
- (range && range.parent.type.name === constants.NODES.LISTS.listItem)
57
- ) {
58
- const distance = DISTANCE_FROM_LIST_ITEM_TO_NEAREST_CHILD_BLOCK
59
- return $from.index(range.depth - distance) === 0
60
- }
61
-
62
- return $from.index(range.depth) === 0
63
- }
64
-
65
- /**
66
- * Builds a map of compatible actions for the
67
- * current Editor selection.
68
- *
69
- * @param {Prosemirror.EditorState} state
70
- * @return {Map<string.<boolean>>} Map of actions to
71
- * a boolean. True indictes action is compatible.
72
- */
73
- const getCompatibleActions = (state) => {
74
- const { $from, $to, empty } = state.selection
75
- const range = $from.blockRange($to)
76
-
77
- const actionItems = ACTIONS.map((action) => {
78
- const isInAList = getIsInAList(range)
79
-
80
- if (!isInAList) {
81
- return [action, false]
82
- }
83
-
84
- switch (action) {
85
- case 'indent': {
86
- const isTopOfExistingListItem = getIsTopOfExistingListItem(
87
- $from,
88
- empty,
89
- range,
90
- )
91
-
92
- if (isTopOfExistingListItem) {
93
- return [action, false]
94
- }
95
-
96
- return [action, true]
97
- }
98
-
99
- case 'outdent':
100
- return [action, true]
101
-
102
- default:
103
- return [action, false]
104
- }
105
- })
106
-
107
- return new Map(actionItems)
108
- }
109
-
110
- /**
111
- * Builds the new state map for this plugin.
112
- *
113
- * @param {Map} compatibleActions
114
- */
115
- const getNewStateMap = (compatibleActions, decos) => {
116
- const state = new Map()
117
- state.set('compatibleActions', compatibleActions)
118
- state.set('decos', decos)
119
- return state
120
- }
121
-
122
- /**
123
- * This plugin manages unordered and ordered list nodes, their child
124
- * nodes, and actions. It knows what menu icons to enable and disable,
125
- * what nodes are compatible and imcompatible, and how to behave when
126
- * the state of the Editor changes.
127
- *
128
- * It currently only keeps track in its state compatible nodes and
129
- * compatible actions, which the menu plugin uses to enable and disable,
130
- * highlight, etc, menu icons.
131
- */
132
- const listManagerPlugin = (schema) => {
133
- return new Plugin({
134
- key,
135
-
136
- state: {
137
- init(_, state) {
138
- const compatibleActions = new Map()
139
- return getNewStateMap(compatibleActions)
140
- },
141
-
142
- apply(transaction, value, oldState, newState) {
143
- const compatibleActions = getCompatibleActions(newState)
144
- const pluginState = getNewStateMap(compatibleActions)
145
-
146
- const selection = newState.selection
147
- let depth = selection.$from.depth
148
-
149
- // Check if an 'ol' or 'ul' Rich Text Element exists and if so add edit decorator.
150
- for (let i = 1; i < depth; i++) {
151
- const parent = selection.$from.node(i)
152
-
153
- if (
154
- parent &&
155
- (parent.type.name === 'ol' || parent.type.name === 'ul')
156
- ) {
157
- const listEnhancement = RICH_TEXT_ELEMENTS_PM.find(
158
- (obj) => obj.tag === parent.type.name,
159
- )
160
-
161
- if (!listEnhancement) {
162
- break
163
- }
164
-
165
- const pos = selection.$from.before(i)
166
-
167
- pluginState.set(
168
- 'decos',
169
- DecorationSet.create(newState.doc, [
170
- Decoration.widget(
171
- pos,
172
- (view, getPos) => {
173
- const widget = create('div', {
174
- class: 'ListManager-edit',
175
- })
176
- render(
177
- editTemplate(view, pos, parent, listEnhancement),
178
- widget,
179
- )
180
-
181
- return widget
182
- },
183
- {
184
- ignoreSelection: true,
185
- },
186
- ),
187
- ]),
188
- )
189
- return pluginState
190
- }
191
- }
192
-
193
- return pluginState
194
- },
195
- },
196
- props: {
197
- handleKeyDown: keydownHandler(keyHandler),
198
- handleDoubleClickOn: (view, pos, node, nodePos, event, direct) => {
199
- if (
200
- node.type.name === 'ol' &&
201
- event.target.nodeName.toLowerCase() === 'li'
202
- ) {
203
- const pluginState = view.state[key.key]
204
-
205
- pluginState.set(
206
- 'decos',
207
- DecorationSet.create(view.state.doc, [
208
- Decoration.widget(
209
- pos,
210
- (view, getPos) => {
211
- const widget = create('div', { class: 'ListManager-widget' })
212
- render(template(view, pos, node), widget)
213
- setTimeout(() => {
214
- widget.scrollIntoView({
215
- behavior: 'smooth',
216
- block: 'center',
217
- })
218
- }, 300)
219
- return widget
220
- },
221
- {
222
- stopEvent: (evt) => {
223
- return true
224
- },
225
- ignoreSelection: true,
226
- },
227
- ),
228
- ]),
229
- )
230
-
231
- return true
232
- }
233
- return false
234
- },
235
- decorations: (state) => {
236
- const pluginState = state[key.key]
237
- if (pluginState) {
238
- return pluginState.get('decos')
239
- }
240
- return null
241
- },
242
- },
243
- })
244
- }
245
-
246
- function editTemplate(view, pos, parent, listEnhancement) {
247
- // get enhancement url
248
- let url = getEnhancementEditFormURL(listEnhancement.typeId, view.dom)
249
-
250
- url += `&attributes=${encodeURIComponent(
251
- JSON.stringify(parent.attrs.attributes),
252
- )}`
253
-
254
- const tempId = uuidv1()
255
-
256
- return html`<div class="ProsemirrorEnhancementMenu-container">
257
- <span class="ProsemirrorEnhancementMenu-container-label"
258
- >${listEnhancement.displayName}</span
259
- ><a
260
- @click=${(e) => handleEditClick(e, view, pos, tempId)}
261
- href="${url}"
262
- target="${tempId}"
263
- data-event-id="${tempId}"
264
- data-frame-post="true"
265
- class="ProsemirrorEnhancementMenu-container-button edit"
266
- data-icon="edit"
267
- title="${window.BRIGHTSPOT.ui.tooltips.edit}"
268
- tabindex="0"
269
- >${window.BRIGHTSPOT.ui.tooltips.edit}</a
270
- >
271
- </div>`
272
- }
273
-
274
- function handleEditClick(e, view, pos, tempId) {
275
- PubSub.subscribe(tempId, (incomingData) => {
276
- const tr = view.state.tr
277
- const parentNode = view.state.doc.nodeAt(pos)
278
-
279
- tr.setNodeMarkup(pos, null, {
280
- ...parentNode.attrs,
281
- attributes: incomingData.data,
282
- })
283
- view.dispatch(tr)
284
- })
285
- }
286
-
287
- function handleOk(e, view, pos, node) {
288
- e.preventDefault()
289
-
290
- const value = e.target
291
- .closest('.ListManager-widget')
292
- .querySelector('input').value
293
- if (value) {
294
- // Find 'ol' if not current pos
295
- while (pos > 0) {
296
- const parent = view.docView.node.nodeAt(--pos)
297
- if (parent?.type?.name === 'ol') {
298
- break
299
- }
300
- }
301
-
302
- const tr = view.state.tr
303
- tr.setNodeMarkup(pos, node.type, { ...node.attrs, order: value })
304
- view.dispatch(tr)
305
- }
306
- }
307
-
308
- function handleCancel(e, view) {
309
- e.preventDefault()
310
- const tr = view.state.tr
311
- view.dispatch(tr)
312
- }
313
-
314
- function template(view, pos, node) {
315
- return html`<h1 class="Widget-title">
316
- ${window.BRIGHTSPOT?.ui?.rte?.olWidgetTitle || 'Reset Number'}
317
- </h1>
318
- <a
319
- class="Widget-close"
320
- @click=${(e) => handleCancel(e, view)}
321
- title="${window.BRIGHTSPOT?.ui?.rte?.buttonCancel || 'Cancel'}"
322
- >${window.BRIGHTSPOT?.ui?.rte?.buttonCancel || 'Cancel'}</a
323
- >
324
- <div class="Widget-container">
325
- <input
326
- type="number"
327
- name="start"
328
- value="${node.attrs.order || 1}"
329
- data-hide-word-count="true"
330
- />
331
- <div class="Widget-controls">
332
- <button @click=${(e) => handleOk(e, view, pos, node)}>
333
- ${window.BRIGHTSPOT?.ui?.rte?.buttonOk || 'Save'}
334
- </button>
335
- <button @click=${(e) => handleCancel(e, view)}>
336
- ${window.BRIGHTSPOT?.ui?.rte?.buttonCancel || 'Cancel'}
337
- </button>
338
- </div>
339
- </div>`
340
- }
341
-
342
- export { listManagerPlugin, getCompatibleActions }
@@ -1,50 +0,0 @@
1
- # Brightspot Rich Text Editor List Manager Plugin
2
-
3
- Extends Prosemirror to allow users to create ordered and unordered lists in the RTE, as well as perform common actions on those list items (e.g. indent, outdent, etc).
4
-
5
- ## Table of Contents
6
-
7
- 1. [Must Knows](#must-knows)
8
- 2. [Usage](#usage)
9
- 3. [Component and Directory Structure](#component-and-directory-structure)
10
- 1. [Commands](#commands)
11
- 2. [Constants](#constants)
12
- 3. [List Manager Plugin](#list-manager-plugin)
13
-
14
- ## Must Knows
15
-
16
- 1. The Prosemirror list plugin is used as the base for this plugin, and that plugin only supports a schema architecture of something like:
17
- a. List
18
- b. List Item
19
- c. Block Element
20
- d. Content
21
- 2. Traversing around the RTE to perform actions such as wrapping content in a list node or indenting and outdenting requires knowing nodes' positions. Determining positions are tightly coupled with the math involved in evaluating the schema and the current state of the Editor (in particular the depth of node ranges). This creates magic states and magic numbers and subsequently difficult-to-read code. To help with code maintenance, magic numbers are abstracted into constants and state detection is abstracted into methods in 1 spot. Should schema changes occur, updating this plugin should be localized to these constants and methods.
22
-
23
- ## Usage
24
-
25
- 1. Because they are a part of configuration for the RTE, the menu items configuration file lives in the `settings` directory. See the ReadMe there for more information on extending the default configuration.
26
-
27
- ## Component and Directory Structure
28
-
29
- ### Commands
30
-
31
- This is where all state mutations should occur. Commands are exposed to the RTE api and can be triggered from anywhere in the RTE, such as menu icons and keyboard commands.
32
-
33
- The following scenarios are supported:
34
-
35
- 1. User can select 1 or multiple text blocks and wrap them in a list.
36
- 2. User can swap ordered list items for unordered lists and vice versa. If the user selects list content across different
37
- hierarchical lists, the top most list will be converted.
38
- 3. User can indent any list item as long as it's not at the top of a list. User can indent one or many items at a time. Like the list conversions, hierarchical crossings are possible.
39
- 4. The user can outdent any list item. A list item in the root of the list that is outdented will become a text block and be moved out of the list. If this is a list item in the middle of a list, this will split the list into two -- one before and one after the newly outdented text.
40
- 5. Select All and selecting across mixed types of content is not allowed.
41
-
42
- ### Constants
43
-
44
- Constants localized to the list plugin.
45
-
46
- ### List Manager Plugin
47
-
48
- The state management aspect of the plugin, which is also what is registered with the plugin setup. Currently we only manage state for compatible actions and nodes, which is useful for the menu plugin.
49
-
50
- _Note_: Updating state always means creating a new state derived from the old state + changes. State should always remain immutable.
@@ -1,207 +0,0 @@
1
- /* eslint-disable no-debugger */
2
- import { constants } from '../../settings'
3
- import { wrapInList, liftListItem } from 'prosemirror-schema-list'
4
- import { getIsInAList } from '../../utilities'
5
- import { autoJoin } from 'prosemirror-commands'
6
- import { findWrapping, canSplit } from 'prosemirror-transform'
7
-
8
- /**
9
- * Converts all direct descendants in a selection that
10
- * are textblock nodes to a listItem div node. This is
11
- * needed to wrap the content in a list.
12
- *
13
- * @param {Prosemirror.EditorView} editorView
14
- * @return {booleab} True if intended action completed.
15
- */
16
- const convertNode = (editorView) => {
17
- const state = editorView.state
18
- const transaction = state.tr
19
- const { from, to } = state.selection
20
- const schema = state.config.schema
21
-
22
- state.doc.nodesBetween(from, to, (node, position) => {
23
- if (node.isTextblock) {
24
- transaction.setNodeMarkup(position, schema.nodes.line)
25
- }
26
-
27
- return false
28
- })
29
-
30
- const newState = state.apply(transaction)
31
- editorView.updateState(newState)
32
-
33
- return true
34
- }
35
-
36
- /**
37
- * Reduces the indent of a list item. This is how the user
38
- * can convert a list item back to a text node if the node
39
- * after outdent is at the doc root level.
40
- *
41
- * @param {Prosemiror.NodeType} nodeType
42
- * @return {boolean} True if the action completed.
43
- */
44
- const outdentListItem = (nodeType) => {
45
- return function (state, dispatch, editorView) {
46
- liftListItem(nodeType)(state, dispatch)
47
-
48
- const { $from, $to } = editorView.state.selection
49
- const range = $from.blockRange($to)
50
-
51
- if (constants.NODES.LISTS[range.parent.type.name] == null) {
52
- convertNode(editorView, dispatch)
53
- }
54
-
55
- return true
56
- }
57
- }
58
-
59
- const wrapMixedList = (listType) => {
60
- return function (state, dispatch) {
61
- let tr = state.tr
62
- const { $from, $to, from } = state.selection
63
- const range = $from.blockRange($to)
64
- let parent = range.parent
65
- const wrappers = findWrapping(range, listType)
66
- const firstChildSelection = parent.child(range.startIndex)
67
- let innerRange = range
68
- if (firstChildSelection.type.name === listType.name) {
69
- const $pos = state.doc.resolve(
70
- range.start + parent.child(range.startIndex).nodeSize,
71
- )
72
- innerRange = $pos.blockRange($to)
73
- }
74
-
75
- tr = tr.wrap(innerRange, wrappers)
76
- let splitPos = innerRange.start + wrappers.length
77
- for (
78
- let i = innerRange.startIndex, first = true;
79
- i < innerRange.endIndex;
80
- i++, first = false
81
- ) {
82
- if (
83
- !first &&
84
- canSplit(tr.doc, splitPos, 1) &&
85
- parent.child(i).type.name !== listType.name
86
- ) {
87
- tr.split(splitPos, 1)
88
- splitPos += 2
89
- }
90
- splitPos += parent.child(i).nodeSize
91
- }
92
- dispatch(tr)
93
- return true
94
- }
95
- }
96
-
97
- /**
98
- * Toggles Lists and list items.
99
- *
100
- * 1. When the cursor is positioned on an item that's bulleted:
101
- * 1. If the user clicks on `Bulleted List`, lifts the list item up,
102
- * which could convert the item to a plain line if it's at the
103
- * outermost list level. Will split the list in 2 if the item is not first
104
- * or last.
105
- * 2. If the user clicks on `Numbered List`, converts the entire list
106
- * (but not nested lists) into a numbered list.
107
- * 2. When the cursor is positioned on an item that's numbered:
108
- * 1. If the user clicks on `Numbered List`, lifts the list item up,
109
- * which could convert the item to a plain line if it's at the
110
- * outermost list level. Will split the list in 2 if the item is not first
111
- * or last.
112
- * 2. If the user clicks on `Bulleted List`, converts the entire list
113
- * (but not nested lists) into a bulleted list.
114
- * 3. When a range of bulleted items has been selected:
115
- * 1. If the user clicks on `Bulleted List`, all the highlighted items, including
116
- * their nested lists, are lifted up.
117
- * 2. If the user clicks on `Numbered List` and only a portion of the list is highlighted,
118
- * the list is converted to a numbered list but any nested lists are not converted.
119
- * 3. If the user clicks on `Numbered List` and the whole list is highlighted,
120
- * the list is converted to a numbered list as well as any nested lists.
121
- * 4. When a range of numbered items has been selected:
122
- * 1. If the user clicks on `Numbered List`, all the highlighted items, including
123
- * their nested lists, are lifted up.
124
- * 2. If the user clicks on `Bulleted List` and only a portion of the list is highlighted,
125
- * the list is converted to a bulleted list but any nested lists are not converted.
126
- * 3. If the user clicks on `Bulleted List` and the whole list is highlighted,
127
- * the list is converted to a bulleted list as well as any nested lists.
128
- * 5. If the user is not in a list, converts the selected items to the list type that the
129
- * user selected.
130
- *
131
- * @param {ProseMirror.Node.type} listType The node type being toggled
132
- */
133
- const toggleListItem = (listType) => {
134
- return function (state, dispatch) {
135
- const { $from, $to, empty, from, to } = state.selection
136
- const range = $from.blockRange($to)
137
- const isInAList = getIsInAList(range)
138
- if (isInAList) {
139
- let currentListType = null
140
- let grandparentType = null
141
- if (empty) {
142
- currentListType = $from.node(range.depth - 1).type
143
- grandparentType = $from.node(range.depth - 2).type
144
- } else {
145
- currentListType = $from.node(range.depth).type
146
- grandparentType = $from.node(range.depth - 1).type
147
- }
148
- if (
149
- currentListType.name === listType.name ||
150
- (!empty && grandparentType.name === listType.name)
151
- ) {
152
- liftListItem(state.schema.nodes.listItem)(state, dispatch)
153
- } else {
154
- let tr = state.tr
155
- if (empty) {
156
- tr = tr.setNodeMarkup(
157
- $from.before(range.depth - 1),
158
- state.schema.nodes[listType.name],
159
- )
160
- } else {
161
- const parentType = $from.node(range.depth).type
162
- let nodePos = $from.before(range.depth)
163
- if (parentType.name === 'listItem') {
164
- nodePos = $from.before(range.depth - 1)
165
- }
166
- tr = tr.setNodeMarkup(nodePos, state.schema.nodes[listType.name])
167
- const parent = $from.node(range.depth)
168
- const parentName = parent.type.name
169
- if (parentName === 'ul' || parentName === 'ol') {
170
- parent.descendants((node, pos, parent) => {
171
- const childNodeName = node.type.name
172
- if (
173
- (childNodeName === 'ul' || childNodeName === 'ol') &&
174
- childNodeName !== listType.name &&
175
- pos >= from &&
176
- pos <= to
177
- ) {
178
- tr = tr.setNodeMarkup(
179
- pos + 1,
180
- state.schema.nodes[listType.name],
181
- )
182
- }
183
- })
184
- }
185
- }
186
- dispatch(tr)
187
- }
188
- } else {
189
- const parent = $from.node(range.depth)
190
- let listNodes = []
191
- parent.forEach((node, offset, index) => {
192
- if (index >= range.startIndex && index <= range.endIndex) {
193
- if (node.type.name === listType.name) {
194
- listNodes.push(node)
195
- }
196
- }
197
- })
198
- const command =
199
- listNodes.length && listNodes.length !== parent.childCount
200
- ? wrapMixedList(listType)
201
- : wrapInList(listType)
202
- autoJoin(command, ['ol', 'ul'])(state, dispatch)
203
- }
204
- }
205
- }
206
-
207
- export { outdentListItem, toggleListItem }
@@ -1,26 +0,0 @@
1
- import { constants } from '../../settings/constants'
2
-
3
- // const LIST_TEXT_BLOCK_NODE = schema.nodes[constants.NODES.LISTS.listItemDiv]
4
-
5
- const GROUP_LIST = constants.NODES.GROUPS.list
6
- const ACTIONS = ['indent', 'outdent']
7
-
8
- /**
9
- * Lists' Magic Numbers
10
- *
11
- * The following are numbers that help with determining node
12
- * position related to lists. They are tightly coupled with an RTE
13
- * schema implementation to avoid code complexity, and
14
- * subsequently modifying the schema can impact the method of
15
- * determining a selection's state. We are abstracting this out
16
- * into constants in one spot for that reason.
17
- */
18
-
19
- const DISTANCE_FROM_LIST_ITEM_TO_NEAREST_CHILD_BLOCK = 1
20
-
21
- export {
22
- // LIST_TEXT_BLOCK_NODE,
23
- GROUP_LIST,
24
- DISTANCE_FROM_LIST_ITEM_TO_NEAREST_CHILD_BLOCK,
25
- ACTIONS,
26
- }
@@ -1,4 +0,0 @@
1
- import { outdentListItem, toggleListItem } from './commands'
2
- import { listManagerPlugin } from './ListManager'
3
-
4
- export { listManagerPlugin, outdentListItem, toggleListItem }