@brightspot/ui 3.0.1-cms-ui-migration.2 → 3.0.1-cms-ui-migration.4
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 +56 -37
- package/dist/custom-elements.json +1807 -1807
- package/dist/storybook/assets/{ActionBar.stories-hJ_5cm-P.js → ActionBar.stories-BZAVK1QG.js} +1 -1
- package/dist/storybook/assets/{ActionItem.stories-Bjx2803w.js → ActionItem.stories-BqiWvlWi.js} +1 -1
- package/dist/storybook/assets/{Avatar.stories-Cj0YgZ6f.js → Avatar.stories-DkdB6hd_.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup.stories-Lh_sQFCU.js → AvatarGroup.stories-DODqaIix.js} +1 -1
- package/dist/storybook/assets/{Badge.stories-BL7RUibx.js → Badge.stories-DZoum08S.js} +1 -1
- package/dist/storybook/assets/{Button-BPHNcxqK.js → Button-BkmBgNO-.js} +1 -1
- package/dist/storybook/assets/{Button.stories-CAYO4gdU.js → Button.stories-BFhCL2dp.js} +1 -1
- package/dist/storybook/assets/{ButtonGroup.stories-Cd13Us5K.js → ButtonGroup.stories-DlTGTvkq.js} +1 -1
- package/dist/storybook/assets/{Celebrate.stories-D_KE3Qze.js → Celebrate.stories-m4d4zTEz.js} +1 -1
- package/dist/storybook/assets/{Checkbox.stories-Aj1xgZVn.js → Checkbox.stories-Y253YeU7.js} +1 -1
- package/dist/storybook/assets/{CircularProgress.stories-BecV_v6d.js → CircularProgress.stories-6BD8uV5G.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin.stories-DU-WiZ2f.js → ClipboardMixin.stories-BkH66rIU.js} +1 -1
- package/dist/storybook/assets/{Color-6BZIO3FS-BYl4KZZn.js → Color-6BZIO3FS-iG0OjPBU.js} +1 -1
- package/dist/storybook/assets/{Colors.stories-BMUVUy2q.js → Colors.stories-BxiyQnEg.js} +1 -1
- package/dist/storybook/assets/{CombinedEffects.stories-FHcPKFm6.js → CombinedEffects.stories-Bs3U7qRl.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin-EMUnfT5y.js → ComponentStatesMixin-DampYb5c.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-SXq0kzS9.js → ComponentStatesMixin.stories-CZ2OW7as.js} +1 -1
- package/dist/storybook/assets/{CopyToClipboard.stories-u43lhvcI.js → CopyToClipboard.stories-CdlghjaE.js} +1 -1
- package/dist/storybook/assets/{Debounce.stories-BdCn5qgO.js → Debounce.stories-CymT8PnT.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-LL677BLK-DxiEJ_jx.js → DocsRenderer-LL677BLK-dqHCo-GE.js} +3 -3
- package/dist/storybook/assets/{Dropdown.stories-BWSRwjIF.js → Dropdown.stories-B6JwKg-I.js} +1 -1
- package/dist/storybook/assets/{EmptyState.stories-BpobeZL5.js → EmptyState.stories-Bk229lPH.js} +1 -1
- package/dist/storybook/assets/{Events.stories-CP5kMzpr.js → Events.stories-C8-k9cx8.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-CbJD-oTB.js → Heading.stories-DIdnAQRG.js} +1 -1
- package/dist/storybook/assets/{HueRipple.stories-BOABJ7zw.js → HueRipple.stories-B1gXAEaH.js} +1 -1
- package/dist/storybook/assets/{Icon.stories-CWlUHL4j.js → Icon.stories--1VJ0_yt.js} +1 -1
- package/dist/storybook/assets/{IconButton.stories-BWBs-OLT.js → IconButton.stories-CS2rEIir.js} +1 -1
- package/dist/storybook/assets/{LinearProgress.stories-LZ0GZoxF.js → LinearProgress.stories-Bx0CQQls.js} +1 -1
- package/dist/storybook/assets/{Pagination.stories-CbLaR3P9.js → Pagination.stories-B4AogTXB.js} +1 -1
- package/dist/storybook/assets/{Popover.stories-JHrWqYZw.js → Popover.stories-BR88DPgU.js} +1 -1
- package/dist/storybook/assets/{ReadyMixin-B1H2a9x8.js → ReadyMixin-n6qZO39Y.js} +1 -1
- package/dist/storybook/assets/{RovingTabindexMixin.stories-UMHpYG73.js → RovingTabindexMixin.stories-1xTJSMSv.js} +1 -1
- package/dist/storybook/assets/{Rtc.stories-VQtNSlls.js → Rtc.stories-Rt0A_rUZ.js} +1 -1
- package/dist/storybook/assets/{ScrollShadow.stories-CYdi8Tgp.js → ScrollShadow.stories-CjLdJyYu.js} +1 -1
- package/dist/storybook/assets/{Switch.stories-D8F2hZCf.js → Switch.stories-CF8wO4v2.js} +1 -1
- package/dist/storybook/assets/{Tab.stories-wgBP0lTj.js → Tab.stories-C8XNshog.js} +1 -1
- package/dist/storybook/assets/{Tabs.stories-C00rr5sf.js → Tabs.stories-B01l4rQx.js} +1 -1
- package/dist/storybook/assets/{Throttle.stories-BhQEfJbS.js → Throttle.stories-Bpi0K5j9.js} +1 -1
- package/dist/storybook/assets/{Tooltip.stories-CGoZ5qTn.js → Tooltip.stories-BC4zMiZ1.js} +1 -1
- package/dist/storybook/assets/{Upload.stories-B3K-HAXw.js → Upload.stories-2pWv_fZ1.js} +1 -1
- package/dist/storybook/assets/{UploadItem.stories-71ArSoUh.js → UploadItem.stories-aLeAUM7y.js} +1 -1
- package/dist/storybook/assets/{Welcome.stories-CihlfFXS.js → Welcome.stories-DJV83eb7.js} +1 -1
- package/dist/storybook/assets/{Widget.stories-1u4KbiJM.js → Widget.stories-Cz0i2o6L.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-65CFNBJE-B3Jitxw9.js → WithTooltip-65CFNBJE-D8QwVYG8.js} +1 -1
- package/dist/storybook/assets/{blocks-C1HaXuQB.js → blocks-BFmpEZRy.js} +5 -5
- package/dist/storybook/assets/{formatter-EIJCOSYU-Dy9Lt9fs.js → formatter-EIJCOSYU-CdwdJOPy.js} +1 -1
- package/dist/storybook/assets/if-defined-gbJXriW-.js +1 -0
- package/dist/storybook/assets/{iframe-Dx6IxWXF.js → iframe-CyssRDCd.js} +4 -4
- package/dist/storybook/assets/{index-OrjedSVh.js → index-B82i8dhg.js} +1 -1
- package/dist/storybook/assets/{onFind-YTqjw6W0.js → onFind-BFI1uIxr.js} +1 -1
- package/dist/storybook/assets/{onFind.stories-DEvwTrmx.js → onFind.stories-zZjQs_Gn.js} +1 -1
- package/dist/storybook/assets/{onRemove.stories-D5mO-Lin.js → onRemove.stories-pFBwAIex.js} +1 -1
- package/dist/storybook/assets/{onVisible.stories-C3Rcz0Eb.js → onVisible.stories-5dErOVRq.js} +1 -1
- package/dist/storybook/assets/{style-map-CiMHry7H.js → style-map-D0EcLEWO.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-DIZnuhb2.js → syntaxhighlighter-ED5Y7EFY--2h_dVga.js} +1 -1
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/project.json +1 -1
- package/package.json +16 -2
- package/src/legacy/tool-ui/src/AnalyticsWidget.css +1 -1
- package/src/legacy/tool-ui/src/Board.css +1 -1
- package/src/legacy/tool-ui/src/BulkUpload.css +1 -1
- package/src/legacy/tool-ui/src/ComboInput.css +1 -1
- package/src/legacy/tool-ui/src/Compat.css +5 -5
- package/src/legacy/tool-ui/src/ContentEditDrawer.css +1 -1
- package/src/legacy/tool-ui/src/Dialog.css +1 -1
- package/src/legacy/tool-ui/src/FormFilter.css +1 -1
- package/src/legacy/tool-ui/src/Icon/index.css +1 -1
- package/src/legacy/tool-ui/src/ImageEditor.css +1 -1
- package/src/legacy/tool-ui/src/Incompatible.css +2 -2
- package/src/legacy/tool-ui/src/LinkCarousel.css +1 -1
- package/src/legacy/tool-ui/src/Page.css +1 -1
- package/src/legacy/tool-ui/src/RepeatableContentInputGroup.css +1 -1
- package/src/legacy/tool-ui/src/RichText.css +1 -1
- package/src/legacy/tool-ui/src/SearchWidget.css +2 -2
- package/src/legacy/tool-ui/src/SearchWidgetAdvanced.css +1 -1
- package/src/legacy/tool-ui/src/Widget.css +1 -1
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.5e5d7f655e174ddd85f5.css +5 -0
- package/dist/storybook/assets/if-defined-CA2KmTqA.js +0 -1
- package/docs/adr/0001-retire-cms-ui-package-fold-under-src-legacy.md +0 -78
- package/docs/adr/0002-yarn-workspaces-preserve-cms-ui-deps.md +0 -130
- package/docs/adr/0003-bundle-equivalence-as-fold-acceptance-criterion.md +0 -286
- 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/dist/v5.5e3fdf0f0b20b4e3c170.css +0 -5
- 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,718 +0,0 @@
|
|
|
1
|
-
import bspUtils from '../bsp-utils'
|
|
2
|
-
import ColorRotator from '../../v4/theme/ColorRotator'
|
|
3
|
-
import { v1 as uuidv1 } from 'uuid'
|
|
4
|
-
import throttle from '../../v4/util/throttle'
|
|
5
|
-
import cc from 'color-convert'
|
|
6
|
-
|
|
7
|
-
const dpr = window.devicePixelRatio || 1
|
|
8
|
-
const cr = new ColorRotator()
|
|
9
|
-
|
|
10
|
-
var $win = $(window)
|
|
11
|
-
|
|
12
|
-
function getTransitionColor($transition) {
|
|
13
|
-
var transitionColor = $.data($transition[0], 'workflow-transitionColor')
|
|
14
|
-
|
|
15
|
-
if (!transitionColor) {
|
|
16
|
-
transitionColor = cr.getNext()
|
|
17
|
-
$.data($transition[0], 'workflow-transitionColor', transitionColor)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return transitionColor
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function relativeLuminance(rgb) {
|
|
24
|
-
if (!rgb) {
|
|
25
|
-
return 'black'
|
|
26
|
-
}
|
|
27
|
-
const [r, g, b] = rgb
|
|
28
|
-
.map((c) => c / 255)
|
|
29
|
-
.map((c) => (c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4)))
|
|
30
|
-
return (0.2126 * r + 0.7152 * g + 0.0722 * b) * 100 < 10 ? 'white' : 'black'
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
bspUtils.onDomInsert(document, '.workflow', {
|
|
34
|
-
insert: function (textarea) {
|
|
35
|
-
var $textarea = $(textarea)
|
|
36
|
-
var definition = $.parseJSON($textarea.val()) || {}
|
|
37
|
-
var $visual
|
|
38
|
-
var drawArrow
|
|
39
|
-
var $arrows
|
|
40
|
-
var $transitions = {}
|
|
41
|
-
var addTransitionTarget
|
|
42
|
-
var appendTransitionAdd
|
|
43
|
-
var addState
|
|
44
|
-
var nextStateId = 0
|
|
45
|
-
var $stateAdd // eslint-disable-line no-unused-vars
|
|
46
|
-
var $stateInitial
|
|
47
|
-
var $stateFinal // eslint-disable-line no-unused-vars
|
|
48
|
-
var updateTransitionSelects
|
|
49
|
-
|
|
50
|
-
$visual = $('<div/>', {
|
|
51
|
-
class: 'Workflow-ui',
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
drawArrow = function (context, color, $source, targetX, targetY) {
|
|
55
|
-
var sourcePosition = $source.position()
|
|
56
|
-
var sourceX = sourcePosition.left
|
|
57
|
-
var sourceY
|
|
58
|
-
var sourceControlY
|
|
59
|
-
var sourceControlX
|
|
60
|
-
var targetControlY
|
|
61
|
-
var targetControlX
|
|
62
|
-
var $target
|
|
63
|
-
var targetPosition
|
|
64
|
-
var sourceDirection
|
|
65
|
-
var targetDirection
|
|
66
|
-
var arrowSize
|
|
67
|
-
|
|
68
|
-
if (typeof targetY === 'undefined') {
|
|
69
|
-
$target = targetX
|
|
70
|
-
targetPosition = $target.position()
|
|
71
|
-
targetX = targetPosition.left
|
|
72
|
-
targetY = targetPosition.top
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (sourceX > targetX) {
|
|
76
|
-
sourceY = sourcePosition.top + $source[0].clientHeight * 0.9
|
|
77
|
-
sourceDirection = -1
|
|
78
|
-
targetDirection = 1
|
|
79
|
-
|
|
80
|
-
if ($target) {
|
|
81
|
-
targetX += $target[0].clientWidth
|
|
82
|
-
targetY += $target[0].clientHeight * 0.9
|
|
83
|
-
}
|
|
84
|
-
} else {
|
|
85
|
-
sourceX += $source[0].clientWidth
|
|
86
|
-
sourceY = sourcePosition.top + $source[0].clientHeight * 0.1
|
|
87
|
-
sourceDirection = 1
|
|
88
|
-
targetDirection = -1
|
|
89
|
-
|
|
90
|
-
if ($target) {
|
|
91
|
-
targetY += $target[0].clientHeight * 0.1
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
sourceControlX = sourceX + sourceDirection * 100
|
|
96
|
-
sourceControlY = sourceY
|
|
97
|
-
targetControlX = targetX + targetDirection * 100
|
|
98
|
-
targetControlY = targetY
|
|
99
|
-
|
|
100
|
-
context.strokeStyle = color
|
|
101
|
-
context.fillStyle = color
|
|
102
|
-
|
|
103
|
-
context.lineWidth = 1.0
|
|
104
|
-
context.beginPath()
|
|
105
|
-
context.moveTo(sourceX, sourceY)
|
|
106
|
-
context.bezierCurveTo(
|
|
107
|
-
sourceControlX,
|
|
108
|
-
sourceControlY,
|
|
109
|
-
targetControlX,
|
|
110
|
-
targetControlY,
|
|
111
|
-
targetX,
|
|
112
|
-
targetY,
|
|
113
|
-
)
|
|
114
|
-
context.stroke()
|
|
115
|
-
|
|
116
|
-
arrowSize = targetX > targetControlX ? 5 : -5
|
|
117
|
-
context.beginPath()
|
|
118
|
-
context.moveTo(targetX, targetY)
|
|
119
|
-
context.lineTo(targetX - 2 * arrowSize, targetY - arrowSize)
|
|
120
|
-
context.lineTo(targetX - 2 * arrowSize, targetY + arrowSize)
|
|
121
|
-
context.closePath()
|
|
122
|
-
context.fill()
|
|
123
|
-
|
|
124
|
-
return {
|
|
125
|
-
sourceX: sourceX,
|
|
126
|
-
sourceY: sourceY,
|
|
127
|
-
targetX: targetX,
|
|
128
|
-
targetY: targetY,
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
$visual.append(
|
|
133
|
-
($arrows = $('<canvas/>', {
|
|
134
|
-
css: {
|
|
135
|
-
left: 0,
|
|
136
|
-
'pointer-events': 'none',
|
|
137
|
-
position: 'absolute',
|
|
138
|
-
top: 0,
|
|
139
|
-
},
|
|
140
|
-
})),
|
|
141
|
-
)
|
|
142
|
-
|
|
143
|
-
$arrows.bind('redraw', function (event, $source, targetX, targetY) {
|
|
144
|
-
var context = this.getContext('2d')
|
|
145
|
-
var width = $arrows.outerWidth()
|
|
146
|
-
var height = $arrows.outerHeight()
|
|
147
|
-
var rightBoundary
|
|
148
|
-
var bottomBoundary
|
|
149
|
-
var sourceLeftOffset
|
|
150
|
-
var sourceTopOffset
|
|
151
|
-
|
|
152
|
-
definition = { states: [], transitions: [] }
|
|
153
|
-
context.resetTransform()
|
|
154
|
-
context.scale(dpr, dpr)
|
|
155
|
-
context.clearRect(0, 0, $visual.width(), $visual.height())
|
|
156
|
-
|
|
157
|
-
$visual.find('.Workflow-state').each(function () {
|
|
158
|
-
var $source = $(this)
|
|
159
|
-
var sourceId = $source.attr('data-id')
|
|
160
|
-
var sourcePosition = $source.position()
|
|
161
|
-
var targets = $.data(this, 'workflow-targets')
|
|
162
|
-
|
|
163
|
-
if (!(sourceId === 'initial' || sourceId === 'final')) {
|
|
164
|
-
sourceLeftOffset = parseFloat(sourcePosition.left / width)
|
|
165
|
-
rightBoundary = parseFloat((width - $source[0].clientWidth) / width)
|
|
166
|
-
sourceTopOffset = parseFloat(sourcePosition.top / height)
|
|
167
|
-
bottomBoundary = parseFloat(
|
|
168
|
-
(height - $source[0].clientHeight) / height,
|
|
169
|
-
)
|
|
170
|
-
|
|
171
|
-
const stateColor =
|
|
172
|
-
$source.find('.sp-preview').attr('data-color') ||
|
|
173
|
-
$source.find('input.color').val()
|
|
174
|
-
|
|
175
|
-
definition.states.push({
|
|
176
|
-
id: sourceId,
|
|
177
|
-
displayName: $source.find('input.Workflow-stateName').val(),
|
|
178
|
-
name:
|
|
179
|
-
$source.find(':input[type="hidden"]').val() ||
|
|
180
|
-
$source.find('input.Workflow-stateName').val(),
|
|
181
|
-
color: stateColor,
|
|
182
|
-
textColor: relativeLuminance(cc.hex.rgb(stateColor)),
|
|
183
|
-
left: sourceLeftOffset,
|
|
184
|
-
top: sourceTopOffset,
|
|
185
|
-
})
|
|
186
|
-
|
|
187
|
-
if (sourceLeftOffset > rightBoundary) {
|
|
188
|
-
$source.css('left', rightBoundary * 100 + '%')
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
if (sourceTopOffset > bottomBoundary) {
|
|
192
|
-
$source.css('top', bottomBoundary * 100 + '%')
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
if (targets) {
|
|
197
|
-
$.each(targets, function (index, targetData) {
|
|
198
|
-
var targetId = targetData.target
|
|
199
|
-
var $target = $visual.find('[data-id="' + targetId + '"]')
|
|
200
|
-
var transition
|
|
201
|
-
var $transition
|
|
202
|
-
var $transitionInput
|
|
203
|
-
var transitionColor
|
|
204
|
-
var bound
|
|
205
|
-
|
|
206
|
-
if ($target.length === 0) {
|
|
207
|
-
return
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
transition = sourceId + '/' + targetId
|
|
211
|
-
$transition = $transitions[transition]
|
|
212
|
-
|
|
213
|
-
if (!$transition) {
|
|
214
|
-
$transition = $('<fieldset/>', {
|
|
215
|
-
class: 'Workflow-transition',
|
|
216
|
-
}).append(
|
|
217
|
-
$('<legend/>', {
|
|
218
|
-
class: 'screen-reader-only',
|
|
219
|
-
text: window.BRIGHTSPOT.ui.workflow.transitionLegend,
|
|
220
|
-
}),
|
|
221
|
-
)
|
|
222
|
-
|
|
223
|
-
const $transitionInput = $('<input/>', {
|
|
224
|
-
type: 'text',
|
|
225
|
-
class: 'expandable Workflow-transitionName',
|
|
226
|
-
placeholder: window.BRIGHTSPOT.ui.workflow.placeholder,
|
|
227
|
-
value: targetData.displayName || '',
|
|
228
|
-
keydown: function (evt) {
|
|
229
|
-
if (evt.originalEvent.key === 'Enter') {
|
|
230
|
-
evt.originalEvent.preventDefault()
|
|
231
|
-
return
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
})
|
|
235
|
-
$transition.append($transitionInput)
|
|
236
|
-
|
|
237
|
-
$transition.append(
|
|
238
|
-
$('<input/>', {
|
|
239
|
-
type: 'hidden',
|
|
240
|
-
value:
|
|
241
|
-
targetData.name ||
|
|
242
|
-
sourceId + '-' + targetId + '-' + uuidv1(),
|
|
243
|
-
}),
|
|
244
|
-
)
|
|
245
|
-
|
|
246
|
-
$transition.append(
|
|
247
|
-
$('<button/>', {
|
|
248
|
-
class: 'Workflow-removeTransition Link',
|
|
249
|
-
'aria-label': window.BRIGHTSPOT.ui.workflow.remove,
|
|
250
|
-
text: window.BRIGHTSPOT.ui.workflow.remove,
|
|
251
|
-
click: function () {
|
|
252
|
-
var targets = $.data($source[0], 'workflow-targets')
|
|
253
|
-
|
|
254
|
-
if (targets) {
|
|
255
|
-
$.data(
|
|
256
|
-
$source[0],
|
|
257
|
-
'workflow-targets',
|
|
258
|
-
$.map(targets, function (target) {
|
|
259
|
-
return target.source === sourceId &&
|
|
260
|
-
target.target === targetId
|
|
261
|
-
? null
|
|
262
|
-
: target
|
|
263
|
-
}),
|
|
264
|
-
)
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
$transitions[transition] = undefined
|
|
268
|
-
$transition.remove()
|
|
269
|
-
$arrows.trigger('redraw')
|
|
270
|
-
|
|
271
|
-
return false
|
|
272
|
-
},
|
|
273
|
-
}),
|
|
274
|
-
)
|
|
275
|
-
|
|
276
|
-
$visual.append($transition)
|
|
277
|
-
$transitions[transition] = $transition
|
|
278
|
-
$visual.trigger('create')
|
|
279
|
-
|
|
280
|
-
if (targetData.focus) {
|
|
281
|
-
$transitionInput[0].focus()
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
$transitionInput = $transition.find(':input[type="text"]')
|
|
286
|
-
transitionColor = getTransitionColor($transition)
|
|
287
|
-
bound = drawArrow(context, transitionColor, $source, $target)
|
|
288
|
-
// var boundOffset = bound.sourceX < bound.targetX ? 0.3 : 0.7
|
|
289
|
-
|
|
290
|
-
$transition.css({
|
|
291
|
-
left:
|
|
292
|
-
(bound.sourceX +
|
|
293
|
-
bound.targetX -
|
|
294
|
-
$transitionInput[0].clientWidth) /
|
|
295
|
-
2,
|
|
296
|
-
top:
|
|
297
|
-
(bound.sourceY +
|
|
298
|
-
bound.targetY -
|
|
299
|
-
$transitionInput[0].offsetHeight) /
|
|
300
|
-
2,
|
|
301
|
-
})
|
|
302
|
-
|
|
303
|
-
$transitionInput.css({
|
|
304
|
-
'border-color': transitionColor,
|
|
305
|
-
})
|
|
306
|
-
|
|
307
|
-
definition.transitions.push({
|
|
308
|
-
displayName: $transitionInput.val(),
|
|
309
|
-
name:
|
|
310
|
-
$transition.find(':input[type="hidden"]').val() ||
|
|
311
|
-
$transitionInput.val(),
|
|
312
|
-
source: sourceId,
|
|
313
|
-
target: targetId,
|
|
314
|
-
})
|
|
315
|
-
})
|
|
316
|
-
}
|
|
317
|
-
})
|
|
318
|
-
|
|
319
|
-
$textarea.val(JSON.stringify(definition))
|
|
320
|
-
|
|
321
|
-
if ($source) {
|
|
322
|
-
drawArrow(context, 'black', $source, targetX, targetY)
|
|
323
|
-
}
|
|
324
|
-
})
|
|
325
|
-
|
|
326
|
-
$visual.delegate(':input', 'input', function () {
|
|
327
|
-
$arrows.trigger('redraw')
|
|
328
|
-
})
|
|
329
|
-
|
|
330
|
-
addTransitionTarget = function (targetData) {
|
|
331
|
-
var $source = $visual.find('[data-id="' + targetData.source + '"]')
|
|
332
|
-
var targets
|
|
333
|
-
|
|
334
|
-
if ($source.length > 0) {
|
|
335
|
-
targets = $.data($source[0], 'workflow-targets') || []
|
|
336
|
-
targets.push(targetData)
|
|
337
|
-
$.data($source[0], 'workflow-targets', targets)
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
appendTransitionAdd = function ($state) {
|
|
342
|
-
const text =
|
|
343
|
-
($textarea.attr('data-add') || window.BRIGHTSPOT.ui.workflow.add) +
|
|
344
|
-
' ' +
|
|
345
|
-
($textarea.attr('data-transition-label') ||
|
|
346
|
-
$textarea.attr('data-transition-fallback') ||
|
|
347
|
-
'Transition')
|
|
348
|
-
|
|
349
|
-
$state.append(
|
|
350
|
-
$('<button/>', {
|
|
351
|
-
class: 'Workflow-addTransition Link',
|
|
352
|
-
type: 'button',
|
|
353
|
-
'aria-haspopup': true,
|
|
354
|
-
'aria-expanded': false,
|
|
355
|
-
'aria-label': text,
|
|
356
|
-
text: text,
|
|
357
|
-
click: function () {
|
|
358
|
-
if ($visual.is('.is-transitioning')) {
|
|
359
|
-
return true
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
$visual.addClass('is-transitioning')
|
|
363
|
-
|
|
364
|
-
// Calculate visualOffset once to avoid repeated .offset() calls
|
|
365
|
-
var visualOffset = $visual.offset()
|
|
366
|
-
|
|
367
|
-
$win.bind(
|
|
368
|
-
'mousemove.workflows',
|
|
369
|
-
$.throttle(50, function (event) {
|
|
370
|
-
$arrows.trigger('redraw', [
|
|
371
|
-
$state,
|
|
372
|
-
event.pageX - visualOffset.left,
|
|
373
|
-
event.pageY - visualOffset.top,
|
|
374
|
-
])
|
|
375
|
-
}),
|
|
376
|
-
)
|
|
377
|
-
|
|
378
|
-
$win.bind('click.workflows', function (event) {
|
|
379
|
-
var $target = $(event.target).closest('.Workflow-state')
|
|
380
|
-
|
|
381
|
-
// Prevent adding transition to self
|
|
382
|
-
if (
|
|
383
|
-
$target.length > 0 &&
|
|
384
|
-
$target.attr('data-id') !== $state.attr('data-id')
|
|
385
|
-
) {
|
|
386
|
-
addTransitionTarget({
|
|
387
|
-
source: $state.attr('data-id'),
|
|
388
|
-
target: $target.attr('data-id'),
|
|
389
|
-
})
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
$visual.removeClass('is-transitioning')
|
|
393
|
-
$win.unbind('.workflows')
|
|
394
|
-
$arrows.trigger('redraw')
|
|
395
|
-
|
|
396
|
-
return false
|
|
397
|
-
})
|
|
398
|
-
|
|
399
|
-
return false
|
|
400
|
-
},
|
|
401
|
-
keydown: function (evt) {
|
|
402
|
-
if (evt.originalEvent.key === 'Enter') {
|
|
403
|
-
evt.originalEvent.preventDefault()
|
|
404
|
-
evt.target.setAttribute('aria-expanded', 'true')
|
|
405
|
-
$state.find('.ComboInput').click()
|
|
406
|
-
}
|
|
407
|
-
},
|
|
408
|
-
}),
|
|
409
|
-
)
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
addState = function (stateData) {
|
|
413
|
-
var $state
|
|
414
|
-
|
|
415
|
-
$visual.append(
|
|
416
|
-
($state = $('<fieldset/>', {
|
|
417
|
-
class: 'Workflow-state is-intermediate',
|
|
418
|
-
'data-id': stateData.id,
|
|
419
|
-
css: {
|
|
420
|
-
left: Math.min(stateData.left * 100, 99.9) + '%',
|
|
421
|
-
top: Math.min(stateData.top * 100, 99.9) + '%',
|
|
422
|
-
},
|
|
423
|
-
mousedown: function (event) {
|
|
424
|
-
event.dragConstrainToContainer = true
|
|
425
|
-
event.dragContainer = $visual[0]
|
|
426
|
-
event.onDragConstrainCallback = function () {
|
|
427
|
-
$arrows.trigger('redraw')
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
$.drag(
|
|
431
|
-
this,
|
|
432
|
-
event,
|
|
433
|
-
function (event, data) {
|
|
434
|
-
data.delta = $state.position()
|
|
435
|
-
data.delta.left -= event.pageX
|
|
436
|
-
data.delta.top -= event.pageY
|
|
437
|
-
},
|
|
438
|
-
function (event, data) {
|
|
439
|
-
$state.css({
|
|
440
|
-
left: event.pageX + data.delta.left,
|
|
441
|
-
top: event.pageY + data.delta.top,
|
|
442
|
-
})
|
|
443
|
-
|
|
444
|
-
// "is-dragging" class used in v5
|
|
445
|
-
this.classList.add('is-dragging')
|
|
446
|
-
$arrows.trigger('redraw')
|
|
447
|
-
},
|
|
448
|
-
function (event) {},
|
|
449
|
-
)
|
|
450
|
-
},
|
|
451
|
-
mouseup: function (event) {
|
|
452
|
-
// "is-dragging" class used in v5
|
|
453
|
-
requestAnimationFrame(() => {
|
|
454
|
-
this.classList.remove('is-dragging')
|
|
455
|
-
})
|
|
456
|
-
},
|
|
457
|
-
}).append(
|
|
458
|
-
$('<legend/>', {
|
|
459
|
-
class: 'screen-reader-only',
|
|
460
|
-
text: window.BRIGHTSPOT.ui.workflow.stateLegend,
|
|
461
|
-
}),
|
|
462
|
-
)),
|
|
463
|
-
)
|
|
464
|
-
|
|
465
|
-
$state.append(
|
|
466
|
-
$('<input/>', {
|
|
467
|
-
type: 'text',
|
|
468
|
-
class: 'CIG-placeholder color',
|
|
469
|
-
// if a color is not chosen set the value to the default color
|
|
470
|
-
value: stateData.color || 'var(--color-gray6)',
|
|
471
|
-
}),
|
|
472
|
-
)
|
|
473
|
-
|
|
474
|
-
$state.append(
|
|
475
|
-
$('<input/>', {
|
|
476
|
-
type: 'text',
|
|
477
|
-
class: 'expandable Workflow-stateName',
|
|
478
|
-
value: stateData.displayName || '',
|
|
479
|
-
placeholder: window.BRIGHTSPOT.ui.workflow.placeholder,
|
|
480
|
-
keydown: function (evt) {
|
|
481
|
-
if (evt.originalEvent.key === 'Enter') {
|
|
482
|
-
evt.originalEvent.preventDefault()
|
|
483
|
-
return
|
|
484
|
-
}
|
|
485
|
-
},
|
|
486
|
-
keyup: throttle(500, updateTransitionSelects),
|
|
487
|
-
}),
|
|
488
|
-
)
|
|
489
|
-
|
|
490
|
-
$state.append(
|
|
491
|
-
$('<input/>', {
|
|
492
|
-
class: 'Workflow-stateDataName',
|
|
493
|
-
type: 'hidden',
|
|
494
|
-
value: stateData.name || stateData.id + '-' + uuidv1(),
|
|
495
|
-
}),
|
|
496
|
-
)
|
|
497
|
-
|
|
498
|
-
$state.append(
|
|
499
|
-
$('<button/>', {
|
|
500
|
-
class: 'Workflow-removeState Link',
|
|
501
|
-
type: 'button',
|
|
502
|
-
'aria-label': window.BRIGHTSPOT.ui.workflow.remove,
|
|
503
|
-
text: window.BRIGHTSPOT.ui.workflow.remove,
|
|
504
|
-
click: async function (event) {
|
|
505
|
-
const workflowStateName = this.parentNode.querySelector(
|
|
506
|
-
'input.Workflow-stateDataName',
|
|
507
|
-
).value
|
|
508
|
-
if (workflowStateName) {
|
|
509
|
-
const url =
|
|
510
|
-
window.BRIGHTSPOT.web.pagePaths[
|
|
511
|
-
'com.psddev.cms.db.ConfirmDeleteWorkflowStatePage'
|
|
512
|
-
] +
|
|
513
|
-
'?' +
|
|
514
|
-
new URLSearchParams({ workflowStateName: workflowStateName })
|
|
515
|
-
try {
|
|
516
|
-
const response = await fetch(url, {
|
|
517
|
-
method: 'GET',
|
|
518
|
-
credentials: 'include',
|
|
519
|
-
})
|
|
520
|
-
|
|
521
|
-
const responseJson = await response.json()
|
|
522
|
-
let canRemove = false
|
|
523
|
-
if (responseJson.confirmationRequired) {
|
|
524
|
-
if (window.confirm(responseJson.message)) {
|
|
525
|
-
canRemove = true
|
|
526
|
-
}
|
|
527
|
-
} else {
|
|
528
|
-
canRemove = true
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
if (canRemove) {
|
|
532
|
-
$state.remove()
|
|
533
|
-
$arrows.trigger('redraw')
|
|
534
|
-
updateTransitionSelects()
|
|
535
|
-
}
|
|
536
|
-
} catch (error) {
|
|
537
|
-
console.error(error)
|
|
538
|
-
}
|
|
539
|
-
return false
|
|
540
|
-
}
|
|
541
|
-
},
|
|
542
|
-
}),
|
|
543
|
-
)
|
|
544
|
-
|
|
545
|
-
appendTransitionAdd($state)
|
|
546
|
-
$visual.css('height', 120 * $visual.find('.Workflow-state').length)
|
|
547
|
-
$arrows.attr({
|
|
548
|
-
width: $visual.width(),
|
|
549
|
-
height: $visual.height(),
|
|
550
|
-
})
|
|
551
|
-
|
|
552
|
-
updateTransitionSelects()
|
|
553
|
-
return $state
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
updateTransitionSelects = function () {
|
|
557
|
-
const $states = $visual.find('.Workflow-state')
|
|
558
|
-
$states.each((i, state) => {
|
|
559
|
-
if (state.dataset.id === 'final') {
|
|
560
|
-
return
|
|
561
|
-
}
|
|
562
|
-
const $state = $(state)
|
|
563
|
-
$state.find('.Workflow-transitions').remove()
|
|
564
|
-
|
|
565
|
-
const $transitionSelect = $('<select/>', {
|
|
566
|
-
class: 'Workflow-transitions screen-reader-only',
|
|
567
|
-
name: 'transitionSelect',
|
|
568
|
-
tabindex: -1,
|
|
569
|
-
'aria-label': window.BRIGHTSPOT.ui.workflow.transitions,
|
|
570
|
-
change: function () {
|
|
571
|
-
addTransitionTarget({
|
|
572
|
-
source: state.dataset.id,
|
|
573
|
-
target: this.options[this.selectedIndex].value,
|
|
574
|
-
focus: true,
|
|
575
|
-
})
|
|
576
|
-
},
|
|
577
|
-
}).append($('<option/>'))
|
|
578
|
-
|
|
579
|
-
$transitionSelect[0].addEventListener('combo-input:hide', (evt) => {
|
|
580
|
-
const prev = evt.target.previousElementSibling
|
|
581
|
-
if (!prev) return
|
|
582
|
-
prev.setAttribute('aria-expanded', 'false')
|
|
583
|
-
})
|
|
584
|
-
|
|
585
|
-
$states.each((i, other) => {
|
|
586
|
-
if (
|
|
587
|
-
$state[0] !== other &&
|
|
588
|
-
other.dataset.id !== 'initial' &&
|
|
589
|
-
other.dataset.id !== 'final'
|
|
590
|
-
) {
|
|
591
|
-
$transitionSelect.append(
|
|
592
|
-
$('<option/>', {
|
|
593
|
-
value: other.dataset.id,
|
|
594
|
-
text: other.querySelector('.Workflow-stateName').value,
|
|
595
|
-
}),
|
|
596
|
-
)
|
|
597
|
-
}
|
|
598
|
-
})
|
|
599
|
-
|
|
600
|
-
$transitionSelect.append(
|
|
601
|
-
$('<option/>', {
|
|
602
|
-
value: 'final',
|
|
603
|
-
text: window.BRIGHTSPOT.ui.workflow.published,
|
|
604
|
-
}),
|
|
605
|
-
)
|
|
606
|
-
|
|
607
|
-
$state.append($transitionSelect)
|
|
608
|
-
})
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
$visual.append(
|
|
612
|
-
($stateAdd = $('<button/>', {
|
|
613
|
-
class: 'Workflow-addState Link',
|
|
614
|
-
'aria-label':
|
|
615
|
-
($textarea.attr('data-add') || window.BRIGHTSPOT.ui.workflow.add) +
|
|
616
|
-
' ' +
|
|
617
|
-
($textarea.attr('data-state-label') || 'State'),
|
|
618
|
-
text:
|
|
619
|
-
($textarea.attr('data-add') || window.BRIGHTSPOT.ui.workflow.add) +
|
|
620
|
-
' ' +
|
|
621
|
-
($textarea.attr('data-state-label') || 'State'),
|
|
622
|
-
click: function () {
|
|
623
|
-
const $state = addState({
|
|
624
|
-
id: nextStateId,
|
|
625
|
-
left: 0.3,
|
|
626
|
-
top: 0.01,
|
|
627
|
-
})
|
|
628
|
-
|
|
629
|
-
$state.find('.Workflow-stateName').focus()
|
|
630
|
-
++nextStateId
|
|
631
|
-
$(window).trigger('resize')
|
|
632
|
-
|
|
633
|
-
return false
|
|
634
|
-
},
|
|
635
|
-
})),
|
|
636
|
-
)
|
|
637
|
-
|
|
638
|
-
$visual.append(
|
|
639
|
-
($stateInitial = $('<fieldset/>', {
|
|
640
|
-
class: 'Workflow-state',
|
|
641
|
-
'data-id': 'initial',
|
|
642
|
-
text:
|
|
643
|
-
$textarea.attr('data-state-initial') ||
|
|
644
|
-
window.BRIGHTSPOT.ui.workflow.state,
|
|
645
|
-
}).append(
|
|
646
|
-
$('<legend/>', {
|
|
647
|
-
class: 'screen-reader-only',
|
|
648
|
-
text: window.BRIGHTSPOT.ui.workflow.stateLegend,
|
|
649
|
-
}),
|
|
650
|
-
)),
|
|
651
|
-
)
|
|
652
|
-
|
|
653
|
-
appendTransitionAdd($stateInitial)
|
|
654
|
-
|
|
655
|
-
$visual.append(
|
|
656
|
-
($stateFinal = $('<fieldset/>', {
|
|
657
|
-
class: 'Workflow-state',
|
|
658
|
-
'data-id': 'final',
|
|
659
|
-
text: $textarea.attr('data-state-final') || 'Final State',
|
|
660
|
-
}).append(
|
|
661
|
-
$('<legend/>', {
|
|
662
|
-
class: 'screen-reader-only',
|
|
663
|
-
text: window.BRIGHTSPOT.ui.workflow.stateLegend,
|
|
664
|
-
}),
|
|
665
|
-
)),
|
|
666
|
-
)
|
|
667
|
-
|
|
668
|
-
if (definition.states) {
|
|
669
|
-
$.each(definition.states, function () {
|
|
670
|
-
var id = parseInt(this.id, 10)
|
|
671
|
-
|
|
672
|
-
addState(this)
|
|
673
|
-
|
|
674
|
-
if (id >= nextStateId) {
|
|
675
|
-
nextStateId = id + 1
|
|
676
|
-
}
|
|
677
|
-
})
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
$textarea.after($visual)
|
|
681
|
-
$visual.trigger('create')
|
|
682
|
-
$textarea.hide()
|
|
683
|
-
|
|
684
|
-
$arrows.attr({
|
|
685
|
-
width: $visual.width(),
|
|
686
|
-
height: $visual.height(),
|
|
687
|
-
})
|
|
688
|
-
|
|
689
|
-
if (definition.transitions) {
|
|
690
|
-
$.each(definition.transitions, function () {
|
|
691
|
-
addTransitionTarget(this)
|
|
692
|
-
})
|
|
693
|
-
|
|
694
|
-
$arrows.trigger('redraw')
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
updateTransitionSelects()
|
|
698
|
-
|
|
699
|
-
$(window).resize(function () {
|
|
700
|
-
window.requestAnimationFrame(function () {
|
|
701
|
-
const h = $visual.height()
|
|
702
|
-
const w = $visual.width()
|
|
703
|
-
|
|
704
|
-
$arrows.attr({
|
|
705
|
-
height: h * dpr,
|
|
706
|
-
width: w * dpr,
|
|
707
|
-
})
|
|
708
|
-
|
|
709
|
-
$arrows.css({
|
|
710
|
-
height: h,
|
|
711
|
-
width: w,
|
|
712
|
-
})
|
|
713
|
-
|
|
714
|
-
$arrows.trigger('redraw')
|
|
715
|
-
})
|
|
716
|
-
})
|
|
717
|
-
},
|
|
718
|
-
})
|