@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
|
@@ -1,613 +0,0 @@
|
|
|
1
|
-
import { getEnhancementEditFormURL } from '../../enhancement_manager/EnhancementManager'
|
|
2
|
-
import { v1 as uuidv1 } from 'uuid'
|
|
3
|
-
import {
|
|
4
|
-
mergeCells,
|
|
5
|
-
splitCell,
|
|
6
|
-
addRowAfter,
|
|
7
|
-
addRowBefore,
|
|
8
|
-
addColumnBefore,
|
|
9
|
-
addColumnAfter,
|
|
10
|
-
deleteRow,
|
|
11
|
-
deleteColumn,
|
|
12
|
-
CellSelection,
|
|
13
|
-
} from 'prosemirror-tables'
|
|
14
|
-
import {
|
|
15
|
-
removeEnhancement,
|
|
16
|
-
moveEnhancementUp,
|
|
17
|
-
moveEnhancementDown,
|
|
18
|
-
moveEnhancement,
|
|
19
|
-
} from '../../enhancement_manager/commands'
|
|
20
|
-
import {
|
|
21
|
-
findParentNodeOfTypeClosestToPos,
|
|
22
|
-
findParentNode,
|
|
23
|
-
} from 'prosemirror-utils'
|
|
24
|
-
import Tether from '../../../../dom/Tether'
|
|
25
|
-
import create from '../../../../dom/create'
|
|
26
|
-
|
|
27
|
-
if (!window.BRIGHTSPOT?.ui.cms.enableV5UI) {
|
|
28
|
-
await import('./ProseMirror-table.less')
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const RTE_DELETE_ROW_TEXT =
|
|
32
|
-
typeof RTE_DELETE_ROW !== 'undefined' ? RTE_DELETE_ROW : 'rte.deleteRow'
|
|
33
|
-
const RTE_DELETE_COLUMN_TEXT =
|
|
34
|
-
typeof RTE_DELETE_COLUMN !== 'undefined'
|
|
35
|
-
? RTE_DELETE_COLUMN
|
|
36
|
-
: 'rte.deleteColumn'
|
|
37
|
-
const RTE_ADD_COLUMN_RIGHT_TEXT =
|
|
38
|
-
typeof RTE_ADD_COLUMN_RIGHT !== 'undefined'
|
|
39
|
-
? RTE_ADD_COLUMN_RIGHT
|
|
40
|
-
: 'rte.addColumnRight'
|
|
41
|
-
const RTE_ADD_COLUMN_LEFT_TEXT =
|
|
42
|
-
typeof RTE_ADD_COLUMN_LEFT !== 'undefined'
|
|
43
|
-
? RTE_ADD_COLUMN_LEFT
|
|
44
|
-
: 'rte.addColumnLeft'
|
|
45
|
-
const RTE_ADD_ROW_ABOVE_TEXT =
|
|
46
|
-
typeof RTE_ADD_ROW_ABOVE !== 'undefined'
|
|
47
|
-
? RTE_ADD_ROW_ABOVE
|
|
48
|
-
: 'rte.addRowAbove'
|
|
49
|
-
const RTE_ADD_ROW_BELOW_TEXT =
|
|
50
|
-
typeof RTE_ADD_ROW_BELOW !== 'undefined'
|
|
51
|
-
? RTE_ADD_ROW_BELOW
|
|
52
|
-
: 'rte.addRowBelow'
|
|
53
|
-
const RTE_EDIT_TABLE_ATTRS_TEXT =
|
|
54
|
-
typeof RTE_EDIT_TABLE_ATTRS !== 'undefined'
|
|
55
|
-
? RTE_EDIT_TABLE_ATTRS
|
|
56
|
-
: 'rte.editTableAttrs'
|
|
57
|
-
const RTE_EDIT_TABLE_ROW_ATTRS_TEXT =
|
|
58
|
-
typeof RTE_EDIT_TABLE_ROW_ATTRS !== 'undefined'
|
|
59
|
-
? RTE_EDIT_TABLE_ROW_ATTRS
|
|
60
|
-
: 'rte.editTableRowAttrs'
|
|
61
|
-
const RTE_EDIT_TABLE_CELL_ATTRS_TEXT =
|
|
62
|
-
typeof RTE_EDIT_TABLE_CELL_ATTRS !== 'undefined'
|
|
63
|
-
? RTE_EDIT_TABLE_CELL_ATTRS
|
|
64
|
-
: 'rte.editTableCellAttrs'
|
|
65
|
-
const RTE_MOVE_UP_TEXT =
|
|
66
|
-
typeof RTE_MOVE_UP !== 'undefined' ? RTE_MOVE_UP : 'rte.moveUp'
|
|
67
|
-
const RTE_MOVE_DOWN_TEXT =
|
|
68
|
-
typeof RTE_MOVE_DOWN !== 'undefined' ? RTE_MOVE_DOWN : 'rte.moveDown'
|
|
69
|
-
const RTE_REMOVE_TEXT =
|
|
70
|
-
typeof RTE_REMOVE !== 'undefined' ? RTE_REMOVE : 'rte.remove'
|
|
71
|
-
const RTE_MERGE_CELLS_TEXT =
|
|
72
|
-
typeof RTE_MERGE_CELLS !== 'undefined' ? RTE_MERGE_CELLS : 'rte.mergeCells'
|
|
73
|
-
const RTE_SPLIT_CELL_TEXT =
|
|
74
|
-
typeof RTE_SPLIT_CELL !== 'undefined' ? RTE_SPLIT_CELL : 'rte.splitCells'
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Table node view. Used so that we can have the submenu widget
|
|
78
|
-
* attached to the node.
|
|
79
|
-
*/
|
|
80
|
-
class TableView {
|
|
81
|
-
/**
|
|
82
|
-
*
|
|
83
|
-
* @param {ProseMirror.Model.node} node
|
|
84
|
-
* @param {ProseMirror.View} view
|
|
85
|
-
* @param {Function} getPos
|
|
86
|
-
*/
|
|
87
|
-
constructor(node, view, getPos) {
|
|
88
|
-
this.node = node
|
|
89
|
-
this.view = view
|
|
90
|
-
this.getPos = getPos
|
|
91
|
-
|
|
92
|
-
const tbody = (this.contentDOM = create('tbody'))
|
|
93
|
-
this.table = create(
|
|
94
|
-
'table',
|
|
95
|
-
{ className: 'ProseMirror-table', id: node.attrs.id },
|
|
96
|
-
tbody,
|
|
97
|
-
)
|
|
98
|
-
|
|
99
|
-
this.submenuView = create(
|
|
100
|
-
'div',
|
|
101
|
-
{
|
|
102
|
-
className: 'ProseMirror-tableSubmenu',
|
|
103
|
-
},
|
|
104
|
-
this.getSubmenuContents(),
|
|
105
|
-
)
|
|
106
|
-
|
|
107
|
-
this.menu = create('div', {
|
|
108
|
-
className: 'ProseMirror-tableMenu',
|
|
109
|
-
})
|
|
110
|
-
|
|
111
|
-
this.dom = create(
|
|
112
|
-
'div',
|
|
113
|
-
{
|
|
114
|
-
className: 'ProseMirror-tableContainer',
|
|
115
|
-
},
|
|
116
|
-
create(
|
|
117
|
-
'div',
|
|
118
|
-
{
|
|
119
|
-
className: 'ProseMirror-tableHeading',
|
|
120
|
-
},
|
|
121
|
-
create('div', {
|
|
122
|
-
className: 'ProseMirror-tableTitle',
|
|
123
|
-
innerText: 'Table',
|
|
124
|
-
}),
|
|
125
|
-
this.submenuView,
|
|
126
|
-
),
|
|
127
|
-
this.table,
|
|
128
|
-
this.menu,
|
|
129
|
-
)
|
|
130
|
-
|
|
131
|
-
for (let obj of RICH_TEXT_ELEMENTS_PM) {
|
|
132
|
-
if (obj.tag === 'table' && obj.popup) {
|
|
133
|
-
this.hasTableEnhancement = true
|
|
134
|
-
this.tableEnhancementTypeId = obj.typeId
|
|
135
|
-
for (let key in this.node.attrs.attributes) {
|
|
136
|
-
this.table.setAttribute(key, this.node.attrs.attributes[key])
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
if (obj.tag === 'tr' && obj.popup) {
|
|
140
|
-
this.hasTableRowEnhancement = true
|
|
141
|
-
this.tableRowEnhancementTypeId = obj.typeId
|
|
142
|
-
}
|
|
143
|
-
if (obj.tag === 'td' && obj.popup) {
|
|
144
|
-
this.hasTableCellEnhancement = true
|
|
145
|
-
this.tableCellEnhancementTypeId = obj.typeId
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
document.addEventListener('click', this.maybeCloseCellMenu)
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
closeCellMenu = () => {
|
|
153
|
-
const moreLink = this.dom.querySelector(
|
|
154
|
-
'.ProseMirror-tableSubmenuLink.more_horiz',
|
|
155
|
-
)
|
|
156
|
-
moreLink.dataset.icon = 'more_horiz'
|
|
157
|
-
moreLink.classList.remove('is-active')
|
|
158
|
-
|
|
159
|
-
Tether.toggle(moreLink, this.menu, () => {
|
|
160
|
-
this.menu.classList.remove('is-open')
|
|
161
|
-
return true
|
|
162
|
-
})
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
destroy() {
|
|
166
|
-
document.removeEventListener('click', this.maybeCloseCellMenu)
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
editTable = (evt) => {
|
|
170
|
-
evt.preventDefault()
|
|
171
|
-
let formUrl = getEnhancementEditFormURL(
|
|
172
|
-
this.tableEnhancementTypeId,
|
|
173
|
-
evt.target,
|
|
174
|
-
)
|
|
175
|
-
formUrl = `${formUrl}&attributes=${encodeURIComponent(
|
|
176
|
-
JSON.stringify(this.node.attrs.attributes),
|
|
177
|
-
)}`
|
|
178
|
-
|
|
179
|
-
this.setUpPopup(evt, formUrl, this.node, this.table, this.view)
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
editTableCell = (evt) => {
|
|
183
|
-
evt.preventDefault()
|
|
184
|
-
const cell = this.dom.querySelector('.is-selected-cell')
|
|
185
|
-
if (!cell) {
|
|
186
|
-
return
|
|
187
|
-
}
|
|
188
|
-
const node = this.getNode(cell)
|
|
189
|
-
if (!node || node.type.name !== 'tableCell') {
|
|
190
|
-
return
|
|
191
|
-
}
|
|
192
|
-
let formUrl = getEnhancementEditFormURL(
|
|
193
|
-
this.tableCellEnhancementTypeId,
|
|
194
|
-
evt.target,
|
|
195
|
-
)
|
|
196
|
-
formUrl = `${formUrl}&attributes=${encodeURIComponent(
|
|
197
|
-
JSON.stringify(node.attrs.attributes),
|
|
198
|
-
)}`
|
|
199
|
-
this.setUpPopup(evt, formUrl, node, cell, this.view)
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
editTableRow = (evt) => {
|
|
203
|
-
evt.preventDefault()
|
|
204
|
-
const cell = this.dom.querySelector('.is-selected-cell')
|
|
205
|
-
if (!cell) {
|
|
206
|
-
return
|
|
207
|
-
}
|
|
208
|
-
const tableRow = cell.closest('tr')
|
|
209
|
-
if (!tableRow) {
|
|
210
|
-
return
|
|
211
|
-
}
|
|
212
|
-
const node = this.getNode(tableRow)
|
|
213
|
-
if (!node || node.type.name !== 'tableRow') {
|
|
214
|
-
return
|
|
215
|
-
}
|
|
216
|
-
let formUrl = getEnhancementEditFormURL(
|
|
217
|
-
this.tableRowEnhancementTypeId,
|
|
218
|
-
evt.target,
|
|
219
|
-
)
|
|
220
|
-
formUrl = `${formUrl}&attributes=${encodeURIComponent(
|
|
221
|
-
JSON.stringify(node.attrs.attributes),
|
|
222
|
-
)}`
|
|
223
|
-
this.setUpPopup(evt, formUrl, node, tableRow, this.view)
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
getCellMenuConfig = () => {
|
|
227
|
-
const sel = this.view.state.selection
|
|
228
|
-
const predicate = (node) => node.type === this.view.state.schema.nodes.table
|
|
229
|
-
const parentTable = findParentNode(predicate)(sel)
|
|
230
|
-
let isDisabled = true
|
|
231
|
-
|
|
232
|
-
if (parentTable && parentTable.node === this.node) {
|
|
233
|
-
isDisabled = false
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
const config = [
|
|
237
|
-
{
|
|
238
|
-
disabled: isDisabled,
|
|
239
|
-
text: RTE_DELETE_ROW_TEXT,
|
|
240
|
-
action: () => {
|
|
241
|
-
this.mutateTable('row')
|
|
242
|
-
},
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
disabled: isDisabled,
|
|
246
|
-
text: RTE_DELETE_COLUMN_TEXT,
|
|
247
|
-
action: () => {
|
|
248
|
-
this.mutateTable('column')
|
|
249
|
-
},
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
disabled: isDisabled,
|
|
253
|
-
text: RTE_ADD_COLUMN_RIGHT_TEXT,
|
|
254
|
-
action: () => {
|
|
255
|
-
this.mutateTable('right')
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
disabled: isDisabled,
|
|
260
|
-
text: RTE_ADD_COLUMN_LEFT_TEXT,
|
|
261
|
-
action: () => {
|
|
262
|
-
this.mutateTable('left')
|
|
263
|
-
},
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
disabled: isDisabled,
|
|
267
|
-
text: RTE_ADD_ROW_ABOVE_TEXT,
|
|
268
|
-
action: () => {
|
|
269
|
-
this.mutateTable('above')
|
|
270
|
-
},
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
disabled: isDisabled,
|
|
274
|
-
text: RTE_ADD_ROW_BELOW_TEXT,
|
|
275
|
-
action: () => {
|
|
276
|
-
this.mutateTable('below')
|
|
277
|
-
},
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
disabled: !(sel instanceof CellSelection) || isDisabled,
|
|
281
|
-
text: RTE_MERGE_CELLS_TEXT,
|
|
282
|
-
action: () => {
|
|
283
|
-
mergeCells(this.view.state, this.view.dispatch)
|
|
284
|
-
},
|
|
285
|
-
},
|
|
286
|
-
]
|
|
287
|
-
|
|
288
|
-
let isNotInMergedCell = true
|
|
289
|
-
if (!isDisabled) {
|
|
290
|
-
let cellNode
|
|
291
|
-
if (!(sel instanceof CellSelection)) {
|
|
292
|
-
// Partialy taken from https://github.com/ProseMirror/prosemirror-tables/blob/master/src/util.js
|
|
293
|
-
const $pos = sel.$from
|
|
294
|
-
for (let d = $pos.depth; d > 0; d--) {
|
|
295
|
-
// Sometimes the cell can be in the same depth.
|
|
296
|
-
const role = $pos.node(d).type.spec.tableRole
|
|
297
|
-
if (role === 'cell' || role === 'header_cell') {
|
|
298
|
-
cellNode = $pos.node(d)
|
|
299
|
-
break
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
} else {
|
|
303
|
-
if (sel.$anchorCell.pos === sel.$headCell.pos) {
|
|
304
|
-
cellNode = sel.$anchorCell.nodeAfter
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
if (
|
|
308
|
-
cellNode &&
|
|
309
|
-
(cellNode.attrs.colspan > 1 || cellNode.attrs.rowspan > 1)
|
|
310
|
-
) {
|
|
311
|
-
isNotInMergedCell = false
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
config.push({
|
|
316
|
-
disabled: isNotInMergedCell,
|
|
317
|
-
text: RTE_SPLIT_CELL_TEXT,
|
|
318
|
-
action: () => {
|
|
319
|
-
splitCell(this.view.state, this.view.dispatch)
|
|
320
|
-
},
|
|
321
|
-
})
|
|
322
|
-
|
|
323
|
-
if (this.hasTableEnhancement) {
|
|
324
|
-
config.push({
|
|
325
|
-
disabled: isDisabled,
|
|
326
|
-
text: RTE_EDIT_TABLE_ATTRS_TEXT,
|
|
327
|
-
action: this.editTable,
|
|
328
|
-
})
|
|
329
|
-
}
|
|
330
|
-
if (this.hasTableRowEnhancement) {
|
|
331
|
-
config.push({
|
|
332
|
-
disabled: isDisabled,
|
|
333
|
-
text: RTE_EDIT_TABLE_ROW_ATTRS_TEXT,
|
|
334
|
-
action: this.editTableRow,
|
|
335
|
-
})
|
|
336
|
-
}
|
|
337
|
-
if (this.hasTableCellEnhancement) {
|
|
338
|
-
config.push({
|
|
339
|
-
disabled: isDisabled,
|
|
340
|
-
text: RTE_EDIT_TABLE_CELL_ATTRS_TEXT,
|
|
341
|
-
action: this.editTableCell,
|
|
342
|
-
})
|
|
343
|
-
}
|
|
344
|
-
return config
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
getCellSubmenuContents = (cell) => {
|
|
348
|
-
const cellMenuConfig = this.getCellMenuConfig(cell)
|
|
349
|
-
const children = []
|
|
350
|
-
for (let config of cellMenuConfig) {
|
|
351
|
-
const a = create('a', {
|
|
352
|
-
className: 'ProseMirror-tableMenuLink',
|
|
353
|
-
innerText: config.text,
|
|
354
|
-
href: '#',
|
|
355
|
-
})
|
|
356
|
-
a.addEventListener('click', (evt) => {
|
|
357
|
-
evt.preventDefault()
|
|
358
|
-
config.action(evt, cell)
|
|
359
|
-
})
|
|
360
|
-
const li = create('li', {}, a)
|
|
361
|
-
if (config.disabled) {
|
|
362
|
-
li.setAttribute('disabled', '')
|
|
363
|
-
a.setAttribute('disabled', '')
|
|
364
|
-
}
|
|
365
|
-
children.push(li)
|
|
366
|
-
}
|
|
367
|
-
return create(
|
|
368
|
-
'ul',
|
|
369
|
-
{
|
|
370
|
-
className: 'ProseMirror-tableMenuList',
|
|
371
|
-
},
|
|
372
|
-
...children,
|
|
373
|
-
)
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
getNode = (ele) => {
|
|
377
|
-
const nodePos = this.view.posAtDOM(ele)
|
|
378
|
-
return this.view.state.doc.nodeAt(nodePos - 1)
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
getNodeResolvedPos = (ele) => {
|
|
382
|
-
const nodePos = this.view.posAtDOM(ele)
|
|
383
|
-
return this.view.state.doc.resolve(nodePos - 1)
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
getSubmenuConfig = () => {
|
|
387
|
-
let isRemoveable = true
|
|
388
|
-
const collabManagerPlugin = this.view.state.collabManager$
|
|
389
|
-
if (collabManagerPlugin) {
|
|
390
|
-
const connectedIds = collabManagerPlugin.get('connectedIds')
|
|
391
|
-
const currentUserId = collabManagerPlugin.get('userId')
|
|
392
|
-
const decos = collabManagerPlugin.get('decos')
|
|
393
|
-
for (let id of connectedIds.values()) {
|
|
394
|
-
if (id === currentUserId) {
|
|
395
|
-
continue
|
|
396
|
-
}
|
|
397
|
-
let userDecos = decos.find(null, null, (spec) => spec.id === id)
|
|
398
|
-
let deco = userDecos.length ? userDecos[0] : null
|
|
399
|
-
if (deco) {
|
|
400
|
-
const pos = deco.from
|
|
401
|
-
const tableNode = findParentNodeOfTypeClosestToPos(
|
|
402
|
-
this.view.state.doc.resolve(pos),
|
|
403
|
-
this.view.state.schema.nodes.table,
|
|
404
|
-
)
|
|
405
|
-
|
|
406
|
-
if (tableNode && tableNode.node === this.node) {
|
|
407
|
-
isRemoveable = false
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
const config = []
|
|
414
|
-
config.push({
|
|
415
|
-
text: 'More',
|
|
416
|
-
icon: 'more_horiz',
|
|
417
|
-
action: (evt) => {
|
|
418
|
-
this.toggleCellMenu(evt)
|
|
419
|
-
evt.stopPropagation()
|
|
420
|
-
},
|
|
421
|
-
})
|
|
422
|
-
if (isRemoveable) {
|
|
423
|
-
config.push({
|
|
424
|
-
text: RTE_MOVE_UP_TEXT,
|
|
425
|
-
icon: 'arrow_upward',
|
|
426
|
-
action: (evt) => {
|
|
427
|
-
moveEnhancementUp(this.view, this.getPos)
|
|
428
|
-
evt.stopPropagation()
|
|
429
|
-
},
|
|
430
|
-
})
|
|
431
|
-
|
|
432
|
-
config.push({
|
|
433
|
-
text: RTE_MOVE_DOWN_TEXT,
|
|
434
|
-
icon: 'arrow_downward',
|
|
435
|
-
action: (evt) => {
|
|
436
|
-
moveEnhancementDown(this.view, this.getPos)
|
|
437
|
-
evt.stopPropagation()
|
|
438
|
-
},
|
|
439
|
-
})
|
|
440
|
-
|
|
441
|
-
config.push({
|
|
442
|
-
text: 'Anchor',
|
|
443
|
-
icon: 'open_with',
|
|
444
|
-
action: (evt) => {
|
|
445
|
-
moveEnhancement(this.view, this.getPos)
|
|
446
|
-
evt.stopPropagation()
|
|
447
|
-
},
|
|
448
|
-
})
|
|
449
|
-
|
|
450
|
-
config.push({
|
|
451
|
-
text: RTE_REMOVE_TEXT,
|
|
452
|
-
icon: 'remove',
|
|
453
|
-
action: (evt) => {
|
|
454
|
-
removeEnhancement(this.view, this.getPos)
|
|
455
|
-
evt.stopPropagation()
|
|
456
|
-
},
|
|
457
|
-
})
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
return config
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
getSubmenuContents = () => {
|
|
464
|
-
const submenuConfig = this.getSubmenuConfig()
|
|
465
|
-
const children = []
|
|
466
|
-
for (let config of submenuConfig) {
|
|
467
|
-
const a = create('a', {
|
|
468
|
-
className: `ProseMirror-tableSubmenuLink ${config.icon}`,
|
|
469
|
-
innerText: config.text,
|
|
470
|
-
contenteditable: false,
|
|
471
|
-
dataset: {
|
|
472
|
-
icon: config.icon,
|
|
473
|
-
},
|
|
474
|
-
})
|
|
475
|
-
a.addEventListener('click', (evt) => {
|
|
476
|
-
evt.preventDefault()
|
|
477
|
-
config.action(evt)
|
|
478
|
-
})
|
|
479
|
-
|
|
480
|
-
const li = create(
|
|
481
|
-
'li',
|
|
482
|
-
{
|
|
483
|
-
className: 'ProseMirror-tableSubmenuItem',
|
|
484
|
-
},
|
|
485
|
-
a,
|
|
486
|
-
)
|
|
487
|
-
|
|
488
|
-
children.push(li)
|
|
489
|
-
}
|
|
490
|
-
return create(
|
|
491
|
-
'ul',
|
|
492
|
-
{
|
|
493
|
-
className: 'ProseMirror-tableSubmenuList',
|
|
494
|
-
},
|
|
495
|
-
...children,
|
|
496
|
-
)
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
ignoreMutation(mutationRecord) {
|
|
500
|
-
if (
|
|
501
|
-
mutationRecord.target.classList &&
|
|
502
|
-
(mutationRecord.target.classList.contains(
|
|
503
|
-
'ProseMirror-tableSubmenuLink',
|
|
504
|
-
) ||
|
|
505
|
-
mutationRecord.target.classList.contains('ProseMirror-tableMenu') ||
|
|
506
|
-
mutationRecord.target.classList.contains('ProseMirror-tableMenuLink'))
|
|
507
|
-
) {
|
|
508
|
-
return true
|
|
509
|
-
}
|
|
510
|
-
return (
|
|
511
|
-
mutationRecord.type === 'attributes' &&
|
|
512
|
-
mutationRecord.target === this.table
|
|
513
|
-
)
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
maybeCloseCellMenu = (evt) => {
|
|
517
|
-
const closest = evt.target.closest('.ProseMirror-tableSubmenuLink')
|
|
518
|
-
if (
|
|
519
|
-
closest ===
|
|
520
|
-
this.dom.querySelector('.ProseMirror-tableSubmenuLink.more_horiz')
|
|
521
|
-
) {
|
|
522
|
-
return
|
|
523
|
-
}
|
|
524
|
-
this.closeCellMenu()
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
mutateTable = (type) => {
|
|
528
|
-
const { state, dispatch } = this.view
|
|
529
|
-
switch (type) {
|
|
530
|
-
case 'right':
|
|
531
|
-
addColumnAfter(state, dispatch)
|
|
532
|
-
break
|
|
533
|
-
case 'left':
|
|
534
|
-
addColumnBefore(state, dispatch)
|
|
535
|
-
break
|
|
536
|
-
case 'above':
|
|
537
|
-
addRowBefore(state, dispatch)
|
|
538
|
-
break
|
|
539
|
-
case 'below':
|
|
540
|
-
addRowAfter(state, dispatch)
|
|
541
|
-
break
|
|
542
|
-
case 'row':
|
|
543
|
-
deleteRow(state, dispatch)
|
|
544
|
-
break
|
|
545
|
-
case 'column':
|
|
546
|
-
deleteColumn(state, dispatch)
|
|
547
|
-
break
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
openCellMenu = () => {
|
|
552
|
-
this.menu.innerHTML = ''
|
|
553
|
-
|
|
554
|
-
const contents = this.getCellSubmenuContents()
|
|
555
|
-
this.menu.appendChild(contents)
|
|
556
|
-
|
|
557
|
-
const moreLink = this.dom.querySelector(
|
|
558
|
-
'.ProseMirror-tableSubmenuLink.more_horiz',
|
|
559
|
-
)
|
|
560
|
-
|
|
561
|
-
moreLink.dataset.icon = 'close'
|
|
562
|
-
moreLink.classList.add('is-active')
|
|
563
|
-
|
|
564
|
-
Tether.toggle(moreLink, this.menu, () => {
|
|
565
|
-
this.menu.classList.add('is-open')
|
|
566
|
-
return true
|
|
567
|
-
})
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
setUpPopup = (evt, formUrl, node, ele, view) => {
|
|
571
|
-
const tempId = `Prosemirror.table.event-${uuidv1()}`
|
|
572
|
-
evt.target.setAttribute('href', formUrl)
|
|
573
|
-
evt.target.setAttribute('data-event-id', tempId)
|
|
574
|
-
evt.target.setAttribute('data-frame-post', 'true')
|
|
575
|
-
evt.target.setAttribute('target', tempId)
|
|
576
|
-
|
|
577
|
-
PubSub.subscribe(tempId, (incomingData) => {
|
|
578
|
-
const { pos } = this.getNodeResolvedPos(ele)
|
|
579
|
-
const tr = view.state.tr
|
|
580
|
-
|
|
581
|
-
// Dispatch transaction so ProseMirror knows of attribute changes.
|
|
582
|
-
tr.setNodeMarkup(pos, null, { attributes: incomingData.data })
|
|
583
|
-
view.dispatch(tr)
|
|
584
|
-
|
|
585
|
-
// This is only updating node directly for CSS hooks.
|
|
586
|
-
for (let key in incomingData.data) {
|
|
587
|
-
ele.setAttribute(key, incomingData.data[key])
|
|
588
|
-
}
|
|
589
|
-
})
|
|
590
|
-
|
|
591
|
-
const $eventParent = $(evt.target.parent)
|
|
592
|
-
const $framedParent = $eventParent.frame()
|
|
593
|
-
$framedParent.trigger('create')
|
|
594
|
-
$framedParent.trigger('click.frame')
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
toggleCellMenu = (evt) => {
|
|
598
|
-
const target = evt.target
|
|
599
|
-
if (target.classList.contains('is-active')) {
|
|
600
|
-
this.closeCellMenu(evt)
|
|
601
|
-
} else {
|
|
602
|
-
this.openCellMenu()
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
update(node) {
|
|
607
|
-
if (node.type !== this.node.type) return false
|
|
608
|
-
this.node = node
|
|
609
|
-
this.closeCellMenu()
|
|
610
|
-
return true
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
export { TableView }
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Brightspot Rich Text Editor Track Changes Manager Plugin
|
|
2
|
-
|
|
3
|
-
Extends Prosemirror to allow for tracking inserts and deletions. Note we currently only track text and enhancement deletion and insertions (and not mark additions, for example).
|
|
4
|
-
|
|
5
|
-
## Table of Contents
|
|
6
|
-
|
|
7
|
-
1. [Must Knows](#must-knows)
|
|
8
|
-
|
|
9
|
-
## Must Knows
|
|
10
|
-
|
|
11
|
-
1. This uses the [Prosemirror Changeset](#https://github.com/ProseMirror/prosemirror-changeset) helper module to diff document changes.
|
|
12
|
-
2. Deletions are represented as `del` marks surrounding the content to be deleted and `ins` marks surrounding the content to be inserted.
|
|
13
|
-
3. This uses the `appendTransaction` property of the plugin to handle adding the insertion and deletion marks. The user's intent is recorded (the initial transaction) and is then modified to re-insert deleted content and then add the `del` marks or to just add the `ins` mark as appropriate.
|