@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,360 +0,0 @@
|
|
|
1
|
-
import $ from 'jquery'
|
|
2
|
-
import create from './dom/create'
|
|
3
|
-
import repaint from './util/repaint'
|
|
4
|
-
import findAll from './dom/findAll'
|
|
5
|
-
import find from './dom/find'
|
|
6
|
-
import { toggleMenu, setupMenuForAria } from '../../../dom/popupMenu'
|
|
7
|
-
|
|
8
|
-
export default class TabContainer {
|
|
9
|
-
constructor(container) {
|
|
10
|
-
this._container = container
|
|
11
|
-
this._update = repaint(this._update.bind(this))
|
|
12
|
-
this._update()
|
|
13
|
-
|
|
14
|
-
window.addEventListener('brightspot-content-state-change', () => {
|
|
15
|
-
this._toggle()
|
|
16
|
-
})
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
_forEachChild(callback) {
|
|
20
|
-
for (const child of this._container.children) {
|
|
21
|
-
const tab = child.dataset.tab
|
|
22
|
-
|
|
23
|
-
if (tab !== undefined) {
|
|
24
|
-
callback(tab, child)
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
_toArray(value) {
|
|
30
|
-
if (value) {
|
|
31
|
-
try {
|
|
32
|
-
const array = JSON.parse(value)
|
|
33
|
-
return Array.isArray(array) ? array : []
|
|
34
|
-
} catch {}
|
|
35
|
-
}
|
|
36
|
-
return []
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
_update() {
|
|
40
|
-
if (this._observer) {
|
|
41
|
-
this._observer.disconnect()
|
|
42
|
-
this._observer = null
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const bar = create('div', {
|
|
46
|
-
className: 'TabBar',
|
|
47
|
-
role: 'tablist',
|
|
48
|
-
})
|
|
49
|
-
const menuToggle = create('button', {
|
|
50
|
-
className: 'TabBar-menuToggle',
|
|
51
|
-
title: window.BRIGHTSPOT?.ui.tooltips.tabs,
|
|
52
|
-
type: 'button',
|
|
53
|
-
'aria-haspopup': 'menu',
|
|
54
|
-
'aria-expanded': 'false',
|
|
55
|
-
'aria-label': window.BRIGHTSPOT?.ui.tooltips.tabs,
|
|
56
|
-
})
|
|
57
|
-
const menuList = create('div', {
|
|
58
|
-
className: 'TabBar-menuList',
|
|
59
|
-
role: 'menu',
|
|
60
|
-
'aria-label': window.BRIGHTSPOT?.ui.tooltips.tabs,
|
|
61
|
-
})
|
|
62
|
-
const menu = create(
|
|
63
|
-
'div',
|
|
64
|
-
{ className: 'TabBar-menu' },
|
|
65
|
-
menuToggle,
|
|
66
|
-
menuList,
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
menuToggle.onclick = () => {
|
|
70
|
-
toggleMenu(menuList, menuToggle, bar)
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// Find tabs that should really be displayed as tabs rather than in a menu.
|
|
74
|
-
const menuMode = this._container.dataset.tcMode === 'MENU'
|
|
75
|
-
const main = this._container.dataset.tcMain
|
|
76
|
-
const exceptions = this._toArray(this._container.dataset.tcExceptions)
|
|
77
|
-
|
|
78
|
-
// Sort the tabs.
|
|
79
|
-
const tabSet = new Set()
|
|
80
|
-
this._defaultTab = null
|
|
81
|
-
|
|
82
|
-
for (const child of this._container.children) {
|
|
83
|
-
const tab = child.dataset.tab
|
|
84
|
-
|
|
85
|
-
if (tab !== undefined) {
|
|
86
|
-
if (!tabSet.has(tab)) {
|
|
87
|
-
if (!this._defaultTab) {
|
|
88
|
-
this._defaultTab = tab
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
tabSet.add(tab)
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
const start = this._toArray(this._container.dataset.tcStart)
|
|
97
|
-
const end = this._toArray(this._container.dataset.tcEnd)
|
|
98
|
-
const tabs = []
|
|
99
|
-
|
|
100
|
-
for (const tab of start) {
|
|
101
|
-
if (tabSet.has(tab)) {
|
|
102
|
-
tabs.push(tab)
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
for (const tab of tabSet) {
|
|
107
|
-
if (!start.includes(tab) && !end.includes(tab)) {
|
|
108
|
-
tabs.push(tab)
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
for (const tab of end) {
|
|
113
|
-
if (tabSet.has(tab)) {
|
|
114
|
-
tabs.push(tab)
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// Create the tabs.
|
|
119
|
-
for (const tab of tabs) {
|
|
120
|
-
const list =
|
|
121
|
-
exceptions.indexOf(tab) > -1
|
|
122
|
-
? menuMode
|
|
123
|
-
? bar
|
|
124
|
-
: menuList
|
|
125
|
-
: menuMode
|
|
126
|
-
? menuList
|
|
127
|
-
: bar
|
|
128
|
-
|
|
129
|
-
list.insertBefore(
|
|
130
|
-
create(
|
|
131
|
-
'button',
|
|
132
|
-
{
|
|
133
|
-
className: 'TabBar-item',
|
|
134
|
-
dataset: { tab },
|
|
135
|
-
role: 'tab',
|
|
136
|
-
onclick: (event) => {
|
|
137
|
-
event.preventDefault()
|
|
138
|
-
this.select(tab, event)
|
|
139
|
-
},
|
|
140
|
-
onkeydown: (e) => {
|
|
141
|
-
var tab = e.currentTarget
|
|
142
|
-
var tabs = tab.closest('.TabBar')
|
|
143
|
-
|
|
144
|
-
switch (e.key) {
|
|
145
|
-
case 'ArrowRight':
|
|
146
|
-
if (tab.nextSibling) {
|
|
147
|
-
tab.nextSibling.focus()
|
|
148
|
-
} else {
|
|
149
|
-
tabs.firstChild.focus()
|
|
150
|
-
}
|
|
151
|
-
return
|
|
152
|
-
|
|
153
|
-
case 'ArrowLeft':
|
|
154
|
-
if (tab.previousSibling) {
|
|
155
|
-
tab.previousSibling.focus()
|
|
156
|
-
} else {
|
|
157
|
-
tabs.lastChild.focus()
|
|
158
|
-
}
|
|
159
|
-
return
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
tab,
|
|
164
|
-
),
|
|
165
|
-
tab === main ? list.firstChild : null,
|
|
166
|
-
)
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
if (tabs.includes(main)) {
|
|
170
|
-
this._defaultTab = main
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
// If there's only 1 tab, only display the menu.
|
|
174
|
-
if (bar.children.length === 1) {
|
|
175
|
-
menuList.insertBefore(bar.children[0], menuList.firstChild)
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
for (const c of menuList.children) {
|
|
179
|
-
c.className = 'TabBar-menuItem'
|
|
180
|
-
c.setAttribute('role', 'menuitem')
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
setupMenuForAria(menuList, menuToggle)
|
|
184
|
-
|
|
185
|
-
// Reset in case this is being recreated.
|
|
186
|
-
if (this._bar) {
|
|
187
|
-
this._bar.remove()
|
|
188
|
-
this._bar = null
|
|
189
|
-
this._menu = null
|
|
190
|
-
this._menuToggle = null
|
|
191
|
-
this._menuList = null
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
// No tabs found, so stop.
|
|
195
|
-
if (
|
|
196
|
-
tabs.length === 0 ||
|
|
197
|
-
(tabs.length < 2 && !this._container.getAttribute('data-show-tabs'))
|
|
198
|
-
) {
|
|
199
|
-
this._container.dataset.tabless = 'true'
|
|
200
|
-
// Ensure there aren't any children that are hidden
|
|
201
|
-
const hiddenChildren = this._container.querySelectorAll(
|
|
202
|
-
':scope > .TC-unselected',
|
|
203
|
-
)
|
|
204
|
-
Array.from(hiddenChildren).forEach((child) => {
|
|
205
|
-
child.classList.remove('TC-unselected')
|
|
206
|
-
})
|
|
207
|
-
return
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
this._bar = bar
|
|
211
|
-
this._container.insertBefore(bar, this._container.firstChild)
|
|
212
|
-
|
|
213
|
-
if (menuList.children.length > 0) {
|
|
214
|
-
if (bar.children.length === 0) {
|
|
215
|
-
bar.classList.add('is-menuOnly')
|
|
216
|
-
bar.removeAttribute('role')
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
this._menu = menu
|
|
220
|
-
this._menuToggle = menuToggle
|
|
221
|
-
this._menuList = menuList
|
|
222
|
-
this._bar.appendChild(menu)
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
const visibleTabs = this._toggle()
|
|
226
|
-
|
|
227
|
-
if (!visibleTabs.includes(this._defaultTab)) {
|
|
228
|
-
this._defaultTab = visibleTabs[0]
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
//Hide the tab selector if all other tabs are hidden
|
|
232
|
-
bar.hidden =
|
|
233
|
-
Array.from(menuList.children).filter((c) => !c.hidden).length === 1
|
|
234
|
-
|
|
235
|
-
// Any field errors within the panels?
|
|
236
|
-
let menuError = false
|
|
237
|
-
|
|
238
|
-
for (const error of findAll(
|
|
239
|
-
this._container,
|
|
240
|
-
'.CIG-row > .Message.is-error',
|
|
241
|
-
)) {
|
|
242
|
-
let parent = error
|
|
243
|
-
let row
|
|
244
|
-
|
|
245
|
-
do {
|
|
246
|
-
row = parent
|
|
247
|
-
parent = row.parentNode
|
|
248
|
-
} while (parent !== this._container)
|
|
249
|
-
|
|
250
|
-
const item = find(this._bar, `[data-tab="${row.dataset.tab}"]`)
|
|
251
|
-
|
|
252
|
-
if (item && !item.classList.contains('is-error')) {
|
|
253
|
-
item.classList.add('is-error')
|
|
254
|
-
|
|
255
|
-
if (item.classList.contains('TabBar-menuItem')) {
|
|
256
|
-
menuError = true
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
if (menuError) {
|
|
262
|
-
bar.classList.add('is-menuError')
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
this.select()
|
|
266
|
-
|
|
267
|
-
/* this._observer = new MutationObserver(this._update).observe(
|
|
268
|
-
this._container,
|
|
269
|
-
{ childList: true }
|
|
270
|
-
) */
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
_toggle() {
|
|
274
|
-
const visibleTabs = []
|
|
275
|
-
|
|
276
|
-
this._forEachChild((tab, child) => {
|
|
277
|
-
if (!(child.hidden || child instanceof HTMLHeadingElement)) {
|
|
278
|
-
visibleTabs.push(tab)
|
|
279
|
-
}
|
|
280
|
-
})
|
|
281
|
-
|
|
282
|
-
for (const container of [this._bar, this._menuList]) {
|
|
283
|
-
if (container) {
|
|
284
|
-
for (const c of container.children) {
|
|
285
|
-
if (c !== this._menu) {
|
|
286
|
-
c.hidden = !visibleTabs.includes(c.dataset.tab)
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
return visibleTabs
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
select(selectedTab, event) {
|
|
296
|
-
const focus =
|
|
297
|
-
selectedTab &&
|
|
298
|
-
this._container.closest('.ContentEdit.is-new, .StandardForm.is-new')
|
|
299
|
-
|
|
300
|
-
if (!selectedTab) {
|
|
301
|
-
selectedTab = this._defaultTab
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
// Try to select the tab in the bar first.
|
|
305
|
-
if (this._bar && !this._bar.classList.contains('is-menuOnly')) {
|
|
306
|
-
for (const c of this._bar.children) {
|
|
307
|
-
const isSelected = c.dataset.tab === selectedTab
|
|
308
|
-
|
|
309
|
-
c.classList.toggle('is-selected', isSelected)
|
|
310
|
-
c.setAttribute('aria-selected', isSelected)
|
|
311
|
-
|
|
312
|
-
if (isSelected) {
|
|
313
|
-
c.removeAttribute('tabindex')
|
|
314
|
-
} else {
|
|
315
|
-
c.setAttribute('tabindex', '-1')
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
// Then try the ones in the menu.
|
|
321
|
-
if (this._menuList) {
|
|
322
|
-
let menuSelected = false
|
|
323
|
-
|
|
324
|
-
for (const c of this._menuList.children) {
|
|
325
|
-
if (c.classList.toggle('is-selected', c.dataset.tab === selectedTab)) {
|
|
326
|
-
menuSelected = selectedTab !== this._defaultTab
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
this._bar.classList.toggle('is-menuSelected', menuSelected)
|
|
331
|
-
this._menuToggle.innerText = menuSelected ? selectedTab : ''
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
// Toggle the panel visibilities.
|
|
335
|
-
this._forEachChild((tab, child) => {
|
|
336
|
-
child.classList.toggle('TC-unselected', tab !== selectedTab)
|
|
337
|
-
})
|
|
338
|
-
|
|
339
|
-
window.dispatchEvent(new Event('resize'))
|
|
340
|
-
|
|
341
|
-
// Legacy events.
|
|
342
|
-
$(this._container).find('> [data-tab]').trigger('tabbedShow')
|
|
343
|
-
|
|
344
|
-
$(this._bar).trigger('tabbed-select')
|
|
345
|
-
|
|
346
|
-
// Focus on the first input when changing tab.
|
|
347
|
-
if (focus) {
|
|
348
|
-
const id = this._container.querySelector(
|
|
349
|
-
`:scope > .CIG-row:not(.inputContainer-readOnly)[data-tab="${selectedTab}"] > .CIG-label > label`,
|
|
350
|
-
)?.htmlFor
|
|
351
|
-
|
|
352
|
-
if (id) {
|
|
353
|
-
document.getElementById(id)?.focus()
|
|
354
|
-
}
|
|
355
|
-
} else if (event) {
|
|
356
|
-
// Restore scroll position where user clicked the tab.
|
|
357
|
-
event.target.scrollIntoView({ block: 'nearest' })
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// Highlight the item that's expanded.
|
|
2
|
-
window.addEventListener(
|
|
3
|
-
'click',
|
|
4
|
-
(e) => {
|
|
5
|
-
const link = e.target
|
|
6
|
-
|
|
7
|
-
if (link.classList.contains('Taxonomy-expand')) {
|
|
8
|
-
for (const s of link.closest('ul').querySelectorAll('.is-selected')) {
|
|
9
|
-
s.classList.remove('is-selected')
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
link.closest('li').classList.add('is-selected')
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
{ capture: true },
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
// Automatically scroll to the right when the children are loaded.
|
|
19
|
-
window.addEventListener('brightspot-frame-load', (e) => {
|
|
20
|
-
const frame = e.target
|
|
21
|
-
|
|
22
|
-
if (frame.classList.contains('Taxonomy-children')) {
|
|
23
|
-
window.requestAnimationFrame(() => {
|
|
24
|
-
frame.closest('.Taxonomy').scrollTo({ left: 30000 })
|
|
25
|
-
})
|
|
26
|
-
}
|
|
27
|
-
})
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
import create from './dom/create'
|
|
2
|
-
import onFind from './dom/onFind'
|
|
3
|
-
|
|
4
|
-
const STATE_OPEN = 'is-open'
|
|
5
|
-
|
|
6
|
-
export class ThemeBundleEditor {
|
|
7
|
-
constructor() {
|
|
8
|
-
this._editorStage = null
|
|
9
|
-
this._editorToggle = null
|
|
10
|
-
this._themeBundle = null
|
|
11
|
-
this._presetSelect = null
|
|
12
|
-
this._selectedPreset = null
|
|
13
|
-
this._sg = null
|
|
14
|
-
this._zIndex = 110
|
|
15
|
-
|
|
16
|
-
onFind(document, '.ThemeBundle', (theme) => {
|
|
17
|
-
this._themeBundle = theme
|
|
18
|
-
this._initLabels()
|
|
19
|
-
this._createUI(this._themeBundle)
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
onFind(document, '.Tab[data-tab="Styleguide"]', (tab) => {
|
|
23
|
-
document.body.classList.add('has-theme-styleguide')
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
window.addEventListener('message', async ({ data }) => {
|
|
27
|
-
if (typeof data !== 'object') return
|
|
28
|
-
if (data.type === 'BSP.Styleguide.CloseStyleguideReady') {
|
|
29
|
-
this._editorToggle.setAttribute('aria-expanded', 'false')
|
|
30
|
-
this._editorStage.classList.remove(STATE_OPEN)
|
|
31
|
-
|
|
32
|
-
const presetRow = document.querySelector(
|
|
33
|
-
'.CIG-row[data-tab="Overrides"][data-field-name$="._preset"]',
|
|
34
|
-
)
|
|
35
|
-
const presetFields = presetRow.querySelector('.CIG-large')
|
|
36
|
-
|
|
37
|
-
if (
|
|
38
|
-
this._selectedPreset !== this._presetSelect.value ||
|
|
39
|
-
presetRow.hasAttribute('data-received-update')
|
|
40
|
-
) {
|
|
41
|
-
const overridesTab = this._presetSelect
|
|
42
|
-
.closest('.CIG')
|
|
43
|
-
.querySelector(':scope > .TabBar .ThemeBundle-tabOverrides')
|
|
44
|
-
overridesTab && overridesTab.click()
|
|
45
|
-
presetFields.style = this._presetSelect.value ? 'display: none;' : ''
|
|
46
|
-
presetRow.classList.add('state-changed')
|
|
47
|
-
presetRow.removeAttribute('data-received-update')
|
|
48
|
-
|
|
49
|
-
if (!this._presetSelect.value) {
|
|
50
|
-
presetFields
|
|
51
|
-
.querySelectorAll('input.color, input[type="checkbox"], textarea')
|
|
52
|
-
.forEach((input) => input.removeAttribute('disabled'))
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
} else if (data.type === 'BSP.Styleguide.LoadingV2') {
|
|
56
|
-
this._sg.classList.add('is-v2')
|
|
57
|
-
}
|
|
58
|
-
})
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
_initLabels() {
|
|
62
|
-
this._labels = {
|
|
63
|
-
tab: window.THEME_BUNDLE_EDITOR_LABELS
|
|
64
|
-
? window.THEME_BUNDLE_EDITOR_LABELS.tabName
|
|
65
|
-
: 'Main',
|
|
66
|
-
open: window.THEME_BUNDLE_EDITOR_LABELS
|
|
67
|
-
? window.THEME_BUNDLE_EDITOR_LABELS.openAction
|
|
68
|
-
: 'Open Styleguide',
|
|
69
|
-
openNewTab: window.THEME_BUNDLE_EDITOR_LABELS
|
|
70
|
-
? window.THEME_BUNDLE_EDITOR_LABELS.openNewTabAction
|
|
71
|
-
: 'Open in New Window/Tab',
|
|
72
|
-
close: window.THEME_BUNDLE_EDITOR_LABELS
|
|
73
|
-
? window.THEME_BUNDLE_EDITOR_LABELS.closeAction
|
|
74
|
-
: 'Back',
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
_createUI(theme) {
|
|
79
|
-
this._editorStage = create('DIV', { class: 'ThemeBundleEditor-stage' })
|
|
80
|
-
this._editorStage.addEventListener('transitionend', (event) => {
|
|
81
|
-
if (event.target === this._editorStage) {
|
|
82
|
-
event.stopPropagation()
|
|
83
|
-
this._editorStage.classList.contains(STATE_OPEN)
|
|
84
|
-
? this._showStyleguide()
|
|
85
|
-
: this._hideStyleguide()
|
|
86
|
-
}
|
|
87
|
-
})
|
|
88
|
-
|
|
89
|
-
this._editorToggle = create(
|
|
90
|
-
'BUTTON',
|
|
91
|
-
{
|
|
92
|
-
className: 'ThemeBundleEditor-toggle',
|
|
93
|
-
name: 'action-edit',
|
|
94
|
-
value: this._labels.open,
|
|
95
|
-
'aria-expanded': 'false',
|
|
96
|
-
onclick: (event) => {
|
|
97
|
-
event.preventDefault()
|
|
98
|
-
this._openEditor()
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
this._labels.open,
|
|
102
|
-
)
|
|
103
|
-
|
|
104
|
-
// Popup UI.
|
|
105
|
-
const main = create('DIV', {
|
|
106
|
-
className: 'ThemeBundleEditor-stage-main',
|
|
107
|
-
})
|
|
108
|
-
|
|
109
|
-
const top = create(
|
|
110
|
-
'DIV',
|
|
111
|
-
{
|
|
112
|
-
className: 'ThemeBundleEditor-stage-top',
|
|
113
|
-
},
|
|
114
|
-
create(
|
|
115
|
-
'a',
|
|
116
|
-
{
|
|
117
|
-
className: 'Popup-heading ThemeBundleEditor-close',
|
|
118
|
-
onclick: (event) => {
|
|
119
|
-
this._closeEditor()
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
this._labels.close,
|
|
123
|
-
),
|
|
124
|
-
)
|
|
125
|
-
|
|
126
|
-
this._editorStage.appendChild(top)
|
|
127
|
-
this._editorStage.appendChild(main)
|
|
128
|
-
theme.appendChild(this._editorStage)
|
|
129
|
-
|
|
130
|
-
const presetSelect = theme.querySelector(
|
|
131
|
-
'.CIG-row[data-field-name$="._preset"]',
|
|
132
|
-
)
|
|
133
|
-
if (presetSelect) {
|
|
134
|
-
const firstInput = theme.querySelector('.CIG-row')
|
|
135
|
-
if (firstInput) {
|
|
136
|
-
theme.insertBefore(
|
|
137
|
-
create(
|
|
138
|
-
'DIV',
|
|
139
|
-
{
|
|
140
|
-
className: 'ThemeBundleEditor-top',
|
|
141
|
-
'data-tab': this._labels.tab,
|
|
142
|
-
},
|
|
143
|
-
this._editorToggle,
|
|
144
|
-
),
|
|
145
|
-
firstInput,
|
|
146
|
-
)
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
_closeEditor() {
|
|
152
|
-
if (this._sg.matches('.is-v2')) {
|
|
153
|
-
this._sg?.contentWindow.postMessage(
|
|
154
|
-
{
|
|
155
|
-
type: 'BSP.Styleguide.CloseStyleguide',
|
|
156
|
-
},
|
|
157
|
-
'*',
|
|
158
|
-
)
|
|
159
|
-
} else {
|
|
160
|
-
this._editorToggle.setAttribute('aria-expanded', 'false')
|
|
161
|
-
this._editorStage.classList.remove(STATE_OPEN)
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
_openEditor() {
|
|
166
|
-
this._editorStage.style.zIndex = this._zIndex
|
|
167
|
-
this._editorToggle.setAttribute('aria-expanded', 'true')
|
|
168
|
-
this._editorStage.classList.add(STATE_OPEN)
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
_showStyleguide() {
|
|
172
|
-
if (!this._sg) {
|
|
173
|
-
onFind('.ThemeBundle-edit', async (editLink) => {
|
|
174
|
-
const response = await fetch(editLink.href)
|
|
175
|
-
const html = await response.text()
|
|
176
|
-
|
|
177
|
-
// Stage the returned html in a DOM.
|
|
178
|
-
|
|
179
|
-
const template = document.createElement('template')
|
|
180
|
-
template.innerHTML = html
|
|
181
|
-
this._sg = template.content.querySelector(
|
|
182
|
-
'.Tab[data-tab="Styleguide"] iframe',
|
|
183
|
-
)
|
|
184
|
-
|
|
185
|
-
this._editorStage
|
|
186
|
-
.querySelector('.ThemeBundleEditor-stage-main')
|
|
187
|
-
.appendChild(this._sg)
|
|
188
|
-
|
|
189
|
-
const openNewLink = create(
|
|
190
|
-
'a',
|
|
191
|
-
{
|
|
192
|
-
className: 'Popup-heading ThemeBundleEditor-openNewTab',
|
|
193
|
-
target: '_blank',
|
|
194
|
-
href: this._sg.getAttribute('src'),
|
|
195
|
-
},
|
|
196
|
-
this._labels.openNewTab,
|
|
197
|
-
)
|
|
198
|
-
const editorTop = document.querySelector('.ThemeBundleEditor-stage-top')
|
|
199
|
-
editorTop.appendChild(openNewLink)
|
|
200
|
-
})
|
|
201
|
-
|
|
202
|
-
this._presetSelect = document.querySelector(
|
|
203
|
-
'.CIG-row[data-tab="Overrides"][data-field-name$="._preset"] select[name$="._preset"]',
|
|
204
|
-
)
|
|
205
|
-
this._selectedPreset = this._presetSelect.value
|
|
206
|
-
} else {
|
|
207
|
-
this._sg.style.visibility = 'visible'
|
|
208
|
-
this._sg?.contentWindow.postMessage(
|
|
209
|
-
{
|
|
210
|
-
type: 'BSP.Styleguide.ReopenStyleguide',
|
|
211
|
-
},
|
|
212
|
-
'*',
|
|
213
|
-
)
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
_hideStyleguide() {
|
|
218
|
-
if (this._sg) {
|
|
219
|
-
this._sg.style.visibility = 'hidden'
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
export default new ThemeBundleEditor()
|