@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/fullscreen_manager/views/FullscreenView.js
DELETED
|
@@ -1,474 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-debugger */
|
|
2
|
-
import { html, render } from 'lit-html'
|
|
3
|
-
import moment from 'moment'
|
|
4
|
-
import { NodeSelection, TextSelection } from 'prosemirror-state'
|
|
5
|
-
import { constants } from '../../../settings'
|
|
6
|
-
import { acceptChanges, rejectChanges } from '../../track_manager/TrackManager'
|
|
7
|
-
import { getPluginState } from '../../../utilities'
|
|
8
|
-
|
|
9
|
-
if (!window.BRIGHTSPOT?.ui.cms.enableV5UI) {
|
|
10
|
-
await import('./FullscreenView.less')
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Adds functionality to open the editor into a "full-screen" mode.
|
|
15
|
-
*/
|
|
16
|
-
class FullScreenView {
|
|
17
|
-
/**
|
|
18
|
-
* @param {ProseMirror.EditorView} editorView
|
|
19
|
-
* @param {ProseMirror.PluginKey} myKey
|
|
20
|
-
*/
|
|
21
|
-
constructor(editorView, myKey) {
|
|
22
|
-
this.editorView = editorView
|
|
23
|
-
this.myKey = myKey
|
|
24
|
-
|
|
25
|
-
this.editorDOM = this.editorView.dom
|
|
26
|
-
this.editorDOMParent = this.editorDOM.parentNode
|
|
27
|
-
this.editorDOMGrandParent = this.editorDOMParent.parentNode
|
|
28
|
-
this.fullScreenContainer = document.createElement('div')
|
|
29
|
-
this.fullScreenContainer.className = 'ProseMirror-fullscreen-container'
|
|
30
|
-
this.header = document.createElement('div')
|
|
31
|
-
this.header.className = 'ProseMirror-fullscreen-container-header'
|
|
32
|
-
this.fullScreenContainer.appendChild(this.header)
|
|
33
|
-
this.footer = document.createElement('div')
|
|
34
|
-
this.footer.className = 'ProseMirror-fullscreen-container-footer'
|
|
35
|
-
this.fullScreenContainer.appendChild(this.footer)
|
|
36
|
-
const dialog = this.editorDOM.closest('dialog')
|
|
37
|
-
if (dialog) {
|
|
38
|
-
dialog.appendChild(this.fullScreenContainer)
|
|
39
|
-
} else {
|
|
40
|
-
document.body.appendChild(this.fullScreenContainer)
|
|
41
|
-
}
|
|
42
|
-
this.fullScreenContainer.classList.add('hide')
|
|
43
|
-
this.headerAside = document.createElement('div')
|
|
44
|
-
this.headerAside.className = 'ProseMirror-fullscreen-container-header-aside'
|
|
45
|
-
this.header.appendChild(this.headerAside)
|
|
46
|
-
this.form = this.editorDOM.closest('.ContentEdit')
|
|
47
|
-
this.comments = document.createElement('div')
|
|
48
|
-
this.comments.className = 'ProseMirror-comments'
|
|
49
|
-
this.editorDOMParent.appendChild(this.comments)
|
|
50
|
-
|
|
51
|
-
if (this.form && this.form.hasAttribute('data-rte-title-field')) {
|
|
52
|
-
this.titleField = this.form.querySelector(
|
|
53
|
-
`[name="${this.form.getAttribute('data-rte-title-field')}"]`,
|
|
54
|
-
)
|
|
55
|
-
if (this.titleField) {
|
|
56
|
-
this.titleInput = document.createElement('input')
|
|
57
|
-
this.titleInput.type = 'text'
|
|
58
|
-
this.titleInput.addEventListener('input', (event) => {
|
|
59
|
-
this.titleField.value = this.titleInput.value
|
|
60
|
-
const evt = document.createEvent('HTMLEvents')
|
|
61
|
-
evt.initEvent('change', true, false)
|
|
62
|
-
this.titleField.dispatchEvent(evt)
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
const inputWrapper = document.createElement('div')
|
|
66
|
-
inputWrapper.className = 'InputWrapper'
|
|
67
|
-
inputWrapper.appendChild(this.titleInput)
|
|
68
|
-
this.header.prepend(inputWrapper)
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Renders the RTE in full-screen mode by appending the editor and the menu
|
|
75
|
-
* to a div added to the DOM by this class in its constructor, if the state
|
|
76
|
-
* is in `isFullScreen`. Otherwise appends the editor back to its original parent.
|
|
77
|
-
*/
|
|
78
|
-
render() {
|
|
79
|
-
const pluginState = getPluginState(this.editorView, this.myKey)
|
|
80
|
-
if (
|
|
81
|
-
!pluginState.get('activeStates') ||
|
|
82
|
-
!pluginState.get('activeStates').get('fullscreen')
|
|
83
|
-
) {
|
|
84
|
-
this.editorDOMGrandParent.appendChild(this.editorDOMParent)
|
|
85
|
-
this.fullScreenContainer.classList.add('hide')
|
|
86
|
-
const wipStatus = this.headerAside.querySelector(
|
|
87
|
-
'.WorkInProgressSaveStatus',
|
|
88
|
-
)
|
|
89
|
-
if (wipStatus) {
|
|
90
|
-
this.form
|
|
91
|
-
?.querySelector('.widget-publishing .icon-action-publish')
|
|
92
|
-
?.appendChild(wipStatus)
|
|
93
|
-
}
|
|
94
|
-
const evt = document.createEvent('HTMLEvents')
|
|
95
|
-
evt.initEvent('input', true, false)
|
|
96
|
-
this.editorView.props.props.ctx.dispatchEvent(evt)
|
|
97
|
-
const wordCount = this.footer.querySelector('.ProsemirrorWordCount')
|
|
98
|
-
if (wordCount) {
|
|
99
|
-
this.editorDOMParent.appendChild(wordCount)
|
|
100
|
-
}
|
|
101
|
-
const avatarContainer = this.fullScreenContainer.querySelector(
|
|
102
|
-
`.${constants.CLASSES.PM_AVATAR_WRAPPER}`,
|
|
103
|
-
)
|
|
104
|
-
if (avatarContainer) {
|
|
105
|
-
this.editorDOMParent.appendChild(avatarContainer)
|
|
106
|
-
}
|
|
107
|
-
} else {
|
|
108
|
-
// We might be in a popup (e.g. opening a story from the assignment desk
|
|
109
|
-
// assignment content tab), in which case we need z-index to be higher up than
|
|
110
|
-
// that popup to be on top of it, but we don't want to be be any higher
|
|
111
|
-
// than +1 because we would then be on top of any popups from the RTE
|
|
112
|
-
// itself (e.g. when user clicks menu to open popup to place an image).
|
|
113
|
-
const closestPopup = this.editorDOM.closest('.Popup.is-visible')
|
|
114
|
-
if (closestPopup) {
|
|
115
|
-
const zIndex = closestPopup.style.zIndex
|
|
116
|
-
this.fullScreenContainer.style.zIndex = `${parseInt(zIndex) + 1}`
|
|
117
|
-
}
|
|
118
|
-
this.fullScreenContainer.appendChild(this.editorDOMParent)
|
|
119
|
-
this.fullScreenContainer.classList.remove('hide')
|
|
120
|
-
|
|
121
|
-
if (window.BRIGHTSPOT?.ui.cms.enableV5UI) {
|
|
122
|
-
this.fullScreenContainer.setAttribute('popover', 'manual')
|
|
123
|
-
this.fullScreenContainer.showPopover()
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const wordCount = this.editorDOMParent.querySelector(
|
|
127
|
-
'.ProsemirrorWordCount',
|
|
128
|
-
)
|
|
129
|
-
if (wordCount) {
|
|
130
|
-
this.footer.appendChild(wordCount)
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
const wipStatus = this.form?.querySelector(
|
|
134
|
-
'.widget-publishing .icon-action-publish .WorkInProgressSaveStatus',
|
|
135
|
-
)
|
|
136
|
-
if (wipStatus) {
|
|
137
|
-
this.headerAside.appendChild(wipStatus)
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
if (this.titleInput) {
|
|
141
|
-
this.titleInput.placeholder = 'Untitled'
|
|
142
|
-
this.titleInput.title = 'Click to Edit'
|
|
143
|
-
|
|
144
|
-
const CIGRow = this.titleField.closest('.CIG-row')
|
|
145
|
-
const uneditable = ['is-pending', 'is-updated', 'is-readOnly']
|
|
146
|
-
|
|
147
|
-
if (
|
|
148
|
-
this.titleField.readOnly ||
|
|
149
|
-
(CIGRow && uneditable.some((c) => CIGRow.classList.contains(c)))
|
|
150
|
-
) {
|
|
151
|
-
this.titleInput.readOnly = true
|
|
152
|
-
} else {
|
|
153
|
-
this.titleInput.removeAttribute('readonly')
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
if (this.titleField.value) {
|
|
157
|
-
this.titleInput.value = this.titleField.value
|
|
158
|
-
} else {
|
|
159
|
-
this.titleInput.value = ''
|
|
160
|
-
}
|
|
161
|
-
} else {
|
|
162
|
-
const headlineTitle = document.querySelector(
|
|
163
|
-
'.ContentEdit-title .ContentLabel[data-previous-text]',
|
|
164
|
-
)
|
|
165
|
-
this.header.innerText = headlineTitle
|
|
166
|
-
? headlineTitle.innerText
|
|
167
|
-
: 'Untitled'
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
const avatarContainer = this.editorDOMParent.querySelector(
|
|
171
|
-
`.${constants.CLASSES.PM_AVATAR_WRAPPER}`,
|
|
172
|
-
)
|
|
173
|
-
const asideContainer = this.fullScreenContainer.querySelector(
|
|
174
|
-
'.ProseMirror-fullscreen-container-header-aside',
|
|
175
|
-
)
|
|
176
|
-
const wipStatusConatiner = this.fullScreenContainer.querySelector(
|
|
177
|
-
'.WorkInProgressSaveStatus',
|
|
178
|
-
)
|
|
179
|
-
|
|
180
|
-
if (avatarContainer && asideContainer && wipStatusConatiner) {
|
|
181
|
-
asideContainer.insertBefore(avatarContainer, wipStatusConatiner)
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
this.editorDOMParent.querySelector('.ProseMirror').focus()
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Prosemirror calls this for us on every transaction that is
|
|
190
|
-
* dispatched. We don't want to reappend the editor to the
|
|
191
|
-
* first child repeatedly and unecessarily, so we look to make sure
|
|
192
|
-
* the plugin's state is in a `hasToggle` state. It is only in an
|
|
193
|
-
* `hasToggle` state when the user engages the full-screen command.
|
|
194
|
-
*/
|
|
195
|
-
update() {
|
|
196
|
-
const editorView = this.editorView
|
|
197
|
-
const pluginState = getPluginState(editorView, this.myKey)
|
|
198
|
-
|
|
199
|
-
if (pluginState.get('hasToggle')) {
|
|
200
|
-
this.render()
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
const isFullscreen = pluginState.get('activeStates')?.get('fullscreen')
|
|
204
|
-
if (!isFullscreen) {
|
|
205
|
-
this.fullScreenContainer.classList.remove('is-comments')
|
|
206
|
-
render('', this.comments)
|
|
207
|
-
return
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
const doc = editorView.state.doc
|
|
211
|
-
const comments = []
|
|
212
|
-
|
|
213
|
-
doc.descendants((node, pos) => {
|
|
214
|
-
node.marks.forEach(({ type: { name }, attrs }) => {
|
|
215
|
-
if (name === 'comment' || name === 'del' || name === 'ins') {
|
|
216
|
-
const replies = attrs['data-replies']
|
|
217
|
-
|
|
218
|
-
comments.push({
|
|
219
|
-
pos,
|
|
220
|
-
type: name,
|
|
221
|
-
userId: attrs['data-user-id'],
|
|
222
|
-
user: attrs['data-user-label'],
|
|
223
|
-
time: attrs['data-time'],
|
|
224
|
-
text: node.attrs.meta
|
|
225
|
-
? `${node.attrs.meta?.displayName}: ${node.attrs.label}`
|
|
226
|
-
: node.textContent,
|
|
227
|
-
replies: replies ? JSON.parse(replies) : null,
|
|
228
|
-
})
|
|
229
|
-
}
|
|
230
|
-
})
|
|
231
|
-
})
|
|
232
|
-
|
|
233
|
-
if (comments.length === 0) {
|
|
234
|
-
this.fullScreenContainer.classList.remove('is-comments')
|
|
235
|
-
render('', this.comments)
|
|
236
|
-
return
|
|
237
|
-
} else {
|
|
238
|
-
this.fullScreenContainer.classList.add('is-comments')
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
const makeActive = (target) => {
|
|
242
|
-
if (target && target.closest('.ProseMirror-comment')) {
|
|
243
|
-
const comment = target.closest('.ProseMirror-comment')
|
|
244
|
-
const type = comment.dataset.type
|
|
245
|
-
const node = this.editorView.state.doc.nodeAt(comment.pos)
|
|
246
|
-
const mark = node.marks.find((mark) => type === mark.type.name)
|
|
247
|
-
const attrs = Object.assign({}, mark.attrs)
|
|
248
|
-
|
|
249
|
-
if (comment.classList.contains('is-active')) {
|
|
250
|
-
attrs.class = attrs.class.replace(' is-active', '')
|
|
251
|
-
} else {
|
|
252
|
-
attrs.class = `${attrs.class} is-active`
|
|
253
|
-
|
|
254
|
-
// Remove any previous active comment.
|
|
255
|
-
makeActive(this.comments.querySelector('.is-active'))
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
const newMark = mark.type.create(attrs)
|
|
259
|
-
let tr = editorView.state.tr
|
|
260
|
-
let selection
|
|
261
|
-
|
|
262
|
-
if (node.isText) {
|
|
263
|
-
tr = tr.removeMark(comment.pos, comment.pos + node.nodeSize, mark)
|
|
264
|
-
tr = tr.addMark(comment.pos, comment.pos + node.nodeSize, newMark)
|
|
265
|
-
selection = new TextSelection(
|
|
266
|
-
tr.doc.resolve(comment.pos),
|
|
267
|
-
tr.doc.resolve(comment.pos + node.nodeSize),
|
|
268
|
-
)
|
|
269
|
-
} else {
|
|
270
|
-
tr = tr.setNodeMarkup(
|
|
271
|
-
comment.pos,
|
|
272
|
-
node.type,
|
|
273
|
-
node.attrs,
|
|
274
|
-
node.marks.map((m) =>
|
|
275
|
-
m.type.name === newMark.type.name ? newMark : m,
|
|
276
|
-
),
|
|
277
|
-
)
|
|
278
|
-
selection = new NodeSelection(tr.doc.resolve(comment.pos))
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
tr.setSelection(selection)
|
|
282
|
-
editorView.dispatch(tr)
|
|
283
|
-
|
|
284
|
-
comment.classList.toggle('is-active')
|
|
285
|
-
|
|
286
|
-
editorView
|
|
287
|
-
.nodeDOM(comment.pos)
|
|
288
|
-
.parentElement.scrollIntoView({ behavior: 'smooth' })
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
const updateComment = (target, callback) => {
|
|
293
|
-
const pos = target.closest('.ProseMirror-comment').pos
|
|
294
|
-
const { from, to, node } = NodeSelection.create(doc, pos)
|
|
295
|
-
|
|
296
|
-
const comment = node.marks.filter((m) => m.type.name === 'comment')[0]
|
|
297
|
-
|
|
298
|
-
if (comment) {
|
|
299
|
-
const attrs = Object.assign({}, comment.attrs)
|
|
300
|
-
let replies = attrs['data-replies']
|
|
301
|
-
replies = replies ? JSON.parse(replies) : []
|
|
302
|
-
callback(replies)
|
|
303
|
-
attrs['data-replies'] = JSON.stringify(replies)
|
|
304
|
-
|
|
305
|
-
editorView.dispatch(
|
|
306
|
-
editorView.state.tr.addMark(from, to, comment.type.create(attrs)),
|
|
307
|
-
)
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
render(
|
|
312
|
-
html`
|
|
313
|
-
${comments.map((comment) => {
|
|
314
|
-
const type = comment.type
|
|
315
|
-
|
|
316
|
-
return html`
|
|
317
|
-
<div
|
|
318
|
-
class="ProseMirror-comment is-${type}"
|
|
319
|
-
data-type="${type}"
|
|
320
|
-
.pos=${comment.pos}
|
|
321
|
-
@click=${({ target }) => makeActive(target)}
|
|
322
|
-
>
|
|
323
|
-
${type === 'del' || type === 'ins'
|
|
324
|
-
? html`
|
|
325
|
-
<div class="ProseMirror-commentActions">
|
|
326
|
-
<div
|
|
327
|
-
class="ProseMirror-commentAccept"
|
|
328
|
-
@click=${(e) => {
|
|
329
|
-
e.stopPropagation()
|
|
330
|
-
e.target
|
|
331
|
-
.closest('.ProseMirror-comment')
|
|
332
|
-
.classList.remove('is-active')
|
|
333
|
-
acceptChanges()(
|
|
334
|
-
editorView.state,
|
|
335
|
-
editorView.dispatch,
|
|
336
|
-
editorView,
|
|
337
|
-
)
|
|
338
|
-
}}
|
|
339
|
-
></div>
|
|
340
|
-
<div
|
|
341
|
-
class="ProseMirror-commentReject"
|
|
342
|
-
@click=${(e) => {
|
|
343
|
-
e.stopPropagation()
|
|
344
|
-
e.target
|
|
345
|
-
.closest('.ProseMirror-comment')
|
|
346
|
-
.classList.remove('is-active')
|
|
347
|
-
rejectChanges()(
|
|
348
|
-
editorView.state,
|
|
349
|
-
editorView.dispatch,
|
|
350
|
-
editorView,
|
|
351
|
-
)
|
|
352
|
-
}}
|
|
353
|
-
></div>
|
|
354
|
-
</div>
|
|
355
|
-
`
|
|
356
|
-
: html`
|
|
357
|
-
<div class="ProseMirror-commentActions">
|
|
358
|
-
<div
|
|
359
|
-
class="ProseMirror-commentReply"
|
|
360
|
-
@click=${({ target }) => {
|
|
361
|
-
updateComment(target, (replies) => {
|
|
362
|
-
replies.push({
|
|
363
|
-
time: moment().format('MM/D/YYYY h:mm:ss A'),
|
|
364
|
-
userId: document.documentElement.dataset.userId,
|
|
365
|
-
user: document.documentElement.dataset.userLabel,
|
|
366
|
-
text: '',
|
|
367
|
-
})
|
|
368
|
-
})
|
|
369
|
-
}}
|
|
370
|
-
></div>
|
|
371
|
-
</div>
|
|
372
|
-
`}
|
|
373
|
-
<div class="ProseMirror-commentUser">${comment.user}</div>
|
|
374
|
-
<div class="ProseMirror-commentTime">${comment.time}</div>
|
|
375
|
-
<div class="ProseMirror-commentText">
|
|
376
|
-
${type == 'del'
|
|
377
|
-
? html`Removed "${comment.text}"`
|
|
378
|
-
: type == 'ins'
|
|
379
|
-
? html`Added "${comment.text}"`
|
|
380
|
-
: html`
|
|
381
|
-
${comment.userId ===
|
|
382
|
-
document.documentElement.dataset.userId
|
|
383
|
-
? html`<textarea
|
|
384
|
-
placeholder="${comment.text}"
|
|
385
|
-
.value="${comment.text}"
|
|
386
|
-
@input=${({ target }) => {
|
|
387
|
-
const pos = target.closest(
|
|
388
|
-
'.ProseMirror-comment',
|
|
389
|
-
).pos
|
|
390
|
-
const state = editorView.state
|
|
391
|
-
const node = state.doc.nodeAt(pos)
|
|
392
|
-
if (!node) return
|
|
393
|
-
const newText = target.value
|
|
394
|
-
const tr = state.tr
|
|
395
|
-
if (newText) {
|
|
396
|
-
tr.replaceWith(
|
|
397
|
-
pos,
|
|
398
|
-
pos + node.nodeSize,
|
|
399
|
-
state.schema.text(newText, node.marks),
|
|
400
|
-
)
|
|
401
|
-
} else {
|
|
402
|
-
tr.delete(pos, pos + node.nodeSize)
|
|
403
|
-
}
|
|
404
|
-
editorView.dispatch(tr)
|
|
405
|
-
}}
|
|
406
|
-
/>`
|
|
407
|
-
: html`${comment.text}`}
|
|
408
|
-
${comment.replies
|
|
409
|
-
? html`
|
|
410
|
-
<div class="ProseMirror-commentReplies">
|
|
411
|
-
${comment.replies.map((reply, i) => {
|
|
412
|
-
return html`
|
|
413
|
-
<div class="ProseMirror-reply">
|
|
414
|
-
${reply.userId ===
|
|
415
|
-
document.documentElement.dataset.userId
|
|
416
|
-
? html`<div
|
|
417
|
-
class="ProseMirror-commentActions"
|
|
418
|
-
>
|
|
419
|
-
<div
|
|
420
|
-
class="ProseMirror-commentRemove"
|
|
421
|
-
@click=${({ target }) => {
|
|
422
|
-
updateComment(
|
|
423
|
-
target,
|
|
424
|
-
(replies) => {
|
|
425
|
-
replies.splice(i, 1)
|
|
426
|
-
},
|
|
427
|
-
)
|
|
428
|
-
}}
|
|
429
|
-
></div>
|
|
430
|
-
</div>`
|
|
431
|
-
: ''}
|
|
432
|
-
<div class="ProseMirror-commentUser">
|
|
433
|
-
${reply.user}
|
|
434
|
-
</div>
|
|
435
|
-
<div class="ProseMirror-commentTime">
|
|
436
|
-
${reply.time}
|
|
437
|
-
</div>
|
|
438
|
-
<div class="ProseMirror-commentText">
|
|
439
|
-
${reply.userId ===
|
|
440
|
-
document.documentElement.dataset.userId
|
|
441
|
-
? html`
|
|
442
|
-
<textarea
|
|
443
|
-
.value="${reply.text}"
|
|
444
|
-
@input=${({ target }) => {
|
|
445
|
-
updateComment(
|
|
446
|
-
target,
|
|
447
|
-
(replies) => {
|
|
448
|
-
replies[i].text =
|
|
449
|
-
target.value
|
|
450
|
-
},
|
|
451
|
-
)
|
|
452
|
-
}}
|
|
453
|
-
/>
|
|
454
|
-
`
|
|
455
|
-
: reply.text}
|
|
456
|
-
</div>
|
|
457
|
-
</div>
|
|
458
|
-
`
|
|
459
|
-
})}
|
|
460
|
-
</div>
|
|
461
|
-
`
|
|
462
|
-
: ''}
|
|
463
|
-
`}
|
|
464
|
-
</div>
|
|
465
|
-
</div>
|
|
466
|
-
`
|
|
467
|
-
})}
|
|
468
|
-
`,
|
|
469
|
-
this.comments,
|
|
470
|
-
)
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
export { FullScreenView }
|
package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/html_editor_manager/htmlEditorManager.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-debugger */
|
|
2
|
-
import { Plugin, PluginKey } from 'prosemirror-state'
|
|
3
|
-
import { HtmlEditorView } from './views/HtmlEditorView'
|
|
4
|
-
import { keydownHandler } from 'prosemirror-keymap'
|
|
5
|
-
import { findKeyMapping, keyMappingHandler } from '../../settings/keymapBuilder'
|
|
6
|
-
|
|
7
|
-
const key = new PluginKey('htmlEditor')
|
|
8
|
-
const keyHandler = {}
|
|
9
|
-
|
|
10
|
-
keyHandler[findKeyMapping('html')] = keyMappingHandler('rte2-toolbar-html')
|
|
11
|
-
|
|
12
|
-
const modeToggle = () => {
|
|
13
|
-
return function (state, dispatch) {
|
|
14
|
-
dispatch(
|
|
15
|
-
state.tr.setMeta(key, {
|
|
16
|
-
toggleHTMLEditor: true,
|
|
17
|
-
}),
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
return true
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const htmlEditorPlugin = (compliantTagNameMap) => {
|
|
25
|
-
return new Plugin({
|
|
26
|
-
key,
|
|
27
|
-
|
|
28
|
-
view(editorView) {
|
|
29
|
-
this.view = new HtmlEditorView(key.key, compliantTagNameMap)
|
|
30
|
-
editorView.dom.parentElement.appendChild(this.view.dom)
|
|
31
|
-
return this.view
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
state: {
|
|
35
|
-
init(_, state) {
|
|
36
|
-
const pluginState = new Map()
|
|
37
|
-
const activeStates = new Map()
|
|
38
|
-
pluginState.set('activeStates', activeStates)
|
|
39
|
-
pluginState.set('isEditorVisible', false)
|
|
40
|
-
return pluginState
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
apply(transaction, value) {
|
|
44
|
-
const oldPuginState = value
|
|
45
|
-
const pluginState = new Map(oldPuginState)
|
|
46
|
-
const activeStates = new Map()
|
|
47
|
-
const meta = transaction.getMeta(key)
|
|
48
|
-
|
|
49
|
-
if (meta && meta.hasOwnProperty('toggleHTMLEditor')) {
|
|
50
|
-
pluginState.set(
|
|
51
|
-
'isEditorVisible',
|
|
52
|
-
!oldPuginState.get('isEditorVisible'),
|
|
53
|
-
)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
pluginState.set('activeStates', activeStates)
|
|
57
|
-
return pluginState
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
props: {
|
|
61
|
-
handleKeyDown: keydownHandler(keyHandler),
|
|
62
|
-
},
|
|
63
|
-
})
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export { htmlEditorPlugin, modeToggle }
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-debugger */
|
|
2
|
-
import { AllSelection } from 'prosemirror-state'
|
|
3
|
-
import { DOMParser } from 'prosemirror-model'
|
|
4
|
-
import { getLegacyHTMLTextForProsemirror } from '../../../codemirror-shim'
|
|
5
|
-
import CodeMirror from 'codemirror'
|
|
6
|
-
import 'codemirror/lib/codemirror.css'
|
|
7
|
-
import 'codemirror/mode/htmlmixed/htmlmixed.js'
|
|
8
|
-
|
|
9
|
-
if (!window.BRIGHTSPOT?.ui.cms.enableV5UI) {
|
|
10
|
-
await import('../../../../../../../form/CodeInput/CodeMirror.less')
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Adds functionality to hide PM and open a CodeMirror HTML editor.
|
|
15
|
-
*/
|
|
16
|
-
class HtmlEditorView {
|
|
17
|
-
/**
|
|
18
|
-
* @param {ProseMirror.PluginKey} myKey
|
|
19
|
-
*/
|
|
20
|
-
constructor(myKey, compliantTagNameMap) {
|
|
21
|
-
this.myKey = myKey
|
|
22
|
-
this.compliantTagNameMap = compliantTagNameMap
|
|
23
|
-
this.dom = document.createElement('textarea')
|
|
24
|
-
this.dom.dataset.hideWordCount = true
|
|
25
|
-
this.dom.className = 'Prosemirror-html-editor'
|
|
26
|
-
this.dom.style.display = 'none'
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @param {ProseMirror.EditorView} view
|
|
31
|
-
*/
|
|
32
|
-
update(view) {
|
|
33
|
-
const { state } = view
|
|
34
|
-
const pluginState = state[this.myKey]
|
|
35
|
-
|
|
36
|
-
if (!pluginState.get('isEditorVisible') && !this.editor) {
|
|
37
|
-
return
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (pluginState.get('isEditorVisible')) {
|
|
41
|
-
const ctx = view.props.props.ctx
|
|
42
|
-
this.dom.value = ctx.value
|
|
43
|
-
this.editor = CodeMirror.fromTextArea(this.dom, {
|
|
44
|
-
lineNumbers: true,
|
|
45
|
-
mode: 'htmlmixed',
|
|
46
|
-
lineWrapping: true,
|
|
47
|
-
})
|
|
48
|
-
// CodeMirror swaps out textarea and we need to be sure it isn't picked up by v3#updateWordCount
|
|
49
|
-
// and get Word/Char counts added to the new textarea used by CodeMirror.
|
|
50
|
-
this.editor
|
|
51
|
-
.getWrapperElement()
|
|
52
|
-
.querySelector('textarea').dataset.hideWordCount = true
|
|
53
|
-
view.dom.style.display = 'none'
|
|
54
|
-
view.dom.parentElement.classList.add('is-htmlMode')
|
|
55
|
-
const fullscreenContainer = view.dom.closest(
|
|
56
|
-
'.ProseMirror-fullscreen-container',
|
|
57
|
-
)
|
|
58
|
-
if (fullscreenContainer) {
|
|
59
|
-
fullscreenContainer.classList.add('is-htmlMode')
|
|
60
|
-
}
|
|
61
|
-
} else {
|
|
62
|
-
this._toProseMirror(view)
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
_toProseMirror(view) {
|
|
67
|
-
const { state, dispatch } = view
|
|
68
|
-
|
|
69
|
-
if (!this.editor) {
|
|
70
|
-
return
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
this.editor.toTextArea()
|
|
74
|
-
this.editor = null
|
|
75
|
-
this.dom.style.display = 'none'
|
|
76
|
-
view.dom.style.display = 'block'
|
|
77
|
-
view.dom.parentElement.classList.remove('is-htmlMode')
|
|
78
|
-
const fullscreenContainer = view.dom.closest(
|
|
79
|
-
'.ProseMirror-fullscreen-container',
|
|
80
|
-
)
|
|
81
|
-
if (fullscreenContainer) {
|
|
82
|
-
fullscreenContainer.classList.remove('is-htmlMode')
|
|
83
|
-
}
|
|
84
|
-
const tmpElement = document.createElement('div')
|
|
85
|
-
const shimmed = getLegacyHTMLTextForProsemirror(
|
|
86
|
-
this.dom.value,
|
|
87
|
-
state.config.schema,
|
|
88
|
-
this.compliantTagNameMap,
|
|
89
|
-
)
|
|
90
|
-
tmpElement.innerHTML = shimmed
|
|
91
|
-
const parsed = DOMParser.fromSchema(state.config.schema).parse(tmpElement)
|
|
92
|
-
const allSelection = new AllSelection(state.doc)
|
|
93
|
-
dispatch(state.tr.setSelection(allSelection).replaceSelectionWith(parsed))
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export { HtmlEditorView }
|