@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.
- package/README.md +54 -35
- package/dist/custom-elements.json +2536 -2536
- package/dist/storybook/assets/{ActionBar.stories-BhdqLyzJ.js → ActionBar.stories-CSxtZl7v.js} +1 -1
- package/dist/storybook/assets/{ActionItem.stories-17zjMCkO.js → ActionItem.stories-BWcMRMP3.js} +1 -1
- package/dist/storybook/assets/{Avatar.stories-C5m3-zOH.js → Avatar.stories-CYTUGXzH.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup.stories-DE88PJ6w.js → AvatarGroup.stories-CSYBYo_5.js} +1 -1
- package/dist/storybook/assets/{Badge.stories-D905HmvO.js → Badge.stories-LuF4BuVr.js} +1 -1
- package/dist/storybook/assets/{Button-ANyLESGb.js → Button-CrXCMxHb.js} +1 -1
- package/dist/storybook/assets/{Button.stories-DbH6q5L3.js → Button.stories-JVwxdrdM.js} +1 -1
- package/dist/storybook/assets/{ButtonGroup.stories-loqgAB7p.js → ButtonGroup.stories-qtq64a1H.js} +1 -1
- package/dist/storybook/assets/{Celebrate.stories-CRO3rSgp.js → Celebrate.stories-DjTtaSd6.js} +1 -1
- package/dist/storybook/assets/{Checkbox.stories-SZtgfbFe.js → Checkbox.stories-v1Pr5mL6.js} +1 -1
- package/dist/storybook/assets/{CircularProgress.stories-VayPxO4M.js → CircularProgress.stories-DkV7PJ4D.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin.stories-0EB2O2zT.js → ClipboardMixin.stories-Dh5c7uSM.js} +1 -1
- package/dist/storybook/assets/{Color-6BZIO3FS-CFpcD80i.js → Color-6BZIO3FS-B1gcREt6.js} +1 -1
- package/dist/storybook/assets/{Colors.stories-BJGM6xnp.js → Colors.stories-DnubtRqn.js} +1 -1
- package/dist/storybook/assets/{CombinedEffects.stories-DUwocYcn.js → CombinedEffects.stories-By6akSve.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin-MUqdPCf7.js → ComponentStatesMixin-CPLGv3h-.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-DjrxNwE7.js → ComponentStatesMixin.stories-CiQ_lyhm.js} +1 -1
- package/dist/storybook/assets/{CopyToClipboard.stories-DptOcPq6.js → CopyToClipboard.stories-cJ7rl3mj.js} +1 -1
- package/dist/storybook/assets/{Debounce.stories-BbcIWmhD.js → Debounce.stories-Bw-goobU.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-LL677BLK-Yy8fjeNG.js → DocsRenderer-LL677BLK-CNW57dGQ.js} +3 -3
- package/dist/storybook/assets/{Dropdown.stories-Du3LrBR6.js → Dropdown.stories-CwC3HXXd.js} +1 -1
- package/dist/storybook/assets/{EmptyState.stories-Dy9P8aOY.js → EmptyState.stories-BUEJwuhP.js} +1 -1
- package/dist/storybook/assets/{Events.stories-DvdVQxDf.js → Events.stories-D1mf9buv.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-BQ1jFOKn.js → Heading.stories-DO906G4P.js} +1 -1
- package/dist/storybook/assets/{HueRipple.stories-CrZFjnRl.js → HueRipple.stories-BOySRSZB.js} +1 -1
- package/dist/storybook/assets/{Icon.stories-C2Tj8Lx1.js → Icon.stories-BsqgTbdG.js} +1 -1
- package/dist/storybook/assets/{IconButton.stories-DFqouOJb.js → IconButton.stories-aza1AAKk.js} +1 -1
- package/dist/storybook/assets/{LinearProgress.stories-DtNw3QX3.js → LinearProgress.stories-CDYmiiex.js} +1 -1
- package/dist/storybook/assets/{Pagination.stories-CFiZ9APs.js → Pagination.stories-LXB-x7YB.js} +1 -1
- package/dist/storybook/assets/{Popover.stories-DkkTuYag.js → Popover.stories-DY1HesPJ.js} +1 -1
- package/dist/storybook/assets/{ReadyMixin-BA01Vm_B.js → ReadyMixin-DmOC67IJ.js} +1 -1
- package/dist/storybook/assets/{RovingTabindexMixin.stories-BesAqt48.js → RovingTabindexMixin.stories-BWy0Rq8d.js} +1 -1
- package/dist/storybook/assets/{Rtc.stories-iTw43rjp.js → Rtc.stories-DrmdqqbI.js} +1 -1
- package/dist/storybook/assets/{ScrollShadow.stories-QYqQCcAo.js → ScrollShadow.stories-DiKFPazh.js} +1 -1
- package/dist/storybook/assets/{Switch.stories-BKArq9Mk.js → Switch.stories-BgFnw8_z.js} +1 -1
- package/dist/storybook/assets/{Tab.stories-8UdDPvE5.js → Tab.stories-c2wLMooF.js} +1 -1
- package/dist/storybook/assets/{Tabs.stories-BPGMZ552.js → Tabs.stories-CjH8seNP.js} +1 -1
- package/dist/storybook/assets/{Throttle.stories-CYl5d0r6.js → Throttle.stories-CXysc_QE.js} +1 -1
- package/dist/storybook/assets/{Tooltip.stories-cZ0zSlwX.js → Tooltip.stories-6qzyByPm.js} +1 -1
- package/dist/storybook/assets/{Upload.stories-CPC7N0Ed.js → Upload.stories-BLxykydQ.js} +1 -1
- package/dist/storybook/assets/{UploadItem.stories-D0LClT0a.js → UploadItem.stories-CcfcqdJW.js} +1 -1
- package/dist/storybook/assets/{Welcome.stories-C8JUaRas.js → Welcome.stories-CzYS_3fH.js} +1 -1
- package/dist/storybook/assets/{Widget.stories-C1FxF24-.js → Widget.stories-Du7T4LAI.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-65CFNBJE-BMBo-fie.js → WithTooltip-65CFNBJE-D4LfXdYt.js} +1 -1
- package/dist/storybook/assets/{blocks-BTsuXRXZ.js → blocks-DR3fGePu.js} +5 -5
- package/dist/storybook/assets/{formatter-EIJCOSYU-BJ1Cwrpx.js → formatter-EIJCOSYU-Cf01216O.js} +1 -1
- package/dist/storybook/assets/if-defined-DaMmbcIU.js +1 -0
- package/dist/storybook/assets/{iframe-B3YWTqkR.js → iframe-CQArUhO8.js} +4 -4
- package/dist/storybook/assets/{iframe-BgFj0b5u.css → iframe-D0roG0J-.css} +1 -1
- package/dist/storybook/assets/{index-BBUTVEdP.js → index-B1uI_67G.js} +1 -1
- package/dist/storybook/assets/{onFind-NC0lGo-r.js → onFind-BpFkN2Rh.js} +1 -1
- package/dist/storybook/assets/{onFind.stories-CqbwQgQF.js → onFind.stories-Cxdeg69X.js} +1 -1
- package/dist/storybook/assets/{onRemove.stories-Y8Ycs77o.js → onRemove.stories-BHEWpNrE.js} +1 -1
- package/dist/storybook/assets/{onVisible.stories-CcLUE35q.js → onVisible.stories-DFJ3S_ZS.js} +1 -1
- package/dist/storybook/assets/{style-map-MSB_ngx3.js → style-map-DJ83UC3V.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-BjkjEDMG.js → syntaxhighlighter-ED5Y7EFY-zYN83mxK.js} +1 -1
- package/dist/storybook/iframe.html +2 -2
- package/dist/storybook/project.json +1 -1
- package/dist/tailwind.config.d.ts +4 -1
- package/dist/tailwind.config.d.ts.map +1 -1
- package/dist/tailwind.config.js +0 -2
- package/dist/tailwind.config.js.map +1 -1
- package/dist/tailwind.config.ts +0 -2
- package/package.json +16 -2
- package/dist/storybook/assets/if-defined-BPCd2NXs.js +0 -1
- package/src/legacy/tool-ui/src/main/resources/settings.properties +0 -1
- package/src/legacy/tool-ui/src/main/webapp/WEB-INF/web.xml +0 -81
- package/src/legacy/tool-ui/src/main/webapp/script/bsp-uploader.js +0 -170
- package/src/legacy/tool-ui/src/main/webapp/script/bsp-utils.js +0 -393
- package/src/legacy/tool-ui/src/main/webapp/script/content/layout-element.js +0 -141
- package/src/legacy/tool-ui/src/main/webapp/script/input/query.js +0 -78
- package/src/legacy/tool-ui/src/main/webapp/script/input/workflow.js +0 -718
- package/src/legacy/tool-ui/src/main/webapp/script/jquery.extra.js +0 -633
- package/src/legacy/tool-ui/src/main/webapp/script/v3/Dropbox.js +0 -18
- package/src/legacy/tool-ui/src/main/webapp/script/v3/EditFieldUpdate.js +0 -406
- package/src/legacy/tool-ui/src/main/webapp/script/v3/EditFieldUpdateCache.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/script/v3/Notification.js +0 -151
- package/src/legacy/tool-ui/src/main/webapp/script/v3/content/edit.js +0 -194
- package/src/legacy/tool-ui/src/main/webapp/script/v3/content/state.js +0 -785
- package/src/legacy/tool-ui/src/main/webapp/script/v3/csrf.js +0 -35
- package/src/legacy/tool-ui/src/main/webapp/script/v3/dashboard.js +0 -65
- package/src/legacy/tool-ui/src/main/webapp/script/v3/input/dataTransfer.js +0 -129
- package/src/legacy/tool-ui/src/main/webapp/script/v3/input/file.js +0 -433
- package/src/legacy/tool-ui/src/main/webapp/script/v3/input/object.js +0 -743
- package/src/legacy/tool-ui/src/main/webapp/script/v3/input/read-only.js +0 -17
- package/src/legacy/tool-ui/src/main/webapp/script/v3/jquery.frame.js +0 -478
- package/src/legacy/tool-ui/src/main/webapp/script/v3/jquery.repeatable.js +0 -2406
- package/src/legacy/tool-ui/src/main/webapp/script/v3/plugin/popup.d.ts +0 -2
- package/src/legacy/tool-ui/src/main/webapp/script/v3/plugin/popup.js +0 -446
- package/src/legacy/tool-ui/src/main/webapp/script/v3/search-filters.js +0 -62
- package/src/legacy/tool-ui/src/main/webapp/script/v3/search.js +0 -53
- package/src/legacy/tool-ui/src/main/webapp/script/v3.js +0 -1049
- package/src/legacy/tool-ui/src/main/webapp/v4/Admin.js +0 -16
- package/src/legacy/tool-ui/src/main/webapp/v4/AutoExpand.js +0 -84
- package/src/legacy/tool-ui/src/main/webapp/v4/AutoSubmit.js +0 -68
- package/src/legacy/tool-ui/src/main/webapp/v4/Bridge.js +0 -536
- package/src/legacy/tool-ui/src/main/webapp/v4/CheckboxInput.js +0 -22
- package/src/legacy/tool-ui/src/main/webapp/v4/ColorInput.js +0 -5
- package/src/legacy/tool-ui/src/main/webapp/v4/ColorInputSpectrum.js +0 -107
- package/src/legacy/tool-ui/src/main/webapp/v4/ComboInput.js +0 -1491
- package/src/legacy/tool-ui/src/main/webapp/v4/CommunityWidget.js +0 -29
- package/src/legacy/tool-ui/src/main/webapp/v4/ContentEdit.js +0 -2427
- package/src/legacy/tool-ui/src/main/webapp/v4/ContentLock.js +0 -470
- package/src/legacy/tool-ui/src/main/webapp/v4/ContentReporting.js +0 -32
- package/src/legacy/tool-ui/src/main/webapp/v4/DataTable.js +0 -31
- package/src/legacy/tool-ui/src/main/webapp/v4/DateStringField.js +0 -485
- package/src/legacy/tool-ui/src/main/webapp/v4/Entry.js +0 -264
- package/src/legacy/tool-ui/src/main/webapp/v4/ExternalItemAuth.js +0 -16
- package/src/legacy/tool-ui/src/main/webapp/v4/Form.js +0 -31
- package/src/legacy/tool-ui/src/main/webapp/v4/Hierarchy.js +0 -100
- package/src/legacy/tool-ui/src/main/webapp/v4/Icon.ts +0 -49
- package/src/legacy/tool-ui/src/main/webapp/v4/ImageEditor.js +0 -2403
- package/src/legacy/tool-ui/src/main/webapp/v4/ImageEditorBundle.js +0 -5
- package/src/legacy/tool-ui/src/main/webapp/v4/LinkCarousel.js +0 -40
- package/src/legacy/tool-ui/src/main/webapp/v4/LinkList.js +0 -14
- package/src/legacy/tool-ui/src/main/webapp/v4/LinkTable.js +0 -123
- package/src/legacy/tool-ui/src/main/webapp/v4/Location.js +0 -19
- package/src/legacy/tool-ui/src/main/webapp/v4/LocationMap.js +0 -148
- package/src/legacy/tool-ui/src/main/webapp/v4/LookingGlass.js +0 -24
- package/src/legacy/tool-ui/src/main/webapp/v4/Message.js +0 -14
- package/src/legacy/tool-ui/src/main/webapp/v4/NumberBar.js +0 -32
- package/src/legacy/tool-ui/src/main/webapp/v4/Page.js +0 -890
- package/src/legacy/tool-ui/src/main/webapp/v4/Preview.js +0 -758
- package/src/legacy/tool-ui/src/main/webapp/v4/PreviewEditor.js +0 -86
- package/src/legacy/tool-ui/src/main/webapp/v4/PreviewOverlay.js +0 -1005
- package/src/legacy/tool-ui/src/main/webapp/v4/PubSub.js +0 -47
- package/src/legacy/tool-ui/src/main/webapp/v4/QueryField.js +0 -211
- package/src/legacy/tool-ui/src/main/webapp/v4/RegionMap.js +0 -215
- package/src/legacy/tool-ui/src/main/webapp/v4/RepeatableContentInputGroup.js +0 -160
- package/src/legacy/tool-ui/src/main/webapp/v4/RichTextEditor.js +0 -154
- package/src/legacy/tool-ui/src/main/webapp/v4/SearchFields.js +0 -281
- package/src/legacy/tool-ui/src/main/webapp/v4/SearchResult.js +0 -255
- package/src/legacy/tool-ui/src/main/webapp/v4/SharePreview.js +0 -56
- package/src/legacy/tool-ui/src/main/webapp/v4/Sortable.js +0 -874
- package/src/legacy/tool-ui/src/main/webapp/v4/StyleEmbeddedContent.js +0 -100
- package/src/legacy/tool-ui/src/main/webapp/v4/StyleguidePresets.js +0 -357
- package/src/legacy/tool-ui/src/main/webapp/v4/TabContainer.js +0 -360
- package/src/legacy/tool-ui/src/main/webapp/v4/Taxonomy.js +0 -27
- package/src/legacy/tool-ui/src/main/webapp/v4/ThemeBundleEditor.js +0 -224
- package/src/legacy/tool-ui/src/main/webapp/v4/TimedContent.js +0 -147
- package/src/legacy/tool-ui/src/main/webapp/v4/TimedContentBundle.js +0 -8
- package/src/legacy/tool-ui/src/main/webapp/v4/VideoEditor.js +0 -2417
- package/src/legacy/tool-ui/src/main/webapp/v4/VideoEditorBundle.js +0 -8
- package/src/legacy/tool-ui/src/main/webapp/v4/ViewMirror.js +0 -52
- package/src/legacy/tool-ui/src/main/webapp/v4/ViewPreview.d.ts +0 -13
- package/src/legacy/tool-ui/src/main/webapp/v4/ViewPreview.js +0 -177
- package/src/legacy/tool-ui/src/main/webapp/v4/Widget.js +0 -90
- package/src/legacy/tool-ui/src/main/webapp/v4/__mocks__/fileMock.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/__mocks__/styleMock.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/__mocks__/textArea.mock.js +0 -20
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/globals.js +0 -770
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/ProseMirror.test.js +0 -16
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/index.html +0 -54
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/comment_manager/CommentManager.test.js +0 -29
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/comment_manager/index.html +0 -35
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/custom_keyboard/CustomKeyboard.js +0 -42
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/custom_keyboard/index.html +0 -37
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/enhancement_manager/EnhancementManager.test.js +0 -288
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/enhancement_manager/block.html +0 -38
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/enhancement_manager/inline.html +0 -38
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/enhancement_manager/no-popups.html +0 -38
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/list_manager/ListManager.js +0 -257
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/list_manager/index.html +0 -38
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/menubar/hierarchal.html +0 -33
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/menubar/index.html +0 -33
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/menubar/menubar.test.js +0 -195
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/menubar/small.html +0 -34
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/menubar/tags.html +0 -34
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/placeholder_manager/PlaceholderManager.test.js +0 -134
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/placeholder_manager/has-editable-placeholder.html +0 -32
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/placeholder_manager/has-text.html +0 -34
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/placeholder_manager/index.html +0 -31
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/table_manager/TableManager.test.js +0 -63
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/table_manager/existing.html +0 -48
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/track_manager/TrackManager.test.js +0 -291
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/track_manager/existing.html +0 -39
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/track_manager/insert.html +0 -37
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/Sortable.test.js +0 -105
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/ProseMirror.test.js +0 -41
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/codemirror-shim.test.js +0 -72
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/plugins/collab_manager/CollabManager.test.js +0 -46
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/plugins/enhancement_manager/EnhancementManager.test.js +0 -84
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/plugins/list_manager/ListManager.test.js +0 -54
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/plugins/menubar/menubar.test.js +0 -183
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/plugins/spellcheck/SpellCheck.test.js +0 -45
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/settings/BSSerializer.test.js +0 -346
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/settings/menuItemsBuilder.test.js +0 -226
- package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/utilities.test.js +0 -118
- package/src/legacy/tool-ui/src/main/webapp/v4/appetizeio/Appetizeio.js +0 -5
- package/src/legacy/tool-ui/src/main/webapp/v4/appetizeio/AppetizeioEmbedded.js +0 -113
- package/src/legacy/tool-ui/src/main/webapp/v4/compat/Fetch.js +0 -16
- package/src/legacy/tool-ui/src/main/webapp/v4/compat/jquery.js +0 -32
- package/src/legacy/tool-ui/src/main/webapp/v4/compat/requirejs.js +0 -13
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/Tether.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/TetherLayout.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/closest.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/create.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/find.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/findAll.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/ifClick.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/ifMatches.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/ifUnmodified.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/index.js +0 -5
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/insertBefore.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/insertFirst.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/insertLast.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/onFind.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/onFindOnce.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/onRTEReady.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/onRemove.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/onVisible.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/previousUntil.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/dom/resolveIconCompat.js +0 -40
- package/src/legacy/tool-ui/src/main/webapp/v4/rtc/Socket.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/rtc/index.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/ProseMirror.js +0 -909
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/README.md +0 -68
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/codemirror-shim.d.ts +0 -8
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/codemirror-shim.js +0 -274
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/collab-workflow.jpeg +0 -0
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/interchangeable.ts +0 -250
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/mention.js +0 -90
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/PluginProvider.js +0 -124
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/README.md +0 -46
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/ai_inline_manager/AIInlineManager.ts +0 -124
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/ai_inline_manager/views/AIInlineView.ts +0 -1019
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/ai_manager/AiManager.ts +0 -199
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/collab_manager/CollabManager.js +0 -339
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/collab_manager/views/AvatarView.js +0 -96
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/comment_manager/CommentManager.js +0 -348
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/custom_keyboard/CustomKeyboard.js +0 -110
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/custom_keyboard/README.md +0 -29
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/EnhancementManager.js +0 -428
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/README.md +0 -63
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/commands.js +0 -690
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/constants.js +0 -12
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/enhancement-creation.jpeg +0 -0
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/index.js +0 -15
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/rte-flow.jpeg +0 -0
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/views/ActionButtonView.js +0 -86
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/views/BlockSubmenuView.js +0 -60
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/views/EnhancementView.js +0 -208
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/views/PreviewView.js +0 -102
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/views/SubmenuView.js +0 -365
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/find_replace_manager/FindReplaceManager.js +0 -239
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/find_replace_manager/views/FindView.js +0 -604
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/fullscreen_manager/FullscreenManager.js +0 -57
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/fullscreen_manager/README.md +0 -26
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/fullscreen_manager/commands.js +0 -16
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/fullscreen_manager/index.js +0 -4
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/fullscreen_manager/views/FullscreenView.js +0 -474
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/html_editor_manager/htmlEditorManager.js +0 -66
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/html_editor_manager/views/HtmlEditorView.js +0 -97
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/list_manager/ListManager.js +0 -342
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/list_manager/README.md +0 -50
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/list_manager/commands.js +0 -207
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/list_manager/constants.js +0 -26
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/list_manager/index.js +0 -4
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/menubar/Menubar.js +0 -485
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/menubar/README.md +0 -40
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/menubar/views/MenuView.js +0 -842
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/paste_manager/PasteManager.js +0 -368
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/placeholder_manager/PlaceHolderManager.js +0 -128
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/raw_text_manager/README.md +0 -13
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/raw_text_manager/RawTextManager.js +0 -96
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/spellcheck/index.js +0 -3
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/spellcheck/spellcheck-plugin.js +0 -280
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/spellcheck/spellcheck-service.js +0 -94
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/table_manager/TableManager.js +0 -57
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/table_manager/commands.js +0 -97
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/table_manager/views/TableSizerView.js +0 -88
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/table_manager/views/TableView.js +0 -613
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/track_manager/README.md +0 -13
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/track_manager/TrackManager.js +0 -905
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/BSSerializer.js +0 -819
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/README.md +0 -80
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/commands.js +0 -98
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/constants.d.ts +0 -84
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/constants.js +0 -87
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/index.js +0 -13
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/keymapBuilder.js +0 -223
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/menuItemsBuilder.js +0 -559
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/schemaBuilder.js +0 -1281
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/utilities.d.ts +0 -4
- package/src/legacy/tool-ui/src/main/webapp/v4/rte/utilities.js +0 -359
- package/src/legacy/tool-ui/src/main/webapp/v4/theme/ColorRotator.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/util/debounce.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/util/getComponentKey.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/util/noise.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/util/repaint.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/util/storage.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/util/throttle.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/v4/widget/AssignmentContent.js +0 -33
- package/src/legacy/tool-ui/src/main/webapp/v4/widget/AssignmentDeskDashboard.js +0 -217
- package/src/legacy/tool-ui/src/main/webapp/v4/widget/AssociatedContentWidget.js +0 -7
- package/src/legacy/tool-ui/src/main/webapp/v4/widget/BulkUpload.js +0 -19
- package/src/legacy/tool-ui/src/main/webapp/v4/widget/Calendar.js +0 -7
- package/src/legacy/tool-ui/src/main/webapp/v4/widget/ClosableWindow.js +0 -13
- package/src/legacy/tool-ui/src/main/webapp/v4/widget/PitchAssignments.js +0 -25
- package/src/legacy/tool-ui/src/main/webapp/v4/widget/PitchContent.js +0 -33
- package/src/legacy/tool-ui/src/main/webapp/v4/widget/Revisions.js +0 -61
package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/views/SubmenuView.js
DELETED
|
@@ -1,365 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
clearEnhancement,
|
|
3
|
-
editEnhancement,
|
|
4
|
-
removeEnhancement,
|
|
5
|
-
moveEnhancementUp,
|
|
6
|
-
moveEnhancementDown,
|
|
7
|
-
moveEnhancement,
|
|
8
|
-
} from '../commands'
|
|
9
|
-
import { constants } from '../../../settings'
|
|
10
|
-
import { ActionButtonView } from './ActionButtonView'
|
|
11
|
-
import create from '../../../../dom/create'
|
|
12
|
-
|
|
13
|
-
if (!window.BRIGHTSPOT?.ui.cms.enableV5UI) {
|
|
14
|
-
await import('./Enhancement.less')
|
|
15
|
-
await import('./ProsemirrorEnhancementMenu.less')
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* This is the submenu for enhancements.
|
|
20
|
-
*/
|
|
21
|
-
class SubmenuView {
|
|
22
|
-
/**
|
|
23
|
-
* @param {Prosemirror.Model.Node} node The node associated with this submenu
|
|
24
|
-
* @param {Prosemirror.EditorView} editorView
|
|
25
|
-
* @param {Element} companionDom The DOM element in the RTE associated with this
|
|
26
|
-
* view
|
|
27
|
-
*/
|
|
28
|
-
constructor(node, editorView, getPos, companionDom) {
|
|
29
|
-
this.node = node
|
|
30
|
-
this.companionDom = companionDom
|
|
31
|
-
this.editorView = editorView
|
|
32
|
-
this.getPos = getPos
|
|
33
|
-
this.submenuDOM = document.createElement('div')
|
|
34
|
-
this.companionDom.submenu = this.submenuDOM
|
|
35
|
-
|
|
36
|
-
this.render()
|
|
37
|
-
|
|
38
|
-
PubSub.subscribe('blockEnhancementCleared', (evt) => {
|
|
39
|
-
this.close(evt)
|
|
40
|
-
})
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* This is a small hack to handle keyboard events for
|
|
45
|
-
* accessibility. Since the frame API needs a DOM
|
|
46
|
-
* event trigger, we need to simulate a click
|
|
47
|
-
* on the keyboard event trigger.
|
|
48
|
-
*
|
|
49
|
-
* @param {Event} evt
|
|
50
|
-
*/
|
|
51
|
-
_handleKeyboardInteraction(evt) {
|
|
52
|
-
const key = evt.key
|
|
53
|
-
if (key === 'Enter') {
|
|
54
|
-
evt.target.click()
|
|
55
|
-
} else {
|
|
56
|
-
return false
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Event handler for when the user interacts with
|
|
62
|
-
* the submenu buttons.
|
|
63
|
-
*
|
|
64
|
-
* @private
|
|
65
|
-
* @param {Event} evt
|
|
66
|
-
* @param {string} actionType
|
|
67
|
-
*/
|
|
68
|
-
_handleAction = (evt, actionType) => {
|
|
69
|
-
if (evt.key) {
|
|
70
|
-
this._handleKeyboardInteraction(evt)
|
|
71
|
-
return
|
|
72
|
-
}
|
|
73
|
-
evt.preventDefault()
|
|
74
|
-
switch (actionType) {
|
|
75
|
-
case 'clearFormatting':
|
|
76
|
-
clearEnhancement(this.node)(
|
|
77
|
-
this.editorView.state,
|
|
78
|
-
this.editorView.dispatch,
|
|
79
|
-
this.editorView,
|
|
80
|
-
)
|
|
81
|
-
break
|
|
82
|
-
case 'edit':
|
|
83
|
-
editEnhancement(this.node)(
|
|
84
|
-
this.editorView.state,
|
|
85
|
-
this.editorView.dispatch,
|
|
86
|
-
this.editorView,
|
|
87
|
-
evt,
|
|
88
|
-
)
|
|
89
|
-
break
|
|
90
|
-
|
|
91
|
-
case 'convert':
|
|
92
|
-
break
|
|
93
|
-
case 'remove':
|
|
94
|
-
removeEnhancement(this.editorView, this.getPos)
|
|
95
|
-
break
|
|
96
|
-
case 'upward':
|
|
97
|
-
moveEnhancementUp(this.editorView, this.getPos)
|
|
98
|
-
break
|
|
99
|
-
case 'downward':
|
|
100
|
-
moveEnhancementDown(this.editorView, this.getPos)
|
|
101
|
-
break
|
|
102
|
-
case 'pointAndClick':
|
|
103
|
-
moveEnhancement(this.editorView, this.getPos)
|
|
104
|
-
break
|
|
105
|
-
}
|
|
106
|
-
this.close(evt)
|
|
107
|
-
// Calling render again ensures we have a clean set of menu buttons
|
|
108
|
-
// after the item has moved (e.g. to help determine if the upward
|
|
109
|
-
// and downward arrows should be displayed).
|
|
110
|
-
// Should not run if the user clicked on the convert button dropdown
|
|
111
|
-
if (actionType !== 'convert') {
|
|
112
|
-
this.render()
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
_getActions = (meta) => {
|
|
117
|
-
const actions = []
|
|
118
|
-
const loadableTypes = this.node.attrs.attributes['data-loadable-types']
|
|
119
|
-
|
|
120
|
-
if (meta.popup) {
|
|
121
|
-
actions.push({
|
|
122
|
-
action: 'edit',
|
|
123
|
-
title: 'Edit',
|
|
124
|
-
icon: 'edit',
|
|
125
|
-
})
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
if (meta.isConvertible && loadableTypes) {
|
|
129
|
-
actions.push({
|
|
130
|
-
action: 'convert',
|
|
131
|
-
title: 'Convert',
|
|
132
|
-
icon: 'more_horiz',
|
|
133
|
-
loadableTypes: loadableTypes,
|
|
134
|
-
})
|
|
135
|
-
}
|
|
136
|
-
if (meta.line) {
|
|
137
|
-
actions.push({
|
|
138
|
-
action: 'upward',
|
|
139
|
-
title: 'Move Up',
|
|
140
|
-
icon: 'arrow_upward',
|
|
141
|
-
})
|
|
142
|
-
actions.push({
|
|
143
|
-
action: 'downward',
|
|
144
|
-
title: 'Move Down',
|
|
145
|
-
icon: 'arrow_downward',
|
|
146
|
-
})
|
|
147
|
-
if (meta.readOnly) {
|
|
148
|
-
actions.push({
|
|
149
|
-
action: 'pointAndClick',
|
|
150
|
-
title: 'Anchor',
|
|
151
|
-
icon: 'open_with',
|
|
152
|
-
})
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
if (!meta.readOnly) {
|
|
156
|
-
actions.push({
|
|
157
|
-
action: 'clearFormatting',
|
|
158
|
-
title: 'Clear Formatting',
|
|
159
|
-
icon: 'link_off',
|
|
160
|
-
})
|
|
161
|
-
} else {
|
|
162
|
-
actions.push({
|
|
163
|
-
action: 'remove',
|
|
164
|
-
title: 'Remove',
|
|
165
|
-
icon: 'remove',
|
|
166
|
-
})
|
|
167
|
-
}
|
|
168
|
-
return actions
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Generates the content for the submenu
|
|
173
|
-
*
|
|
174
|
-
* @private
|
|
175
|
-
* @return {Element} All of the content wrapped inside this
|
|
176
|
-
* element.
|
|
177
|
-
*/
|
|
178
|
-
_getContent() {
|
|
179
|
-
const attributes = this.node.attrs.attributes
|
|
180
|
-
const meta = this.node.attrs.meta
|
|
181
|
-
const container = document.createElement(constants.ELEMENTS.DIV)
|
|
182
|
-
container.className = 'ProsemirrorEnhancementMenu-container'
|
|
183
|
-
const href = attributes ? attributes.href : null
|
|
184
|
-
const label = meta.displayName
|
|
185
|
-
const actions = this._getActions(meta)
|
|
186
|
-
|
|
187
|
-
container.appendChild(
|
|
188
|
-
create(
|
|
189
|
-
'span',
|
|
190
|
-
{ className: 'ProsemirrorEnhancementMenu-container-label' },
|
|
191
|
-
label,
|
|
192
|
-
),
|
|
193
|
-
)
|
|
194
|
-
|
|
195
|
-
if (href) {
|
|
196
|
-
container.appendChild(
|
|
197
|
-
create(
|
|
198
|
-
'a',
|
|
199
|
-
{
|
|
200
|
-
className: 'ProsemirrorEnhancementMenu-container-link-goto',
|
|
201
|
-
href: href,
|
|
202
|
-
target: '_blank',
|
|
203
|
-
},
|
|
204
|
-
'Go to Link',
|
|
205
|
-
),
|
|
206
|
-
)
|
|
207
|
-
container.appendChild(
|
|
208
|
-
create(
|
|
209
|
-
'a',
|
|
210
|
-
{
|
|
211
|
-
'data-frame-post': '',
|
|
212
|
-
class: 'ProsemirrorEnhancementMenu-container-link',
|
|
213
|
-
href: href,
|
|
214
|
-
target: '_blank',
|
|
215
|
-
},
|
|
216
|
-
href,
|
|
217
|
-
),
|
|
218
|
-
)
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
actions.forEach((metaObj) => {
|
|
222
|
-
const { action, title, icon } = metaObj
|
|
223
|
-
const rteId = this.editorView.props.props.ctx.id
|
|
224
|
-
const handleAction = this._handleAction
|
|
225
|
-
const button = new ActionButtonView({
|
|
226
|
-
action,
|
|
227
|
-
title,
|
|
228
|
-
icon,
|
|
229
|
-
handleAction,
|
|
230
|
-
rteId,
|
|
231
|
-
})
|
|
232
|
-
container.appendChild(button)
|
|
233
|
-
})
|
|
234
|
-
|
|
235
|
-
return container
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* Positions the submenu.
|
|
240
|
-
*/
|
|
241
|
-
positionSubmenu = () => {
|
|
242
|
-
if (!this.editorView.submenu.isOpen) {
|
|
243
|
-
return
|
|
244
|
-
}
|
|
245
|
-
const enhancementPos =
|
|
246
|
-
this.editorView.submenu.tetheredTo.getBoundingClientRect()
|
|
247
|
-
const enhancementTop = enhancementPos.top
|
|
248
|
-
const enhancementLeft = enhancementPos.left
|
|
249
|
-
const enhancementRight = enhancementPos.right
|
|
250
|
-
const prosemirrorContainer = this.editorView.dom.parentNode
|
|
251
|
-
const prosemirrorContainerPos = prosemirrorContainer.getBoundingClientRect()
|
|
252
|
-
const containerTop = prosemirrorContainerPos.top
|
|
253
|
-
const containerLeft = prosemirrorContainerPos.left
|
|
254
|
-
const containerRight = prosemirrorContainerPos.right
|
|
255
|
-
this.editorView.submenu.style.top = `${
|
|
256
|
-
enhancementTop - containerTop + 20
|
|
257
|
-
}px`
|
|
258
|
-
|
|
259
|
-
const submenuPos = this.editorView.submenu.getBoundingClientRect()
|
|
260
|
-
const submenuWidth = submenuPos.width
|
|
261
|
-
|
|
262
|
-
if (
|
|
263
|
-
submenuWidth > containerRight - enhancementLeft &&
|
|
264
|
-
submenuWidth < enhancementRight - containerLeft
|
|
265
|
-
) {
|
|
266
|
-
this.editorView.submenu.style.right = `${
|
|
267
|
-
containerRight - enhancementRight
|
|
268
|
-
}px`
|
|
269
|
-
this.editorView.submenu.style.left = 'auto'
|
|
270
|
-
} else if (enhancementLeft + submenuWidth > containerRight) {
|
|
271
|
-
this.editorView.submenu.style.left = `${
|
|
272
|
-
containerRight - submenuWidth - containerLeft
|
|
273
|
-
}px`
|
|
274
|
-
this.editorView.submenu.style.right = 'auto'
|
|
275
|
-
} else {
|
|
276
|
-
this.editorView.submenu.style.left = `${
|
|
277
|
-
enhancementLeft - containerLeft
|
|
278
|
-
}px`
|
|
279
|
-
this.editorView.submenu.style.right = 'auto'
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* Draws the submenu.
|
|
285
|
-
*/
|
|
286
|
-
render() {
|
|
287
|
-
const rteId = this.editorView.props.props.ctx.id
|
|
288
|
-
PubSub.publish(`${rteId}-submenu-view-destroy`)
|
|
289
|
-
this.submenuDOM.innerHTML = ''
|
|
290
|
-
this.submenuDOM.className = 'ProsemirrorEnhancementMenu'
|
|
291
|
-
const contentElement = this._getContent()
|
|
292
|
-
this.submenuDOM.appendChild(contentElement)
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* Opens the submenu.
|
|
297
|
-
*
|
|
298
|
-
* @param {Event} evt The event object.
|
|
299
|
-
*/
|
|
300
|
-
open = (evt) => {
|
|
301
|
-
evt.preventDefault()
|
|
302
|
-
evt.stopImmediatePropagation()
|
|
303
|
-
const target =
|
|
304
|
-
evt.currentTarget.parentElement.closest('.Enhancement') ||
|
|
305
|
-
evt.currentTarget
|
|
306
|
-
const pos = this.editorView.state.selection.$from.pos
|
|
307
|
-
const nodeAtPos = this.editorView.state.doc.nodeAt(pos)
|
|
308
|
-
|
|
309
|
-
this.editorView.submenu.isOpen = true
|
|
310
|
-
this.editorView.submenu.tetheredTo = target
|
|
311
|
-
this.editorView.submenu.innerHTML = ''
|
|
312
|
-
|
|
313
|
-
// Check if cursor is on other marks and show the additional submenus.
|
|
314
|
-
if (nodeAtPos) {
|
|
315
|
-
const domNode = this.editorView.domAtPos(pos, 1).node
|
|
316
|
-
const elements = new Set()
|
|
317
|
-
|
|
318
|
-
if (domNode.nodeType === Node.TEXT_NODE) {
|
|
319
|
-
let parent = domNode.parentElement
|
|
320
|
-
while (parent) {
|
|
321
|
-
if (
|
|
322
|
-
RICH_TEXT_ELEMENTS.some((item) => {
|
|
323
|
-
return item.tag === parent.tagName.toLowerCase()
|
|
324
|
-
})
|
|
325
|
-
) {
|
|
326
|
-
elements.add(parent)
|
|
327
|
-
} else if (parent?.classList.contains('.ProseMirror')) {
|
|
328
|
-
break
|
|
329
|
-
}
|
|
330
|
-
parent = parent.parentElement
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
if (elements.size > 0) {
|
|
335
|
-
elements.forEach((element) => {
|
|
336
|
-
if (element.submenu) {
|
|
337
|
-
this.editorView.submenu.appendChild(element.submenu)
|
|
338
|
-
}
|
|
339
|
-
})
|
|
340
|
-
} else {
|
|
341
|
-
this.editorView.submenu.appendChild(this.submenuDOM)
|
|
342
|
-
}
|
|
343
|
-
} else {
|
|
344
|
-
this.editorView.submenu.appendChild(this.submenuDOM)
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
this.editorView.submenu.classList.add('open')
|
|
348
|
-
this.positionSubmenu()
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
* Closes the submenu.
|
|
353
|
-
* @param {Event} evt The event object.
|
|
354
|
-
*/
|
|
355
|
-
close(evt) {
|
|
356
|
-
if (evt && evt.key && evt.key !== constants.KEY_MAPPINGS.ESCAPE) {
|
|
357
|
-
return
|
|
358
|
-
}
|
|
359
|
-
this.editorView.submenu.classList.remove('open')
|
|
360
|
-
this.editorView.submenu.isOpen = false
|
|
361
|
-
this.editorView.submenu.tetheredTo = null
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
export { SubmenuView }
|
package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/find_replace_manager/FindReplaceManager.js
DELETED
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
import { Plugin, PluginKey } from 'prosemirror-state'
|
|
2
|
-
import { FindView } from './views/FindView'
|
|
3
|
-
import { Decoration, DecorationSet } from 'prosemirror-view'
|
|
4
|
-
import { keydownHandler } from 'prosemirror-keymap'
|
|
5
|
-
import { findKeyMapping, keyMappingHandler } from '../../settings/keymapBuilder'
|
|
6
|
-
|
|
7
|
-
const key = new PluginKey('findReplace')
|
|
8
|
-
const keyHandler = {}
|
|
9
|
-
|
|
10
|
-
keyHandler[findKeyMapping('find')] = keyMappingHandler('rte2-toolbar-find')
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Menu action for when user toggles the find menu icon.
|
|
14
|
-
*/
|
|
15
|
-
const toggleFind = () => {
|
|
16
|
-
return function (state, dispatch, editorView) {
|
|
17
|
-
dispatch(
|
|
18
|
-
state.tr.setMeta(key, {
|
|
19
|
-
toggleFind: true,
|
|
20
|
-
}),
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
return true
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Escapes string of text so that it can be used as a regex.
|
|
29
|
-
*
|
|
30
|
-
* @param {string} text String to be escaped
|
|
31
|
-
*/
|
|
32
|
-
const escapeRegEx = (text) => {
|
|
33
|
-
return text.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&')
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Creates a decoration set based on the items 'found' by our view. This is triggered
|
|
38
|
-
* by the user interacting with the Find and Replace view widget.
|
|
39
|
-
*
|
|
40
|
-
* @param {ProseMirror.EditorView} doc
|
|
41
|
-
* @param {Array.<Object.<number|string>>} toFind Data representation
|
|
42
|
-
* of found items
|
|
43
|
-
* @returns {ProseMirror.DecorationSet}
|
|
44
|
-
*/
|
|
45
|
-
const getDecos = (doc, toFind) => {
|
|
46
|
-
const decos = toFind.map((item) => {
|
|
47
|
-
let className = 'ProseMirrorFindReplace-found'
|
|
48
|
-
if (item.isActive) {
|
|
49
|
-
className = `${className} active`
|
|
50
|
-
}
|
|
51
|
-
return Decoration.inline(
|
|
52
|
-
item.from,
|
|
53
|
-
item.to,
|
|
54
|
-
{
|
|
55
|
-
class: className,
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
text: item.text,
|
|
59
|
-
idx: item.idx,
|
|
60
|
-
},
|
|
61
|
-
)
|
|
62
|
-
})
|
|
63
|
-
return DecorationSet.create(doc, decos)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* This also creates a decoration set of 'found' items, but this is triggered directly
|
|
68
|
-
* by state changes in the editorView (e.g. user has already run a find and left the find open
|
|
69
|
-
* and then typed the word to be found in the editorView).
|
|
70
|
-
*
|
|
71
|
-
* @param {ProseMirror.EditorView} doc
|
|
72
|
-
* @param {string} text
|
|
73
|
-
* @param {number} current
|
|
74
|
-
* @param {boolean} matchCase
|
|
75
|
-
* @param {boolean} matchWholeWord
|
|
76
|
-
* @param {boolean} isReplaceAction
|
|
77
|
-
*/
|
|
78
|
-
const handleFind = (
|
|
79
|
-
doc,
|
|
80
|
-
text,
|
|
81
|
-
current,
|
|
82
|
-
matchCase,
|
|
83
|
-
matchWholeWord,
|
|
84
|
-
isReplaceAction,
|
|
85
|
-
) => {
|
|
86
|
-
let options = 'gi'
|
|
87
|
-
if (matchCase) {
|
|
88
|
-
options = 'g'
|
|
89
|
-
}
|
|
90
|
-
const escapedText = escapeRegEx(text)
|
|
91
|
-
let wordRegEx = new RegExp(escapedText, options)
|
|
92
|
-
if (matchWholeWord) {
|
|
93
|
-
wordRegEx = new RegExp(`\\b${escapedText}\\b`, options)
|
|
94
|
-
}
|
|
95
|
-
const decos = []
|
|
96
|
-
current = current ? parseInt(current) : 0
|
|
97
|
-
let idx = 1
|
|
98
|
-
let found = []
|
|
99
|
-
doc.descendants((node, pos) => {
|
|
100
|
-
if (node.isText) {
|
|
101
|
-
let match
|
|
102
|
-
while ((match = wordRegEx.exec(node.text))) {
|
|
103
|
-
let className = 'ProseMirrorFindReplace-found'
|
|
104
|
-
if (idx === current && !isReplaceAction) {
|
|
105
|
-
className = 'ProseMirrorFindReplace-found active'
|
|
106
|
-
}
|
|
107
|
-
decos.push(
|
|
108
|
-
Decoration.inline(
|
|
109
|
-
pos + match.index,
|
|
110
|
-
pos + match.index + match[0].length,
|
|
111
|
-
{
|
|
112
|
-
class: className,
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
text,
|
|
116
|
-
idx,
|
|
117
|
-
},
|
|
118
|
-
),
|
|
119
|
-
)
|
|
120
|
-
idx++
|
|
121
|
-
found.push({
|
|
122
|
-
from: pos + match.index,
|
|
123
|
-
to: pos + match.index + match[0].length,
|
|
124
|
-
})
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
})
|
|
128
|
-
|
|
129
|
-
return {
|
|
130
|
-
set: DecorationSet.create(doc, decos),
|
|
131
|
-
total: decos.length,
|
|
132
|
-
found,
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Find and replace plugin.
|
|
138
|
-
*/
|
|
139
|
-
const findReplacePlugin = () => {
|
|
140
|
-
return new Plugin({
|
|
141
|
-
key,
|
|
142
|
-
|
|
143
|
-
view(editorView) {
|
|
144
|
-
this.view = new FindView(editorView, this.key.key)
|
|
145
|
-
const dom = this.view.dom
|
|
146
|
-
const toolbar = editorView.dom.parentNode.querySelector(
|
|
147
|
-
'.ProseMirrorToolbar',
|
|
148
|
-
)
|
|
149
|
-
toolbar.appendChild(dom)
|
|
150
|
-
return this.view
|
|
151
|
-
},
|
|
152
|
-
|
|
153
|
-
state: {
|
|
154
|
-
init(config) {
|
|
155
|
-
const pluginState = new Map()
|
|
156
|
-
const activeStates = new Map()
|
|
157
|
-
activeStates.set('find', false)
|
|
158
|
-
pluginState.set('activeStates', activeStates)
|
|
159
|
-
const decos = DecorationSet.empty
|
|
160
|
-
pluginState.set('decos', decos)
|
|
161
|
-
return pluginState
|
|
162
|
-
},
|
|
163
|
-
|
|
164
|
-
apply(tr, value, oldState, newState) {
|
|
165
|
-
const pluginState = value
|
|
166
|
-
const meta = tr.getMeta(this)
|
|
167
|
-
let decos = pluginState.get('decos').map(tr.mapping, tr.doc)
|
|
168
|
-
|
|
169
|
-
if (meta && meta.hasOwnProperty('toggleFind')) {
|
|
170
|
-
const currentState = pluginState
|
|
171
|
-
const newCurrentState = !currentState.get('activeStates').get('find')
|
|
172
|
-
if (!newCurrentState) {
|
|
173
|
-
this.spec.view.findInputEle.value = ''
|
|
174
|
-
decos = DecorationSet.empty
|
|
175
|
-
PubSub.publish('findReset', {
|
|
176
|
-
total: 0,
|
|
177
|
-
})
|
|
178
|
-
}
|
|
179
|
-
pluginState.get('activeStates').set('find', newCurrentState)
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
if (meta && meta.hasOwnProperty('toFind')) {
|
|
183
|
-
decos = getDecos(newState.doc, meta.toFind)
|
|
184
|
-
} else if (
|
|
185
|
-
this.spec.view.findInputEle &&
|
|
186
|
-
this.spec.view.findInputEle.value
|
|
187
|
-
) {
|
|
188
|
-
const results = handleFind(
|
|
189
|
-
newState.doc,
|
|
190
|
-
this.spec.view.findInputEle.value,
|
|
191
|
-
this.spec.view.current,
|
|
192
|
-
this.spec.view.matchCase.checked,
|
|
193
|
-
this.spec.view.matchWholeWord.checked,
|
|
194
|
-
this.spec.view.isReplaceAction,
|
|
195
|
-
)
|
|
196
|
-
decos = results.set
|
|
197
|
-
|
|
198
|
-
// The following publishes are set up so that this plugin can
|
|
199
|
-
// let its view know that UI state data has changed and allow the
|
|
200
|
-
// view to update itself accordingly, rather than the plugin accessing
|
|
201
|
-
// view methods to update the view. UI state data changes can be triggered
|
|
202
|
-
// either by our widget view or by editorView itself, but this isolates
|
|
203
|
-
// UI state data changes to be made only in the view.
|
|
204
|
-
if (this.spec.view.total < results.total) {
|
|
205
|
-
PubSub.publish('findAdded', {
|
|
206
|
-
total: results.total,
|
|
207
|
-
})
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
if (this.spec.view.total > results.total) {
|
|
211
|
-
PubSub.publish('findRemoved', {
|
|
212
|
-
total: results.total,
|
|
213
|
-
})
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
pluginState.set('decos', decos)
|
|
218
|
-
return pluginState
|
|
219
|
-
},
|
|
220
|
-
},
|
|
221
|
-
|
|
222
|
-
props: {
|
|
223
|
-
decorations(state) {
|
|
224
|
-
const pluginState = this.getState(state)
|
|
225
|
-
return pluginState.get('decos')
|
|
226
|
-
},
|
|
227
|
-
handleKeyDown: (view, event) => {
|
|
228
|
-
keydownHandler(keyHandler)(view, event)
|
|
229
|
-
|
|
230
|
-
// Prevent native find from opening when in RTE.
|
|
231
|
-
if (event.key === 'f' && event.metaKey) {
|
|
232
|
-
return true
|
|
233
|
-
}
|
|
234
|
-
},
|
|
235
|
-
},
|
|
236
|
-
})
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export { findReplacePlugin, toggleFind, escapeRegEx }
|