@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,359 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-debugger */
|
|
2
|
-
import { constants } from './settings'
|
|
3
|
-
import { EditorState, AllSelection, TextSelection } from 'prosemirror-state'
|
|
4
|
-
import { getPlugins } from './plugins/PluginProvider'
|
|
5
|
-
import { DOMParser } from 'prosemirror-model'
|
|
6
|
-
import { getLegacyHTMLTextForProsemirror } from './codemirror-shim'
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @file
|
|
10
|
-
* Utility/helper functions to help set up the RTE or assist with
|
|
11
|
-
* parsing content. Separating them out from the class to keep
|
|
12
|
-
* the size of the class objects down since these aren't really
|
|
13
|
-
* needed on the object's prototype chain and don't serve any
|
|
14
|
-
* purpose as a static method.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Retrieves a nested object value without triggering an
|
|
19
|
-
* NPE if one of the keys is undefined and if an NPE is encountered will return
|
|
20
|
-
* a default value if one is passed in
|
|
21
|
-
*
|
|
22
|
-
* @param {Object.<*>} obj Object literal trying to crawl
|
|
23
|
-
* @param {string} path Path to property you are trying to retrieve
|
|
24
|
-
* represented as a string with dot notation
|
|
25
|
-
* @param {*=} defaultValue Whatever you want returned if the lookup
|
|
26
|
-
* fails
|
|
27
|
-
* @return {*|undefined} Returns value if found, defaultValue if NPE and
|
|
28
|
-
* default is defined or undefined
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* const object = {
|
|
32
|
-
* foo: {
|
|
33
|
-
* bar: {
|
|
34
|
-
* baz: 'fizzpop'
|
|
35
|
-
* }
|
|
36
|
-
* }
|
|
37
|
-
* }
|
|
38
|
-
* getObject(object, 'foo.bar.baz', 'defaultText') -> 'fizzpop'
|
|
39
|
-
*/
|
|
40
|
-
const getObjectValue = (obj, path, defaultValue) => {
|
|
41
|
-
const pathArr = path.split('.')
|
|
42
|
-
const value = pathArr.reduce((prev, next) => {
|
|
43
|
-
if (prev === void 0) {
|
|
44
|
-
console.warn(`Unable to retrieve [${next}] from object`)
|
|
45
|
-
return undefined
|
|
46
|
-
}
|
|
47
|
-
return prev[next]
|
|
48
|
-
}, obj)
|
|
49
|
-
|
|
50
|
-
return value || defaultValue || undefined
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* ProseMirror does not serialize directly to HTML, and the author's
|
|
55
|
-
* recommendation is to follow this pattern to create HTML/HTML strings
|
|
56
|
-
* from the serialized ProseMirror data.
|
|
57
|
-
*
|
|
58
|
-
* Our current implementation takes and returns a string
|
|
59
|
-
* of HTML.
|
|
60
|
-
*
|
|
61
|
-
* @param {!Prosemirror.DOMSerializer} serializer ProseMirror DOM Serializer.
|
|
62
|
-
* @param {!Prosemirror.Fragment} content A node's collection of child nodes to
|
|
63
|
-
* be converted into HTML.
|
|
64
|
-
* @return {string} String representation of the converted HTML elements.
|
|
65
|
-
*/
|
|
66
|
-
const convertToHTML = (serializer, content) => {
|
|
67
|
-
const tmpElement2 = document.createElement(constants.ELEMENTS.DIV)
|
|
68
|
-
const fragment = serializer.serializeFragment(content, {
|
|
69
|
-
target: tmpElement2,
|
|
70
|
-
})
|
|
71
|
-
const tmpElement = document.createElement(constants.ELEMENTS.DIV)
|
|
72
|
-
tmpElement.appendChild(fragment)
|
|
73
|
-
return tmpElement.innerHTML
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Builds a Prosemirror editor state from the initial value provided
|
|
78
|
-
* by the textarea.
|
|
79
|
-
*
|
|
80
|
-
* @param {?string} initialContent HTML markup as a string from provided
|
|
81
|
-
* by the textarea.
|
|
82
|
-
* @param {!OrderedMap} menuItems Menubar configuration.
|
|
83
|
-
* @param {!Function} buildKeymap Menubar configuration.
|
|
84
|
-
* @param {ProseMirror.Model.Schema} schema Schema configuration.
|
|
85
|
-
* @param {string} userId The userID of the current user.
|
|
86
|
-
* @param {string} userLabel The user label of the current user.
|
|
87
|
-
* @param {number} version The version number from which this editor is starting.
|
|
88
|
-
* @param {Object.<Object>} anchorMap Key/value pairs of userIds to RTE positions.
|
|
89
|
-
* @param {Array.<Object>} rangeList List of key/value pairs of userIds to RTE selection ranges.
|
|
90
|
-
* @param {boolean} isCollab True indicates collab editing is enabled for this field.
|
|
91
|
-
* @return {Prosemirror.EditorState} Prosemirror editor state.
|
|
92
|
-
*/
|
|
93
|
-
const getState = (
|
|
94
|
-
doc,
|
|
95
|
-
menuItems,
|
|
96
|
-
buildKeymap,
|
|
97
|
-
schema,
|
|
98
|
-
userId,
|
|
99
|
-
userLabel,
|
|
100
|
-
version,
|
|
101
|
-
anchorMap,
|
|
102
|
-
rangeList,
|
|
103
|
-
lockedList,
|
|
104
|
-
isCollab,
|
|
105
|
-
ctx,
|
|
106
|
-
compliantTagNameMap,
|
|
107
|
-
) => {
|
|
108
|
-
return EditorState.create({
|
|
109
|
-
doc,
|
|
110
|
-
plugins: getPlugins({
|
|
111
|
-
schema,
|
|
112
|
-
menuItems,
|
|
113
|
-
buildKeymap,
|
|
114
|
-
userId,
|
|
115
|
-
userLabel,
|
|
116
|
-
version,
|
|
117
|
-
anchorMap,
|
|
118
|
-
rangeList,
|
|
119
|
-
lockedList,
|
|
120
|
-
isCollab,
|
|
121
|
-
ctx,
|
|
122
|
-
compliantTagNameMap,
|
|
123
|
-
}),
|
|
124
|
-
})
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Gets the state for just a plugin
|
|
129
|
-
*
|
|
130
|
-
* @param {!Prosemirror.EditorView} editorView
|
|
131
|
-
* @param {string} key
|
|
132
|
-
* @return {*} Plugin states can be of any type and are
|
|
133
|
-
* defined by the plugin.
|
|
134
|
-
*/
|
|
135
|
-
const getPluginState = (editorView, key) => {
|
|
136
|
-
return editorView.state[key]
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Retrieves a mark's state within the current selection. Selection
|
|
141
|
-
* is retrieved from the EditorState.
|
|
142
|
-
*
|
|
143
|
-
* @param {Prosemirror.EditorState} state
|
|
144
|
-
* @param {Prosemirror.Mark} type The mark
|
|
145
|
-
* @return {string} 'active' if active; 'inactive' if not active
|
|
146
|
-
*/
|
|
147
|
-
// TODO(teckels): Should this just return a boolean?
|
|
148
|
-
const getMarkState = (state, type) => {
|
|
149
|
-
const { from, $from, to, empty } = state.selection
|
|
150
|
-
let isActive = false
|
|
151
|
-
|
|
152
|
-
if (empty) {
|
|
153
|
-
isActive = type.isInSet(state.storedMarks || $from.marks())
|
|
154
|
-
return isActive ? 'active' : 'inactive'
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
isActive = state.doc.rangeHasMark(from, to, type)
|
|
158
|
-
return isActive ? 'active' : 'inactive'
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Finds all the active marks for the current selection.
|
|
163
|
-
*
|
|
164
|
-
* @param {Prosemirror.EditorState} state
|
|
165
|
-
* @return {Map.<string.<boolean>>} Map of marks to their active states
|
|
166
|
-
* expressed as true for `active` and false for `inactive`
|
|
167
|
-
*/
|
|
168
|
-
const getActiveMarks = (state) => {
|
|
169
|
-
const schema = state.config.schema
|
|
170
|
-
const activeMarks = Object.keys(schema.marks).map((key) => {
|
|
171
|
-
const isActive = getMarkState(state, schema.marks[key]) === 'active'
|
|
172
|
-
if (isActive) {
|
|
173
|
-
return [key, true]
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return [key, false]
|
|
177
|
-
})
|
|
178
|
-
|
|
179
|
-
return new Map(activeMarks)
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Finds the active block nodes for the current selection. Because
|
|
184
|
-
* nodes form a tree, this could and probably will be be a number of nodes
|
|
185
|
-
* (e.g. doc -> unorderedList -> listItem -> listItemDiv)
|
|
186
|
-
*
|
|
187
|
-
* @param {Prosemirror.EditorState} state
|
|
188
|
-
* @return {Map.<string.<boolean>>} Map of active nodes.
|
|
189
|
-
*/
|
|
190
|
-
const getActiveNodes = (state) => {
|
|
191
|
-
const { $anchor } = state.selection
|
|
192
|
-
const activeNodes = $anchor.path
|
|
193
|
-
.filter((item) => typeof item !== 'number')
|
|
194
|
-
.map((item) => {
|
|
195
|
-
return [getObjectValue(item, 'type.name'), true]
|
|
196
|
-
})
|
|
197
|
-
|
|
198
|
-
return new Map(activeNodes)
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Determines if the selection is in a list.
|
|
203
|
-
*
|
|
204
|
-
* @param {Prosemirror.NodeRange} range
|
|
205
|
-
* @return {boolean}
|
|
206
|
-
*/
|
|
207
|
-
const getIsInAList = (range) => {
|
|
208
|
-
// Avoiding triple operator because this could be `undefined`
|
|
209
|
-
return range && constants.NODES.LISTS[range.parent.type.name] != null
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Determines if the node is the first in the RTE AFTER the
|
|
214
|
-
* doc element.
|
|
215
|
-
*
|
|
216
|
-
* @param {Prosemirror.EditorState} state
|
|
217
|
-
* @return {Boolean} True if the node is the first in the RTE
|
|
218
|
-
*/
|
|
219
|
-
const getIsFirstNode = (state) => {
|
|
220
|
-
const { $anchor, anchor } = state.selection
|
|
221
|
-
let pos = anchor
|
|
222
|
-
if (state.selection instanceof TextSelection) {
|
|
223
|
-
pos = $anchor.before($anchor.depth)
|
|
224
|
-
}
|
|
225
|
-
return pos === 0
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* Determines if the node is the last in the RTE.
|
|
229
|
-
*
|
|
230
|
-
* @param {Prosemirror.EditorState} state
|
|
231
|
-
* @return {Boolean} True if the node is the last in the RTE
|
|
232
|
-
*/
|
|
233
|
-
const getIsLastNode = (state) => {
|
|
234
|
-
const { $anchor } = state.selection
|
|
235
|
-
let pos = $anchor.index(0)
|
|
236
|
-
if (state.selection instanceof TextSelection) {
|
|
237
|
-
pos = $anchor.before($anchor.depth)
|
|
238
|
-
}
|
|
239
|
-
return pos === state.doc.childCount - 1
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Replaces the whole document with new content.
|
|
244
|
-
*
|
|
245
|
-
* @param {ProseMirror.State} state
|
|
246
|
-
* @param {string} newContent
|
|
247
|
-
* @param {Map} compliantTagNameMap
|
|
248
|
-
* @param {ProseMirror.View.Dispatch} dispatch
|
|
249
|
-
*/
|
|
250
|
-
const replaceWholeDocumentWithNewContent = (
|
|
251
|
-
state,
|
|
252
|
-
newContent,
|
|
253
|
-
compliantTagNameMap,
|
|
254
|
-
dispatch,
|
|
255
|
-
addToHistory,
|
|
256
|
-
removeTracking,
|
|
257
|
-
resetCursor,
|
|
258
|
-
disableNativeEvent,
|
|
259
|
-
) => {
|
|
260
|
-
let tr = state.tr
|
|
261
|
-
const tmpElement = document.createElement('div')
|
|
262
|
-
const shimmed = getLegacyHTMLTextForProsemirror(
|
|
263
|
-
newContent,
|
|
264
|
-
state.config.schema,
|
|
265
|
-
compliantTagNameMap,
|
|
266
|
-
)
|
|
267
|
-
tmpElement.innerHTML = shimmed
|
|
268
|
-
const parsed = DOMParser.fromSchema(state.config.schema).parse(tmpElement, {
|
|
269
|
-
preserveWhitespace: 'full',
|
|
270
|
-
})
|
|
271
|
-
const allSelection = new AllSelection(state.doc)
|
|
272
|
-
if (!addToHistory) {
|
|
273
|
-
tr.setMeta('addToHistory', false)
|
|
274
|
-
}
|
|
275
|
-
if (removeTracking) {
|
|
276
|
-
tr.setMeta('removeFromTracking', true)
|
|
277
|
-
}
|
|
278
|
-
if (disableNativeEvent) {
|
|
279
|
-
tr.setMeta('disableNativeEvent', true)
|
|
280
|
-
}
|
|
281
|
-
tr.setSelection(allSelection).replaceSelectionWith(parsed)
|
|
282
|
-
if (resetCursor) {
|
|
283
|
-
const textSelection = TextSelection.create(state.doc, 1)
|
|
284
|
-
tr.setSelection(textSelection)
|
|
285
|
-
}
|
|
286
|
-
dispatch(tr)
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* Constructs a string representation of a DOM element using
|
|
291
|
-
* the browser APIs.
|
|
292
|
-
*
|
|
293
|
-
* @param {string} tag The tag of the element to be created.
|
|
294
|
-
* @param {string} innerHTML The contents of the element.
|
|
295
|
-
* @param {Object.<string>} attributes The attributes to set on the element.
|
|
296
|
-
* @return {String} The element markup as a string.
|
|
297
|
-
*/
|
|
298
|
-
const getElementMarkupAsString = (tag, innerHTML, attributes) => {
|
|
299
|
-
const el = document.createElement(tag)
|
|
300
|
-
if (attributes) {
|
|
301
|
-
for (let key in attributes) {
|
|
302
|
-
el.setAttribute(key, attributes[key])
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
el.innerHTML = innerHTML
|
|
306
|
-
return el.outerHTML
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* Closes popups at the same level or above the triggering event.
|
|
311
|
-
*
|
|
312
|
-
* @param {Event} evt DOM event that triggered a new popup to open.
|
|
313
|
-
*/
|
|
314
|
-
const closeLayeredPopups = (evt) => {
|
|
315
|
-
const enhancementSelector =
|
|
316
|
-
'.Popup[data-popup-source-class^="rte2-toolbar"],' +
|
|
317
|
-
'.Popup[data-popup-source-class*="RichTextElement"],' +
|
|
318
|
-
'.Popup[data-popup-source-class^="ProsemirrorEnhancementMenu-container-button"]'
|
|
319
|
-
|
|
320
|
-
const sourceEnhancementPopup = evt.target.closest(
|
|
321
|
-
'.Popup[data-popup-source-class*="objectId-create"],' +
|
|
322
|
-
'.Popup[data-popup-source-class*="ContentSelector-edit"],' +
|
|
323
|
-
'.Popup[data-popup-source-class*="RichTextElement"],' +
|
|
324
|
-
'.Popup[data-popup-source-class^="ProsemirrorEnhancementMenu-container-button"]',
|
|
325
|
-
)
|
|
326
|
-
|
|
327
|
-
if (sourceEnhancementPopup) {
|
|
328
|
-
const $siblingEnhancementPopups = $(sourceEnhancementPopup).nextAll(
|
|
329
|
-
enhancementSelector,
|
|
330
|
-
)
|
|
331
|
-
if ($siblingEnhancementPopups.length > 0) {
|
|
332
|
-
$siblingEnhancementPopups.popup('close')
|
|
333
|
-
}
|
|
334
|
-
} else if (evt.target.closest('.rte2-toolbar-submenu-2-items')) {
|
|
335
|
-
const $rteToolbarPopups = $(
|
|
336
|
-
'.Popup[data-popup-source-class^="rte2-toolbar"]',
|
|
337
|
-
)
|
|
338
|
-
if ($rteToolbarPopups.length > 0) $rteToolbarPopups.popup('close')
|
|
339
|
-
} else {
|
|
340
|
-
const $enhancementPopups = $(enhancementSelector)
|
|
341
|
-
if ($enhancementPopups.length > 0) $enhancementPopups.popup('close')
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
export {
|
|
346
|
-
closeLayeredPopups,
|
|
347
|
-
convertToHTML,
|
|
348
|
-
getState,
|
|
349
|
-
getActiveMarks,
|
|
350
|
-
getMarkState,
|
|
351
|
-
getPluginState,
|
|
352
|
-
getObjectValue,
|
|
353
|
-
getActiveNodes,
|
|
354
|
-
getIsFirstNode,
|
|
355
|
-
getIsLastNode,
|
|
356
|
-
replaceWholeDocumentWithNewContent,
|
|
357
|
-
getElementMarkupAsString,
|
|
358
|
-
getIsInAList,
|
|
359
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../../../../theme/ColorRotator'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../../../../util/debounce'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../../../../util/getComponentKey'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../../../../util/noise'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../../../../util/repaint'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../../../../util/storage'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../../../../util/throttle'
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import onFind from '../dom/onFind'
|
|
2
|
-
import rtc from '../rtc/index'
|
|
3
|
-
|
|
4
|
-
onFind(
|
|
5
|
-
'.Widget[data-internal-name="com.psddev.assign.widget.AssignmentContentWidget"]',
|
|
6
|
-
(widget) => {
|
|
7
|
-
const assignmentId = widget
|
|
8
|
-
.closest('.ContentEdit[data-content-id]')
|
|
9
|
-
.getAttribute('data-content-id')
|
|
10
|
-
|
|
11
|
-
// Listen for Publish broadcast, checking for match on #assign.assignments (global modification field)
|
|
12
|
-
rtc.receive('com.psddev.cms.tool.page.content.PublishBroadcast', (data) => {
|
|
13
|
-
const dataValues = data.mainObjectValues || data.values
|
|
14
|
-
const assignments = dataValues['assign.assignments']
|
|
15
|
-
|
|
16
|
-
if (assignments) {
|
|
17
|
-
for (var assignment of assignments) {
|
|
18
|
-
if (assignment._ref === assignmentId) {
|
|
19
|
-
let refreshButton = widget.querySelector(
|
|
20
|
-
'.AssignmentDeskWidget-refresh',
|
|
21
|
-
)
|
|
22
|
-
/* document.contains accounts for the nested popups/frames in the Assignment Desk UI, in which there are scenarios where
|
|
23
|
-
previously bound elements can be detached from the dom. */
|
|
24
|
-
if (document.contains(refreshButton)) {
|
|
25
|
-
refreshButton.click()
|
|
26
|
-
}
|
|
27
|
-
break
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
})
|
|
32
|
-
},
|
|
33
|
-
)
|
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import onFind from './../dom/onFind'
|
|
2
|
-
import Tether from './../dom/Tether'
|
|
3
|
-
import rtc from '../rtc/index'
|
|
4
|
-
import create from '../dom/create'
|
|
5
|
-
import { setupMenuForAria, toggleMenu } from '../../../../dom/popupMenu'
|
|
6
|
-
|
|
7
|
-
// Setup popup menu for keyboard accessibility
|
|
8
|
-
onFind('.AssignmentDeskDashboard-actionsToggle', (button) => {
|
|
9
|
-
const actions = button
|
|
10
|
-
.closest('.AssignmentDeskDashboard-actionsWrapper')
|
|
11
|
-
.querySelector('.AssignmentDeskDashboard-actions')
|
|
12
|
-
setupMenuForAria(actions, button)
|
|
13
|
-
button.addEventListener('click', (e) => {
|
|
14
|
-
toggleMenu(actions, button)
|
|
15
|
-
})
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
// Removes "All Content Types" option from type selector
|
|
19
|
-
onFind(
|
|
20
|
-
'.AssignmentDeskDashboard .SearchWidget-type .ComboInput-option:not([data-value*="-"])',
|
|
21
|
-
(allContentTypes) => {
|
|
22
|
-
allContentTypes.remove()
|
|
23
|
-
},
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
// Moves ADD-title for grid layout
|
|
27
|
-
onFind(
|
|
28
|
-
'.AssignmentDeskDashboard .toolbar .AssignmentDeskDashboard-title',
|
|
29
|
-
(title) => {
|
|
30
|
-
const gridParent = title.closest('.SearchWidget')
|
|
31
|
-
if (!gridParent.querySelector(':scope > .AssignmentDeskDashboard-title')) {
|
|
32
|
-
gridParent.appendChild(title)
|
|
33
|
-
} else {
|
|
34
|
-
title.remove()
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
// Adds RTC event listener for updated Assignments/Pitches
|
|
40
|
-
onFind('.AssignmentDeskDashboard.SearchWidget', (dashboard) => {
|
|
41
|
-
const typeIds = Array.from(
|
|
42
|
-
document.querySelectorAll('select[name="st"] option'),
|
|
43
|
-
(option) => {
|
|
44
|
-
if (option.value) return option.value
|
|
45
|
-
},
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
// hide refresh bar if search results have been updated
|
|
49
|
-
new MutationObserver((e) => {
|
|
50
|
-
dashboard.classList.remove('has-refresh')
|
|
51
|
-
}).observe(dashboard.querySelector('.SearchWidget-result'), {
|
|
52
|
-
attributes: true,
|
|
53
|
-
attributeFilter: ['class'],
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
rtc.receive('com.psddev.cms.tool.page.content.PublishBroadcast', (data) => {
|
|
57
|
-
let dataValues
|
|
58
|
-
let contentTypeId
|
|
59
|
-
let contentId
|
|
60
|
-
|
|
61
|
-
if (!data.mainObjectId) {
|
|
62
|
-
contentTypeId = data.mainObjectIdTypeId
|
|
63
|
-
contentId = data.mainObjectId
|
|
64
|
-
dataValues = data.mainObjectValues
|
|
65
|
-
} else {
|
|
66
|
-
contentTypeId = data.contentTypeId
|
|
67
|
-
contentId = data.contentId
|
|
68
|
-
dataValues = data.values
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (typeIds.includes(contentTypeId)) {
|
|
72
|
-
const links = dashboard.querySelectorAll(
|
|
73
|
-
`.SearchWidget-result a[href$="${contentId}"]:not([data-rtc-updated]):not([target="SingleFieldUpdateTarget"])`,
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
if (links.length > 0) {
|
|
77
|
-
for (const link of links) {
|
|
78
|
-
const linkRow = link.closest('tr')
|
|
79
|
-
// Break logic if the update happened with the single field update
|
|
80
|
-
if (linkRow && linkRow.classList.contains('has-updateAttempt')) {
|
|
81
|
-
return
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
dashboard.classList.add('has-refresh')
|
|
86
|
-
links.forEach((link) => {
|
|
87
|
-
link.setAttribute('data-rtc-updated', true)
|
|
88
|
-
link.parentElement.insertBefore(
|
|
89
|
-
create(
|
|
90
|
-
'span',
|
|
91
|
-
{
|
|
92
|
-
class: 'Label is-updated',
|
|
93
|
-
title: `${data.userName} - ${new Date(
|
|
94
|
-
data.date,
|
|
95
|
-
).toLocaleString()}`,
|
|
96
|
-
},
|
|
97
|
-
'Updated',
|
|
98
|
-
),
|
|
99
|
-
link,
|
|
100
|
-
)
|
|
101
|
-
})
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// check if a new record that won't be in the display
|
|
105
|
-
if (
|
|
106
|
-
!dashboard.classList.contains('has-refresh') &&
|
|
107
|
-
dataValues['cms.content.publishDate'] ===
|
|
108
|
-
dataValues['cms.content.updateDate']
|
|
109
|
-
) {
|
|
110
|
-
dashboard.classList.add('has-refresh')
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
})
|
|
114
|
-
})
|
|
115
|
-
|
|
116
|
-
const setUpUpdateDate = function (dateButton) {
|
|
117
|
-
dateButton.addEventListener('click', (e) => {
|
|
118
|
-
if (!dateButton.classList.contains('is-open')) {
|
|
119
|
-
dateButton.classList.toggle('is-open')
|
|
120
|
-
} else {
|
|
121
|
-
const calendar = document.getElementById('calendarPopup')
|
|
122
|
-
if (calendar) {
|
|
123
|
-
e.preventDefault()
|
|
124
|
-
e.stopImmediatePropagation()
|
|
125
|
-
calendar.dispatchEvent(new CustomEvent('close', { bubbles: true }))
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
})
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
onFind('.SingleFieldUpdate-date', (dateButton) => {
|
|
132
|
-
setUpUpdateDate(dateButton)
|
|
133
|
-
})
|
|
134
|
-
|
|
135
|
-
// Assignment Desk Due Date logic
|
|
136
|
-
onFind('.SingleFieldUpdate-content .DateTimeInput', (dateInput) => {
|
|
137
|
-
const popup = dateInput.closest('.Popup')
|
|
138
|
-
|
|
139
|
-
if (popup && popup.getAttribute('name') === 'SingleFieldUpdateTarget') {
|
|
140
|
-
// Trigger calendar popup
|
|
141
|
-
dateInput.click()
|
|
142
|
-
|
|
143
|
-
const calendar = document.getElementById('calendarPopup')
|
|
144
|
-
const form = popup.querySelector('.SingleFieldUpdate-form')
|
|
145
|
-
if (!form) return
|
|
146
|
-
const objectId = form.dataset.objectid
|
|
147
|
-
const dateButtons = document.querySelectorAll(
|
|
148
|
-
'.SingleFieldUpdate-date.is-open',
|
|
149
|
-
)
|
|
150
|
-
let dateButton = null
|
|
151
|
-
for (const db of dateButtons) {
|
|
152
|
-
if (db.href && !db.href.includes(objectId)) db.classList.toggle('is-open')
|
|
153
|
-
else dateButton = db
|
|
154
|
-
}
|
|
155
|
-
const formButton = form.querySelector('button')
|
|
156
|
-
const input = dateInput.previousSibling
|
|
157
|
-
if (!calendar || !dateButton || !formButton || !input) return
|
|
158
|
-
|
|
159
|
-
// Tether calendar to button
|
|
160
|
-
calendar._tether = new Tether(dateButton, calendar)
|
|
161
|
-
|
|
162
|
-
// Set close listener to toggle the single field update popup
|
|
163
|
-
calendar.onclose = () => {
|
|
164
|
-
if (dateButton.classList.contains('is-open')) {
|
|
165
|
-
dateButton.classList.toggle('is-open')
|
|
166
|
-
}
|
|
167
|
-
popup.classList.remove('is-visible', 'popup-show')
|
|
168
|
-
calendar.remove()
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// Submit the form when the date changes
|
|
172
|
-
input.addEventListener('change', (e) => {
|
|
173
|
-
e.preventDefault()
|
|
174
|
-
const linkList = dateButton.closest('tr')
|
|
175
|
-
if (linkList) {
|
|
176
|
-
linkList.classList.add('has-updateAttempt')
|
|
177
|
-
formButton.click()
|
|
178
|
-
calendar.dispatchEvent(new CustomEvent('close', { bubbles: true }))
|
|
179
|
-
}
|
|
180
|
-
})
|
|
181
|
-
}
|
|
182
|
-
})
|
|
183
|
-
|
|
184
|
-
onFind('.SingleFieldUpdate-success', (success) => {
|
|
185
|
-
success.parentNode.classList.remove('is-visible', 'popup-show')
|
|
186
|
-
|
|
187
|
-
const links = document.querySelectorAll(
|
|
188
|
-
`.SearchWidget-result a[href$="${success.dataset.objectid}"]:not([data-rtc-updated]):not([target="SingleFieldUpdateTarget"])`,
|
|
189
|
-
)
|
|
190
|
-
|
|
191
|
-
const updatedRow = success.content.firstElementChild
|
|
192
|
-
if (!updatedRow) return
|
|
193
|
-
|
|
194
|
-
updatedRow.classList.add('is-updated')
|
|
195
|
-
|
|
196
|
-
if (links.length > 0) {
|
|
197
|
-
links.forEach((link) => {
|
|
198
|
-
const linkList = link.closest('tr')
|
|
199
|
-
if (linkList) {
|
|
200
|
-
const clonedRow = updatedRow.cloneNode(true)
|
|
201
|
-
const dateButton = clonedRow.querySelector('.SingleFieldUpdate-date')
|
|
202
|
-
if (dateButton) {
|
|
203
|
-
// Must reset listener due to cloned node
|
|
204
|
-
setUpUpdateDate(dateButton)
|
|
205
|
-
}
|
|
206
|
-
linkList.replaceWith(clonedRow)
|
|
207
|
-
}
|
|
208
|
-
})
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
updatedRow.remove()
|
|
212
|
-
})
|
|
213
|
-
|
|
214
|
-
onFind('.SingleFieldUpdate-error', (errorMessage) => {
|
|
215
|
-
window.alert(errorMessage.textContent)
|
|
216
|
-
errorMessage.parentNode.classList.remove('is-visible', 'popup-show')
|
|
217
|
-
})
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import onFind from './../dom/onFind'
|
|
2
|
-
// Find Widget title above AssociatedContent div
|
|
3
|
-
onFind('.AssociatedContent', (associatedContent) => {
|
|
4
|
-
const associatedContentWidget = associatedContent.parentElement
|
|
5
|
-
if (associatedContentWidget)
|
|
6
|
-
associatedContentWidget.classList.add('is-associatedContentWidget')
|
|
7
|
-
})
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import onFind from '../dom/onFind'
|
|
2
|
-
|
|
3
|
-
onFind('.BulkUploadProcessor li[data-tab]', (tab) => {
|
|
4
|
-
const type = tab.getAttribute('data-tab')
|
|
5
|
-
const tabType = tab
|
|
6
|
-
.closest('.objectInputs')
|
|
7
|
-
.querySelector('[data-tab="' + type + '"][data-upload-mime-type-count]')
|
|
8
|
-
let tabCount
|
|
9
|
-
if (tabType) {
|
|
10
|
-
tabCount = tabType.getAttribute('data-upload-mime-type-count')
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
if (tabCount) {
|
|
14
|
-
const countSpan = document.createElement('SPAN')
|
|
15
|
-
countSpan.classList.add('MimeTypeCount')
|
|
16
|
-
countSpan.innerText = tabCount
|
|
17
|
-
tab.append(countSpan)
|
|
18
|
-
}
|
|
19
|
-
})
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import onFind from '../dom/onFind'
|
|
2
|
-
|
|
3
|
-
// Because window.close can only be called on tabs created via window.open, we call window.open
|
|
4
|
-
// here to ensure that the close button on the auth confirmation page functions properly
|
|
5
|
-
onFind('.ButtonForClosableWindow', (button) => {
|
|
6
|
-
button.addEventListener('click', (event) => {
|
|
7
|
-
const url = button.getAttribute('data-url')
|
|
8
|
-
if (url) {
|
|
9
|
-
event.preventDefault()
|
|
10
|
-
window.open(url, '_blank')
|
|
11
|
-
}
|
|
12
|
-
})
|
|
13
|
-
})
|