@brightspot/ui 3.0.1-cms-ui-migration.2 → 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 +1924 -1924
- package/dist/storybook/assets/{ActionBar.stories-hJ_5cm-P.js → ActionBar.stories-CSxtZl7v.js} +1 -1
- package/dist/storybook/assets/{ActionItem.stories-Bjx2803w.js → ActionItem.stories-BWcMRMP3.js} +1 -1
- package/dist/storybook/assets/{Avatar.stories-Cj0YgZ6f.js → Avatar.stories-CYTUGXzH.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup.stories-Lh_sQFCU.js → AvatarGroup.stories-CSYBYo_5.js} +1 -1
- package/dist/storybook/assets/{Badge.stories-BL7RUibx.js → Badge.stories-LuF4BuVr.js} +1 -1
- package/dist/storybook/assets/{Button-BPHNcxqK.js → Button-CrXCMxHb.js} +1 -1
- package/dist/storybook/assets/{Button.stories-CAYO4gdU.js → Button.stories-JVwxdrdM.js} +1 -1
- package/dist/storybook/assets/{ButtonGroup.stories-Cd13Us5K.js → ButtonGroup.stories-qtq64a1H.js} +1 -1
- package/dist/storybook/assets/{Celebrate.stories-D_KE3Qze.js → Celebrate.stories-DjTtaSd6.js} +1 -1
- package/dist/storybook/assets/{Checkbox.stories-Aj1xgZVn.js → Checkbox.stories-v1Pr5mL6.js} +1 -1
- package/dist/storybook/assets/{CircularProgress.stories-BecV_v6d.js → CircularProgress.stories-DkV7PJ4D.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin.stories-DU-WiZ2f.js → ClipboardMixin.stories-Dh5c7uSM.js} +1 -1
- package/dist/storybook/assets/{Color-6BZIO3FS-BYl4KZZn.js → Color-6BZIO3FS-B1gcREt6.js} +1 -1
- package/dist/storybook/assets/{Colors.stories-BMUVUy2q.js → Colors.stories-DnubtRqn.js} +1 -1
- package/dist/storybook/assets/{CombinedEffects.stories-FHcPKFm6.js → CombinedEffects.stories-By6akSve.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin-EMUnfT5y.js → ComponentStatesMixin-CPLGv3h-.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-SXq0kzS9.js → ComponentStatesMixin.stories-CiQ_lyhm.js} +1 -1
- package/dist/storybook/assets/{CopyToClipboard.stories-u43lhvcI.js → CopyToClipboard.stories-cJ7rl3mj.js} +1 -1
- package/dist/storybook/assets/{Debounce.stories-BdCn5qgO.js → Debounce.stories-Bw-goobU.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-LL677BLK-DxiEJ_jx.js → DocsRenderer-LL677BLK-CNW57dGQ.js} +3 -3
- package/dist/storybook/assets/{Dropdown.stories-BWSRwjIF.js → Dropdown.stories-CwC3HXXd.js} +1 -1
- package/dist/storybook/assets/{EmptyState.stories-BpobeZL5.js → EmptyState.stories-BUEJwuhP.js} +1 -1
- package/dist/storybook/assets/{Events.stories-CP5kMzpr.js → Events.stories-D1mf9buv.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-CbJD-oTB.js → Heading.stories-DO906G4P.js} +1 -1
- package/dist/storybook/assets/{HueRipple.stories-BOABJ7zw.js → HueRipple.stories-BOySRSZB.js} +1 -1
- package/dist/storybook/assets/{Icon.stories-CWlUHL4j.js → Icon.stories-BsqgTbdG.js} +1 -1
- package/dist/storybook/assets/{IconButton.stories-BWBs-OLT.js → IconButton.stories-aza1AAKk.js} +1 -1
- package/dist/storybook/assets/{LinearProgress.stories-LZ0GZoxF.js → LinearProgress.stories-CDYmiiex.js} +1 -1
- package/dist/storybook/assets/{Pagination.stories-CbLaR3P9.js → Pagination.stories-LXB-x7YB.js} +1 -1
- package/dist/storybook/assets/{Popover.stories-JHrWqYZw.js → Popover.stories-DY1HesPJ.js} +1 -1
- package/dist/storybook/assets/{ReadyMixin-B1H2a9x8.js → ReadyMixin-DmOC67IJ.js} +1 -1
- package/dist/storybook/assets/{RovingTabindexMixin.stories-UMHpYG73.js → RovingTabindexMixin.stories-BWy0Rq8d.js} +1 -1
- package/dist/storybook/assets/{Rtc.stories-VQtNSlls.js → Rtc.stories-DrmdqqbI.js} +1 -1
- package/dist/storybook/assets/{ScrollShadow.stories-CYdi8Tgp.js → ScrollShadow.stories-DiKFPazh.js} +1 -1
- package/dist/storybook/assets/{Switch.stories-D8F2hZCf.js → Switch.stories-BgFnw8_z.js} +1 -1
- package/dist/storybook/assets/{Tab.stories-wgBP0lTj.js → Tab.stories-c2wLMooF.js} +1 -1
- package/dist/storybook/assets/{Tabs.stories-C00rr5sf.js → Tabs.stories-CjH8seNP.js} +1 -1
- package/dist/storybook/assets/{Throttle.stories-BhQEfJbS.js → Throttle.stories-CXysc_QE.js} +1 -1
- package/dist/storybook/assets/{Tooltip.stories-CGoZ5qTn.js → Tooltip.stories-6qzyByPm.js} +1 -1
- package/dist/storybook/assets/{Upload.stories-B3K-HAXw.js → Upload.stories-BLxykydQ.js} +1 -1
- package/dist/storybook/assets/{UploadItem.stories-71ArSoUh.js → UploadItem.stories-CcfcqdJW.js} +1 -1
- package/dist/storybook/assets/{Welcome.stories-CihlfFXS.js → Welcome.stories-CzYS_3fH.js} +1 -1
- package/dist/storybook/assets/{Widget.stories-1u4KbiJM.js → Widget.stories-Du7T4LAI.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-65CFNBJE-B3Jitxw9.js → WithTooltip-65CFNBJE-D4LfXdYt.js} +1 -1
- package/dist/storybook/assets/{blocks-C1HaXuQB.js → blocks-DR3fGePu.js} +5 -5
- package/dist/storybook/assets/{formatter-EIJCOSYU-Dy9Lt9fs.js → formatter-EIJCOSYU-Cf01216O.js} +1 -1
- package/dist/storybook/assets/if-defined-DaMmbcIU.js +1 -0
- package/dist/storybook/assets/{iframe-Dx6IxWXF.js → iframe-CQArUhO8.js} +4 -4
- package/dist/storybook/assets/{index-OrjedSVh.js → index-B1uI_67G.js} +1 -1
- package/dist/storybook/assets/{onFind-YTqjw6W0.js → onFind-BpFkN2Rh.js} +1 -1
- package/dist/storybook/assets/{onFind.stories-DEvwTrmx.js → onFind.stories-Cxdeg69X.js} +1 -1
- package/dist/storybook/assets/{onRemove.stories-D5mO-Lin.js → onRemove.stories-BHEWpNrE.js} +1 -1
- package/dist/storybook/assets/{onVisible.stories-C3Rcz0Eb.js → onVisible.stories-DFJ3S_ZS.js} +1 -1
- package/dist/storybook/assets/{style-map-CiMHry7H.js → style-map-DJ83UC3V.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-DIZnuhb2.js → syntaxhighlighter-ED5Y7EFY-zYN83mxK.js} +1 -1
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/project.json +1 -1
- package/package.json +16 -2
- package/dist/storybook/assets/if-defined-CA2KmTqA.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/find_replace_manager/views/FindView.js
DELETED
|
@@ -1,604 +0,0 @@
|
|
|
1
|
-
import { getPluginState } from '../../../utilities'
|
|
2
|
-
import { escapeRegEx } from '../FindReplaceManager'
|
|
3
|
-
import { html, render } from 'lit-html'
|
|
4
|
-
|
|
5
|
-
if (!window.BRIGHTSPOT?.ui.cms.enableV5UI) {
|
|
6
|
-
await import('./ProseMirrorFindReplace.less')
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const BASE_CLASS = 'ProseMirrorFindReplace-findContainer'
|
|
10
|
-
const FIND_PLACEHOLDER = RTE_FIND_IN_ARTICLE || 'Find in Article...'
|
|
11
|
-
const REPLACE_PLACEHOLDER = RTE_REPLACE_WITH || 'Replace with'
|
|
12
|
-
const MATCH_CASE_LABEL = RTE_MATCH_CASE || 'Replace'
|
|
13
|
-
const MATCH_WHOLE_WORD_LABEL = RTE_MATCH_WHOLE_WORD || 'Match Whole Word'
|
|
14
|
-
const REPLACE_BUTTON_TEXT = RTE_REPLACE || 'Replace'
|
|
15
|
-
const REPLACE_ALL_BUTTON_TEXT = RTE_REPLACE_ALL || 'Replace All'
|
|
16
|
-
const PAGINATION_TEXT = RTE_PAGINATION_TEXT || 'of'
|
|
17
|
-
const COLLAPSED_CLASS = 'collapsed'
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Adds "find and replace" functionality and sets up the markup
|
|
21
|
-
* for the find and replace widget.
|
|
22
|
-
*/
|
|
23
|
-
class FindView {
|
|
24
|
-
/**
|
|
25
|
-
* The Find and Replace container Replace markup.
|
|
26
|
-
*
|
|
27
|
-
* @param {Object.<text|number>} data UI State data
|
|
28
|
-
* @return {TemplateResult}
|
|
29
|
-
*/
|
|
30
|
-
replaceTemplate = (data) => {
|
|
31
|
-
let isDisabledActive = false
|
|
32
|
-
if (
|
|
33
|
-
data.findInputVal &&
|
|
34
|
-
data.replaceInputVal &&
|
|
35
|
-
data.findInputVal !== data.replaceInputVal &&
|
|
36
|
-
data.total &&
|
|
37
|
-
data.current
|
|
38
|
-
) {
|
|
39
|
-
isDisabledActive = true
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return html`
|
|
43
|
-
<div class="${BASE_CLASS}-replaceContainer ${COLLAPSED_CLASS}" hidden>
|
|
44
|
-
<input
|
|
45
|
-
class="${BASE_CLASS}-replace-input"
|
|
46
|
-
type="text"
|
|
47
|
-
data-hide-word-count="true"
|
|
48
|
-
placeholder="${REPLACE_PLACEHOLDER}"
|
|
49
|
-
/>
|
|
50
|
-
|
|
51
|
-
<div class="${BASE_CLASS}-options">
|
|
52
|
-
<label
|
|
53
|
-
><input
|
|
54
|
-
class="${BASE_CLASS}-options-matchCase"
|
|
55
|
-
type="checkbox"
|
|
56
|
-
/>${MATCH_CASE_LABEL}</label
|
|
57
|
-
>
|
|
58
|
-
<label
|
|
59
|
-
><input
|
|
60
|
-
class="${BASE_CLASS}-options-matchWholeWord"
|
|
61
|
-
type="checkbox"
|
|
62
|
-
/>${MATCH_WHOLE_WORD_LABEL}</label
|
|
63
|
-
>
|
|
64
|
-
</div>
|
|
65
|
-
<div class="${BASE_CLASS}-actions">
|
|
66
|
-
<button
|
|
67
|
-
@click=${this.handleReplace}
|
|
68
|
-
class="${BASE_CLASS}-actions-replace"
|
|
69
|
-
?disabled=${!isDisabledActive}
|
|
70
|
-
>
|
|
71
|
-
${REPLACE_BUTTON_TEXT}
|
|
72
|
-
</button>
|
|
73
|
-
<button
|
|
74
|
-
@click=${this.handleReplaceAll}
|
|
75
|
-
class="${BASE_CLASS}-actions-replaceAll"
|
|
76
|
-
?disabled=${!isDisabledActive}
|
|
77
|
-
>
|
|
78
|
-
${REPLACE_ALL_BUTTON_TEXT}
|
|
79
|
-
</button>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
`
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* The Find and Replace container Pagination markup.
|
|
87
|
-
*
|
|
88
|
-
* @param {Object.<text|number>} data UI State data
|
|
89
|
-
* @return {TemplateResult}
|
|
90
|
-
*/
|
|
91
|
-
paginationTemplate = (data) => {
|
|
92
|
-
let isNextActive = false
|
|
93
|
-
let isPrevActive = false
|
|
94
|
-
let isLTR = document.querySelector('html').getAttribute('dir') === 'ltr'
|
|
95
|
-
|
|
96
|
-
if (data.current < data.total) {
|
|
97
|
-
isNextActive = true
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (data.current > 1) {
|
|
101
|
-
isPrevActive = true
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const prevClass = isPrevActive
|
|
105
|
-
? `${BASE_CLASS}-pagination-prev`
|
|
106
|
-
: `${BASE_CLASS}-pagination-prev disabled`
|
|
107
|
-
|
|
108
|
-
const nextClass = isNextActive
|
|
109
|
-
? `${BASE_CLASS}-pagination-next`
|
|
110
|
-
: `${BASE_CLASS}-pagination-next disabled`
|
|
111
|
-
|
|
112
|
-
const prevText = window.BRIGHTSPOT?.ui.tooltips.navigation.prevItem
|
|
113
|
-
const nextText = window.BRIGHTSPOT?.ui.tooltips.navigation.nextItem
|
|
114
|
-
|
|
115
|
-
if (isLTR) {
|
|
116
|
-
return html`
|
|
117
|
-
<div class="${BASE_CLASS}-pagination">
|
|
118
|
-
<button
|
|
119
|
-
class="${prevClass}"
|
|
120
|
-
type="button"
|
|
121
|
-
?disabled=${!isPrevActive}
|
|
122
|
-
aria-label="${prevText}"
|
|
123
|
-
title="${prevText}"
|
|
124
|
-
@click=${this.handlePagination}
|
|
125
|
-
></button>
|
|
126
|
-
<span class="${BASE_CLASS}-pagination-current">
|
|
127
|
-
${data.current}
|
|
128
|
-
</span>
|
|
129
|
-
${PAGINATION_TEXT}
|
|
130
|
-
<span class="${BASE_CLASS}-pagination-total"> ${data.total} </span>
|
|
131
|
-
<button
|
|
132
|
-
class="${nextClass}"
|
|
133
|
-
type="button"
|
|
134
|
-
?disabled=${!isNextActive}
|
|
135
|
-
aria-label="${nextText}"
|
|
136
|
-
title="${nextText}"
|
|
137
|
-
@click=${(e) => this.handlePagination(e, true)}
|
|
138
|
-
></button>
|
|
139
|
-
</div>
|
|
140
|
-
`
|
|
141
|
-
} else {
|
|
142
|
-
return html`
|
|
143
|
-
<div class="${BASE_CLASS}-pagination">
|
|
144
|
-
<button
|
|
145
|
-
class="${nextClass}"
|
|
146
|
-
type="button"
|
|
147
|
-
?disabled=${!isNextActive}
|
|
148
|
-
aria-label="${nextText}"
|
|
149
|
-
title="${nextText}"
|
|
150
|
-
@click=${(e) => this.handlePagination(e, true)}
|
|
151
|
-
></button>
|
|
152
|
-
<span class="${BASE_CLASS}-pagination-total"> ${data.total} </span>
|
|
153
|
-
|
|
154
|
-
${PAGINATION_TEXT}
|
|
155
|
-
|
|
156
|
-
<span class="${BASE_CLASS}-pagination-current">
|
|
157
|
-
${data.current}
|
|
158
|
-
</span>
|
|
159
|
-
<button
|
|
160
|
-
class="${prevClass}"
|
|
161
|
-
type="button"
|
|
162
|
-
?disabled=${!isPrevActive}
|
|
163
|
-
aria-label="${prevText}"
|
|
164
|
-
title="${prevText}"
|
|
165
|
-
@click=${this.handlePagination}
|
|
166
|
-
></button>
|
|
167
|
-
</div>
|
|
168
|
-
`
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* @param {ProseMirror.EditorView} editorView
|
|
174
|
-
* @param {ProseMirror.PluginKey} myKey
|
|
175
|
-
*/
|
|
176
|
-
constructor(editorView, myKey) {
|
|
177
|
-
this.focused = false
|
|
178
|
-
this.editorView = editorView
|
|
179
|
-
this.myKey = myKey
|
|
180
|
-
/**
|
|
181
|
-
* Represents the current 'found'.
|
|
182
|
-
*/
|
|
183
|
-
this.current = 1
|
|
184
|
-
/**
|
|
185
|
-
* The total 'found'.
|
|
186
|
-
*/
|
|
187
|
-
this.total = 0
|
|
188
|
-
/**
|
|
189
|
-
* The items currently found so that we can later
|
|
190
|
-
* replace them.
|
|
191
|
-
*/
|
|
192
|
-
this.found = []
|
|
193
|
-
this.dom = document.createElement('div')
|
|
194
|
-
this.dom.className = `${BASE_CLASS} ${COLLAPSED_CLASS}`
|
|
195
|
-
/**
|
|
196
|
-
* The plugin will use this to handle the decorations correctly based
|
|
197
|
-
* on whether the previous events were triggered by a replace action.
|
|
198
|
-
*/
|
|
199
|
-
this.isReplaceAction = false
|
|
200
|
-
/**
|
|
201
|
-
* Our Find and Replace widget markup.
|
|
202
|
-
*/
|
|
203
|
-
this.template = (data) => html`
|
|
204
|
-
<div class="${BASE_CLASS}-inputContainer">
|
|
205
|
-
<input
|
|
206
|
-
class="${BASE_CLASS}-input"
|
|
207
|
-
type="text"
|
|
208
|
-
data-hide-word-count="true"
|
|
209
|
-
placeholder="${FIND_PLACEHOLDER}"
|
|
210
|
-
/>
|
|
211
|
-
${this.paginationTemplate(data)}
|
|
212
|
-
<button
|
|
213
|
-
aria-label=${window.BRIGHTSPOT.ui.tooltips.expand}
|
|
214
|
-
aria-expanded="false"
|
|
215
|
-
type="button"
|
|
216
|
-
class="${BASE_CLASS}-more"
|
|
217
|
-
@click=${this.handleShowMore}
|
|
218
|
-
></button>
|
|
219
|
-
</div>
|
|
220
|
-
${this.replaceTemplate(data)}
|
|
221
|
-
`
|
|
222
|
-
/**
|
|
223
|
-
* Initital UI data from which to build the template.
|
|
224
|
-
*/
|
|
225
|
-
const data = {
|
|
226
|
-
current: 0,
|
|
227
|
-
total: 0,
|
|
228
|
-
findInputVal: '',
|
|
229
|
-
replaceInputVal: '',
|
|
230
|
-
}
|
|
231
|
-
render(this.template(data), this.dom)
|
|
232
|
-
|
|
233
|
-
this.matchCase = this.dom.querySelector(
|
|
234
|
-
'.ProseMirrorFindReplace-findContainer-options-matchCase',
|
|
235
|
-
)
|
|
236
|
-
this.matchWholeWord = this.dom.querySelector(
|
|
237
|
-
'.ProseMirrorFindReplace-findContainer-options-matchWholeWord',
|
|
238
|
-
)
|
|
239
|
-
this.findInputEle = this.dom.querySelector(
|
|
240
|
-
'.ProseMirrorFindReplace-findContainer-input',
|
|
241
|
-
)
|
|
242
|
-
this.replaceInputEle = this.dom.querySelector(
|
|
243
|
-
'.ProseMirrorFindReplace-findContainer-replace-input',
|
|
244
|
-
)
|
|
245
|
-
this.moreButtonEle = this.dom.querySelector(
|
|
246
|
-
'.ProseMirrorFindReplace-findContainer-more',
|
|
247
|
-
)
|
|
248
|
-
this.replaceContainerEle = this.dom.querySelector(
|
|
249
|
-
'.ProseMirrorFindReplace-findContainer-replaceContainer',
|
|
250
|
-
)
|
|
251
|
-
|
|
252
|
-
this.findInputEle.addEventListener('keyup', (evt) => {
|
|
253
|
-
this.handleFind(evt.target.value)
|
|
254
|
-
this.scroll()
|
|
255
|
-
})
|
|
256
|
-
|
|
257
|
-
this.findInputEle.addEventListener('focus', (evt) => {
|
|
258
|
-
evt.preventDefault()
|
|
259
|
-
this.handleFind(evt.target.value)
|
|
260
|
-
})
|
|
261
|
-
|
|
262
|
-
this.replaceInputEle.addEventListener('input', (evt) => {
|
|
263
|
-
evt.preventDefault()
|
|
264
|
-
render(
|
|
265
|
-
this.template({
|
|
266
|
-
current: this.current,
|
|
267
|
-
total: this.total,
|
|
268
|
-
findInputVal: this.findInputEle.value,
|
|
269
|
-
replaceInputVal: this.replaceInputEle.value,
|
|
270
|
-
}),
|
|
271
|
-
this.dom,
|
|
272
|
-
)
|
|
273
|
-
})
|
|
274
|
-
|
|
275
|
-
this.matchCase.addEventListener('change', (evt) => {
|
|
276
|
-
evt.preventDefault()
|
|
277
|
-
this.handleFind(this.findInputEle.value)
|
|
278
|
-
})
|
|
279
|
-
|
|
280
|
-
this.matchWholeWord.addEventListener('change', (evt) => {
|
|
281
|
-
evt.preventDefault()
|
|
282
|
-
this.handleFind(this.findInputEle.value)
|
|
283
|
-
})
|
|
284
|
-
|
|
285
|
-
// We want to keep the top of the Find and Replace widget
|
|
286
|
-
// anchored to the bottom of the toolbar, but the toolbar
|
|
287
|
-
// contracts and expands when our editorView contracts and
|
|
288
|
-
// expands (e.g. user toggles preview pane), so this will
|
|
289
|
-
// ensure the top of the widget remains anchored by letting us
|
|
290
|
-
// know when the editorView has implicitly resized itself.
|
|
291
|
-
const ro = new ResizeObserver(() => {
|
|
292
|
-
this.render()
|
|
293
|
-
})
|
|
294
|
-
|
|
295
|
-
ro.observe(this.editorView.dom)
|
|
296
|
-
|
|
297
|
-
// The following subscriptions are set up so that our plugin can
|
|
298
|
-
// let our view know that UI state data has changed and allow the
|
|
299
|
-
// view to update itself accordingly, rather than the plugin accessing
|
|
300
|
-
// view methods to update the view. UI state data changes can be triggered
|
|
301
|
-
// either by our widget view or by editorView itself, but this isolates
|
|
302
|
-
// UI state data changes to be made only here in the view.
|
|
303
|
-
PubSub.subscribe('findAdded', (incomingData) => {
|
|
304
|
-
this.updateCurrentValue('added', incomingData)
|
|
305
|
-
this.updateTotalValue(incomingData)
|
|
306
|
-
})
|
|
307
|
-
|
|
308
|
-
PubSub.subscribe('findRemoved', (incomingData) => {
|
|
309
|
-
this.updateCurrentValue('removed', incomingData)
|
|
310
|
-
this.updateTotalValue(incomingData)
|
|
311
|
-
})
|
|
312
|
-
|
|
313
|
-
PubSub.subscribe('findReset', (incomingData) => {
|
|
314
|
-
this.updateCurrentValue('reset', incomingData)
|
|
315
|
-
this.updateTotalValue(incomingData)
|
|
316
|
-
})
|
|
317
|
-
|
|
318
|
-
this.render()
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* Triggered when user clicks the next or previous pagination element.
|
|
323
|
-
*
|
|
324
|
-
* @param {Event} evt
|
|
325
|
-
* @param {Boolean} isNext
|
|
326
|
-
*/
|
|
327
|
-
handlePagination = (evt, isNext) => {
|
|
328
|
-
evt.preventDefault()
|
|
329
|
-
this.updateCurrentValue(isNext ? 'next' : 'previous')
|
|
330
|
-
this.handleFind(this.findInputEle.value)
|
|
331
|
-
|
|
332
|
-
const active = this.editorView.dom.querySelector(
|
|
333
|
-
'.ProseMirrorFindReplace-found.active',
|
|
334
|
-
)
|
|
335
|
-
|
|
336
|
-
if (active) {
|
|
337
|
-
this.scroll(true)
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* Scrolls to first match or the match currently active in the case of pagination.
|
|
343
|
-
*
|
|
344
|
-
* @param {*} isActive find element with 'active' class (used by pagination)
|
|
345
|
-
*/
|
|
346
|
-
scroll = (isActive) => {
|
|
347
|
-
const element = this.editorView.dom.querySelector(
|
|
348
|
-
`.ProseMirrorFindReplace-found${isActive ? '.active' : ''}`,
|
|
349
|
-
)
|
|
350
|
-
|
|
351
|
-
if (element) {
|
|
352
|
-
element.scrollIntoView({ behavior: 'smooth', block: 'center' })
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* Triggered when user clicks the more button to expand or
|
|
358
|
-
* collapse the Replace section of the Find and Replace widget.
|
|
359
|
-
*
|
|
360
|
-
* @param {Event} evt
|
|
361
|
-
*/
|
|
362
|
-
handleShowMore = (evt) => {
|
|
363
|
-
const showingMore = this.replaceContainerEle.toggleAttribute('hidden')
|
|
364
|
-
this.moreButtonEle.setAttribute(
|
|
365
|
-
'aria-label',
|
|
366
|
-
!showingMore
|
|
367
|
-
? window.BRIGHTSPOT.ui.tooltips.collapse
|
|
368
|
-
: window.BRIGHTSPOT.ui.tooltips.expand,
|
|
369
|
-
)
|
|
370
|
-
this.moreButtonEle.setAttribute(
|
|
371
|
-
'aria-expanded',
|
|
372
|
-
!showingMore ? 'true' : 'false',
|
|
373
|
-
)
|
|
374
|
-
this.replaceContainerEle.classList.toggle(COLLAPSED_CLASS)
|
|
375
|
-
this.moreButtonEle.classList.toggle('open')
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
/**
|
|
379
|
-
* Unified spot to set the total number of found. We then re-render
|
|
380
|
-
* our template accordingly to update the UI.
|
|
381
|
-
*
|
|
382
|
-
* @param {Object.<number>} incomingData
|
|
383
|
-
*/
|
|
384
|
-
updateTotalValue = (incomingData) => {
|
|
385
|
-
this.total = incomingData.total
|
|
386
|
-
render(
|
|
387
|
-
this.template({
|
|
388
|
-
current: this.current,
|
|
389
|
-
total: this.total,
|
|
390
|
-
findInputVal: this.findInputEle.value,
|
|
391
|
-
replaceInputVal: this.replaceInputEle.value,
|
|
392
|
-
}),
|
|
393
|
-
this.dom,
|
|
394
|
-
)
|
|
395
|
-
}
|
|
396
|
-
/**
|
|
397
|
-
* Actions that can modify the current value as well as the
|
|
398
|
-
* data accompanying data mutations centralized into 1 spot.
|
|
399
|
-
* This way, if the currentValue is not updating in the UI as
|
|
400
|
-
* expected, we should be able to more easily debug.
|
|
401
|
-
*
|
|
402
|
-
* We then re-render our template accordingly to update the UI.
|
|
403
|
-
*
|
|
404
|
-
* @param {string} action The action taken that can potentially
|
|
405
|
-
* mutate our currentValue data
|
|
406
|
-
*/
|
|
407
|
-
updateCurrentValue = (action, incomingData) => {
|
|
408
|
-
switch (action) {
|
|
409
|
-
case 'previous':
|
|
410
|
-
this.current = this.current - 1
|
|
411
|
-
break
|
|
412
|
-
case 'next':
|
|
413
|
-
this.current = this.current + 1
|
|
414
|
-
break
|
|
415
|
-
case 'removed':
|
|
416
|
-
if (incomingData.total === 0) {
|
|
417
|
-
this.current = 0
|
|
418
|
-
} else if (incomingData.total < this.current) {
|
|
419
|
-
this.current = 0
|
|
420
|
-
}
|
|
421
|
-
break
|
|
422
|
-
case 'added':
|
|
423
|
-
if (incomingData.total === 1) {
|
|
424
|
-
this.current = 0
|
|
425
|
-
}
|
|
426
|
-
break
|
|
427
|
-
case 'reset':
|
|
428
|
-
this.current = 0
|
|
429
|
-
break
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
render(
|
|
433
|
-
this.template({
|
|
434
|
-
current: this.current,
|
|
435
|
-
total: this.total,
|
|
436
|
-
findInputVal: this.findInputEle.value,
|
|
437
|
-
replaceInputVal: this.replaceInputEle.value,
|
|
438
|
-
}),
|
|
439
|
-
this.dom,
|
|
440
|
-
)
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* Replaces the current 'found'. We placed an `idx` property on each
|
|
445
|
-
* decoration's spec when they were created. This denotes what index the
|
|
446
|
-
* 'found' item is so that we can find it and replace it.
|
|
447
|
-
*
|
|
448
|
-
* @param {Event} evt
|
|
449
|
-
*/
|
|
450
|
-
handleReplace = (evt) => {
|
|
451
|
-
evt.preventDefault()
|
|
452
|
-
// Avoiding infinite loop
|
|
453
|
-
if (
|
|
454
|
-
this.findInputEle.value === this.replaceInputEle.value ||
|
|
455
|
-
!this.current
|
|
456
|
-
) {
|
|
457
|
-
return
|
|
458
|
-
}
|
|
459
|
-
const state = this.editorView.state
|
|
460
|
-
const dispatch = this.editorView.dispatch
|
|
461
|
-
let tr = state.tr
|
|
462
|
-
const pluginState = getPluginState(this.editorView, this.myKey)
|
|
463
|
-
let decos = pluginState.get('decos')
|
|
464
|
-
const decoArr = decos.find(null, null, (spec) => spec.idx === this.current)
|
|
465
|
-
if (decoArr && decoArr.length) {
|
|
466
|
-
const deco = decoArr[0]
|
|
467
|
-
const { from, to } = deco
|
|
468
|
-
tr = tr.delete(from, to)
|
|
469
|
-
tr = tr.insertText(this.replaceInputEle.value, from)
|
|
470
|
-
this.isReplaceAction = true
|
|
471
|
-
dispatch(tr)
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
this.isReplaceAction = false
|
|
475
|
-
this.handleFind(this.findInputEle.value)
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
/**
|
|
479
|
-
* Replaces all of the 'found'. Once the transation is dispatched, the plugin will
|
|
480
|
-
* take over and run its `handleFind` method because the editorView state will have changed
|
|
481
|
-
* from replacing the 'found'. This will trigger the publish of the new UI state and the
|
|
482
|
-
* UI will update accordingly without having to call our `handleFind.`
|
|
483
|
-
*
|
|
484
|
-
* @param {Event} evt
|
|
485
|
-
*/
|
|
486
|
-
handleReplaceAll = (evt) => {
|
|
487
|
-
evt.preventDefault()
|
|
488
|
-
// Avoiding infinite loop
|
|
489
|
-
if (this.findInputEle.value === this.replaceInputEle.value) {
|
|
490
|
-
return
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
const state = this.editorView.state
|
|
494
|
-
const dispatch = this.editorView.dispatch
|
|
495
|
-
let tr = state.tr
|
|
496
|
-
this.found.forEach((item, index) => {
|
|
497
|
-
const removed = this.findInputEle.value.length * index
|
|
498
|
-
const added = this.replaceInputEle.value.length * index
|
|
499
|
-
tr = tr.delete(item.from - removed + added, item.to - removed + added)
|
|
500
|
-
tr = tr.insertText(
|
|
501
|
-
this.replaceInputEle.value,
|
|
502
|
-
item.from - removed + added,
|
|
503
|
-
)
|
|
504
|
-
})
|
|
505
|
-
dispatch(tr)
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* Finds all matching text, matching case and whole word
|
|
510
|
-
* as specified by the UI selections. Since we can't create
|
|
511
|
-
* decorations from the view (and as such from an event not triggered by
|
|
512
|
-
* the editorView state changing), we instead set meta data denoting
|
|
513
|
-
* information about the matched text (position, etc) and use the view's
|
|
514
|
-
* dispatch method to trigger the transaction update. The plugin will take over
|
|
515
|
-
* when it receives the disptach and will create the decorations based off the
|
|
516
|
-
* meta data stored in the transaction. We then update our view state and UI.
|
|
517
|
-
*
|
|
518
|
-
* @param {string} text The characters to find.
|
|
519
|
-
*/
|
|
520
|
-
handleFind = (text) => {
|
|
521
|
-
const escapedText = escapeRegEx(text)
|
|
522
|
-
const state = this.editorView.state
|
|
523
|
-
const doc = state.doc
|
|
524
|
-
let tr = state.tr
|
|
525
|
-
const dispatch = this.editorView.dispatch
|
|
526
|
-
let toFind = []
|
|
527
|
-
let options = 'gi'
|
|
528
|
-
this.found = []
|
|
529
|
-
if (this.matchCase.checked) {
|
|
530
|
-
options = 'g'
|
|
531
|
-
}
|
|
532
|
-
if (this.current === 0) {
|
|
533
|
-
this.current = 1
|
|
534
|
-
}
|
|
535
|
-
if (text) {
|
|
536
|
-
let wordRegEx = new RegExp(escapedText, options)
|
|
537
|
-
if (this.matchWholeWord.checked) {
|
|
538
|
-
wordRegEx = new RegExp(`\\b${escapedText}\\b`, options)
|
|
539
|
-
}
|
|
540
|
-
let idx = 1
|
|
541
|
-
doc.descendants((node, pos) => {
|
|
542
|
-
if (node.isText) {
|
|
543
|
-
let match
|
|
544
|
-
while ((match = wordRegEx.exec(node.text))) {
|
|
545
|
-
const from = pos + match.index
|
|
546
|
-
const to = pos + match.index + match[0].length
|
|
547
|
-
this.found.push({ from, to })
|
|
548
|
-
let isActive = false
|
|
549
|
-
if (idx === this.current) {
|
|
550
|
-
isActive = true
|
|
551
|
-
}
|
|
552
|
-
toFind.push({ from, to, isActive, text, idx })
|
|
553
|
-
idx++
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
})
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
tr = tr.setMeta(this.myKey, {
|
|
560
|
-
toFind,
|
|
561
|
-
})
|
|
562
|
-
dispatch(tr)
|
|
563
|
-
this.updateTotalValue({ total: toFind.length })
|
|
564
|
-
if (!toFind.length) {
|
|
565
|
-
this.updateCurrentValue('reset')
|
|
566
|
-
} else {
|
|
567
|
-
render(
|
|
568
|
-
this.template({
|
|
569
|
-
current: this.current,
|
|
570
|
-
total: this.total,
|
|
571
|
-
findInputVal: this.findInputEle.value,
|
|
572
|
-
replaceInputVal: this.replaceInputEle.value,
|
|
573
|
-
}),
|
|
574
|
-
this.dom,
|
|
575
|
-
)
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
/**
|
|
580
|
-
* Renders the Find and Replace widget by displaying it if our plugin state
|
|
581
|
-
* has an active state of `find`. Also anchors the top of the widget to the bottom
|
|
582
|
-
* of the toolbar, whose height expands and contracts with the UI.
|
|
583
|
-
*/
|
|
584
|
-
render() {
|
|
585
|
-
const pluginState = getPluginState(this.editorView, this.myKey)
|
|
586
|
-
const isOpen = pluginState.get('activeStates').get('find')
|
|
587
|
-
if (isOpen) {
|
|
588
|
-
this.dom.classList.remove(COLLAPSED_CLASS)
|
|
589
|
-
if (!this.focused) {
|
|
590
|
-
this.findInputEle.focus()
|
|
591
|
-
this.focused = true
|
|
592
|
-
}
|
|
593
|
-
} else {
|
|
594
|
-
this.dom.classList.add(COLLAPSED_CLASS)
|
|
595
|
-
this.focused = false
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
update() {
|
|
600
|
-
this.render()
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
export { FindView }
|
package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/fullscreen_manager/FullscreenManager.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-debugger */
|
|
2
|
-
import { Plugin, PluginKey } from 'prosemirror-state'
|
|
3
|
-
import { FullScreenView } from './views/FullscreenView'
|
|
4
|
-
import { keydownHandler } from 'prosemirror-keymap'
|
|
5
|
-
import { findKeyMapping, keyMappingHandler } from '../../settings/keymapBuilder'
|
|
6
|
-
|
|
7
|
-
const fullScreenKey = new PluginKey('fullScreenManager')
|
|
8
|
-
const keyHandler = {}
|
|
9
|
-
|
|
10
|
-
keyHandler[findKeyMapping('fullscreen')] = keyMappingHandler(
|
|
11
|
-
'rte2-toolbar-fullscreen',
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
const fullScreenManagerPlugin = (schema) => {
|
|
15
|
-
return new Plugin({
|
|
16
|
-
key: fullScreenKey,
|
|
17
|
-
|
|
18
|
-
view(editorView) {
|
|
19
|
-
this.view = new FullScreenView(editorView, this.key.key)
|
|
20
|
-
return this.view
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
state: {
|
|
24
|
-
init(_, state) {
|
|
25
|
-
const pluginState = new Map()
|
|
26
|
-
const activeStates = new Map()
|
|
27
|
-
activeStates.set('fullscreen', false)
|
|
28
|
-
pluginState.set('activeStates', activeStates)
|
|
29
|
-
pluginState.set('hasToggle', false)
|
|
30
|
-
return pluginState
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
apply(transaction, value, oldState, newState) {
|
|
34
|
-
const pluginState = value
|
|
35
|
-
const meta = transaction.getMeta(fullScreenKey)
|
|
36
|
-
|
|
37
|
-
if (meta && meta.hasOwnProperty('toggleFullScreen')) {
|
|
38
|
-
const currentState = pluginState
|
|
39
|
-
const newCurrentState = !currentState
|
|
40
|
-
.get('activeStates')
|
|
41
|
-
.get('fullscreen')
|
|
42
|
-
pluginState.get('activeStates').set('fullscreen', newCurrentState)
|
|
43
|
-
pluginState.set('hasToggle', true)
|
|
44
|
-
this.spec.view.update()
|
|
45
|
-
} else {
|
|
46
|
-
pluginState.set('hasToggle', false)
|
|
47
|
-
}
|
|
48
|
-
return pluginState
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
props: {
|
|
52
|
-
handleKeyDown: keydownHandler(keyHandler),
|
|
53
|
-
},
|
|
54
|
-
})
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export { fullScreenManagerPlugin, fullScreenKey }
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Brightspot Rich Text Editor Full Screen Manager Plugin
|
|
2
|
-
|
|
3
|
-
Extends Prosemirror to allow users to put the editor in a full-screen mode.
|
|
4
|
-
|
|
5
|
-
## Table of Contents
|
|
6
|
-
|
|
7
|
-
1. [Must Knows](#must-knows)
|
|
8
|
-
2. [Component and Directory Structure](#component-and-directory-structure)
|
|
9
|
-
1. [Commands](#commands)
|
|
10
|
-
2. [List Manager Plugin](#list-manager-plugin)
|
|
11
|
-
|
|
12
|
-
## Must Knows
|
|
13
|
-
|
|
14
|
-
1. The menu icon for this is baked into the settings/menu-items list.
|
|
15
|
-
|
|
16
|
-
## Component and Directory Structure
|
|
17
|
-
|
|
18
|
-
### Commands
|
|
19
|
-
|
|
20
|
-
This is where all state mutations should occur. Commands are exposed to the RTE api and can be triggered from anywhere in the RTE, such as menu icons and keyboard commands.
|
|
21
|
-
|
|
22
|
-
### Full Screen Manager Plugin
|
|
23
|
-
|
|
24
|
-
The state management aspect of the plugin, which is also what is registered with the plugin setup.
|
|
25
|
-
|
|
26
|
-
_Note_: Updating state always means creating a new state derived from the old state + changes. State should always remain immutable.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-debugger */
|
|
2
|
-
import { fullScreenKey } from './FullscreenManager'
|
|
3
|
-
|
|
4
|
-
const goFullScreen = () => {
|
|
5
|
-
return function (state, dispatch, editorView) {
|
|
6
|
-
dispatch(
|
|
7
|
-
state.tr.setMeta(fullScreenKey, {
|
|
8
|
-
toggleFullScreen: true,
|
|
9
|
-
}),
|
|
10
|
-
)
|
|
11
|
-
|
|
12
|
-
return true
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { goFullScreen }
|