@brightspot/ui 3.0.1-cms-ui-migration.1 → 3.0.1-cms-ui-migration.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (303) hide show
  1. package/README.md +54 -35
  2. package/dist/custom-elements.json +2536 -2536
  3. package/dist/storybook/assets/{ActionBar.stories-BhdqLyzJ.js → ActionBar.stories-CSxtZl7v.js} +1 -1
  4. package/dist/storybook/assets/{ActionItem.stories-17zjMCkO.js → ActionItem.stories-BWcMRMP3.js} +1 -1
  5. package/dist/storybook/assets/{Avatar.stories-C5m3-zOH.js → Avatar.stories-CYTUGXzH.js} +1 -1
  6. package/dist/storybook/assets/{AvatarGroup.stories-DE88PJ6w.js → AvatarGroup.stories-CSYBYo_5.js} +1 -1
  7. package/dist/storybook/assets/{Badge.stories-D905HmvO.js → Badge.stories-LuF4BuVr.js} +1 -1
  8. package/dist/storybook/assets/{Button-ANyLESGb.js → Button-CrXCMxHb.js} +1 -1
  9. package/dist/storybook/assets/{Button.stories-DbH6q5L3.js → Button.stories-JVwxdrdM.js} +1 -1
  10. package/dist/storybook/assets/{ButtonGroup.stories-loqgAB7p.js → ButtonGroup.stories-qtq64a1H.js} +1 -1
  11. package/dist/storybook/assets/{Celebrate.stories-CRO3rSgp.js → Celebrate.stories-DjTtaSd6.js} +1 -1
  12. package/dist/storybook/assets/{Checkbox.stories-SZtgfbFe.js → Checkbox.stories-v1Pr5mL6.js} +1 -1
  13. package/dist/storybook/assets/{CircularProgress.stories-VayPxO4M.js → CircularProgress.stories-DkV7PJ4D.js} +1 -1
  14. package/dist/storybook/assets/{ClipboardMixin.stories-0EB2O2zT.js → ClipboardMixin.stories-Dh5c7uSM.js} +1 -1
  15. package/dist/storybook/assets/{Color-6BZIO3FS-CFpcD80i.js → Color-6BZIO3FS-B1gcREt6.js} +1 -1
  16. package/dist/storybook/assets/{Colors.stories-BJGM6xnp.js → Colors.stories-DnubtRqn.js} +1 -1
  17. package/dist/storybook/assets/{CombinedEffects.stories-DUwocYcn.js → CombinedEffects.stories-By6akSve.js} +1 -1
  18. package/dist/storybook/assets/{ComponentStatesMixin-MUqdPCf7.js → ComponentStatesMixin-CPLGv3h-.js} +1 -1
  19. package/dist/storybook/assets/{ComponentStatesMixin.stories-DjrxNwE7.js → ComponentStatesMixin.stories-CiQ_lyhm.js} +1 -1
  20. package/dist/storybook/assets/{CopyToClipboard.stories-DptOcPq6.js → CopyToClipboard.stories-cJ7rl3mj.js} +1 -1
  21. package/dist/storybook/assets/{Debounce.stories-BbcIWmhD.js → Debounce.stories-Bw-goobU.js} +1 -1
  22. package/dist/storybook/assets/{DocsRenderer-LL677BLK-Yy8fjeNG.js → DocsRenderer-LL677BLK-CNW57dGQ.js} +3 -3
  23. package/dist/storybook/assets/{Dropdown.stories-Du3LrBR6.js → Dropdown.stories-CwC3HXXd.js} +1 -1
  24. package/dist/storybook/assets/{EmptyState.stories-Dy9P8aOY.js → EmptyState.stories-BUEJwuhP.js} +1 -1
  25. package/dist/storybook/assets/{Events.stories-DvdVQxDf.js → Events.stories-D1mf9buv.js} +1 -1
  26. package/dist/storybook/assets/{Heading.stories-BQ1jFOKn.js → Heading.stories-DO906G4P.js} +1 -1
  27. package/dist/storybook/assets/{HueRipple.stories-CrZFjnRl.js → HueRipple.stories-BOySRSZB.js} +1 -1
  28. package/dist/storybook/assets/{Icon.stories-C2Tj8Lx1.js → Icon.stories-BsqgTbdG.js} +1 -1
  29. package/dist/storybook/assets/{IconButton.stories-DFqouOJb.js → IconButton.stories-aza1AAKk.js} +1 -1
  30. package/dist/storybook/assets/{LinearProgress.stories-DtNw3QX3.js → LinearProgress.stories-CDYmiiex.js} +1 -1
  31. package/dist/storybook/assets/{Pagination.stories-CFiZ9APs.js → Pagination.stories-LXB-x7YB.js} +1 -1
  32. package/dist/storybook/assets/{Popover.stories-DkkTuYag.js → Popover.stories-DY1HesPJ.js} +1 -1
  33. package/dist/storybook/assets/{ReadyMixin-BA01Vm_B.js → ReadyMixin-DmOC67IJ.js} +1 -1
  34. package/dist/storybook/assets/{RovingTabindexMixin.stories-BesAqt48.js → RovingTabindexMixin.stories-BWy0Rq8d.js} +1 -1
  35. package/dist/storybook/assets/{Rtc.stories-iTw43rjp.js → Rtc.stories-DrmdqqbI.js} +1 -1
  36. package/dist/storybook/assets/{ScrollShadow.stories-QYqQCcAo.js → ScrollShadow.stories-DiKFPazh.js} +1 -1
  37. package/dist/storybook/assets/{Switch.stories-BKArq9Mk.js → Switch.stories-BgFnw8_z.js} +1 -1
  38. package/dist/storybook/assets/{Tab.stories-8UdDPvE5.js → Tab.stories-c2wLMooF.js} +1 -1
  39. package/dist/storybook/assets/{Tabs.stories-BPGMZ552.js → Tabs.stories-CjH8seNP.js} +1 -1
  40. package/dist/storybook/assets/{Throttle.stories-CYl5d0r6.js → Throttle.stories-CXysc_QE.js} +1 -1
  41. package/dist/storybook/assets/{Tooltip.stories-cZ0zSlwX.js → Tooltip.stories-6qzyByPm.js} +1 -1
  42. package/dist/storybook/assets/{Upload.stories-CPC7N0Ed.js → Upload.stories-BLxykydQ.js} +1 -1
  43. package/dist/storybook/assets/{UploadItem.stories-D0LClT0a.js → UploadItem.stories-CcfcqdJW.js} +1 -1
  44. package/dist/storybook/assets/{Welcome.stories-C8JUaRas.js → Welcome.stories-CzYS_3fH.js} +1 -1
  45. package/dist/storybook/assets/{Widget.stories-C1FxF24-.js → Widget.stories-Du7T4LAI.js} +1 -1
  46. package/dist/storybook/assets/{WithTooltip-65CFNBJE-BMBo-fie.js → WithTooltip-65CFNBJE-D4LfXdYt.js} +1 -1
  47. package/dist/storybook/assets/{blocks-BTsuXRXZ.js → blocks-DR3fGePu.js} +5 -5
  48. package/dist/storybook/assets/{formatter-EIJCOSYU-BJ1Cwrpx.js → formatter-EIJCOSYU-Cf01216O.js} +1 -1
  49. package/dist/storybook/assets/if-defined-DaMmbcIU.js +1 -0
  50. package/dist/storybook/assets/{iframe-B3YWTqkR.js → iframe-CQArUhO8.js} +4 -4
  51. package/dist/storybook/assets/{iframe-BgFj0b5u.css → iframe-D0roG0J-.css} +1 -1
  52. package/dist/storybook/assets/{index-BBUTVEdP.js → index-B1uI_67G.js} +1 -1
  53. package/dist/storybook/assets/{onFind-NC0lGo-r.js → onFind-BpFkN2Rh.js} +1 -1
  54. package/dist/storybook/assets/{onFind.stories-CqbwQgQF.js → onFind.stories-Cxdeg69X.js} +1 -1
  55. package/dist/storybook/assets/{onRemove.stories-Y8Ycs77o.js → onRemove.stories-BHEWpNrE.js} +1 -1
  56. package/dist/storybook/assets/{onVisible.stories-CcLUE35q.js → onVisible.stories-DFJ3S_ZS.js} +1 -1
  57. package/dist/storybook/assets/{style-map-MSB_ngx3.js → style-map-DJ83UC3V.js} +1 -1
  58. package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-BjkjEDMG.js → syntaxhighlighter-ED5Y7EFY-zYN83mxK.js} +1 -1
  59. package/dist/storybook/iframe.html +2 -2
  60. package/dist/storybook/project.json +1 -1
  61. package/dist/tailwind.config.d.ts +4 -1
  62. package/dist/tailwind.config.d.ts.map +1 -1
  63. package/dist/tailwind.config.js +0 -2
  64. package/dist/tailwind.config.js.map +1 -1
  65. package/dist/tailwind.config.ts +0 -2
  66. package/package.json +16 -2
  67. package/dist/storybook/assets/if-defined-BPCd2NXs.js +0 -1
  68. package/src/legacy/tool-ui/src/main/resources/settings.properties +0 -1
  69. package/src/legacy/tool-ui/src/main/webapp/WEB-INF/web.xml +0 -81
  70. package/src/legacy/tool-ui/src/main/webapp/script/bsp-uploader.js +0 -170
  71. package/src/legacy/tool-ui/src/main/webapp/script/bsp-utils.js +0 -393
  72. package/src/legacy/tool-ui/src/main/webapp/script/content/layout-element.js +0 -141
  73. package/src/legacy/tool-ui/src/main/webapp/script/input/query.js +0 -78
  74. package/src/legacy/tool-ui/src/main/webapp/script/input/workflow.js +0 -718
  75. package/src/legacy/tool-ui/src/main/webapp/script/jquery.extra.js +0 -633
  76. package/src/legacy/tool-ui/src/main/webapp/script/v3/Dropbox.js +0 -18
  77. package/src/legacy/tool-ui/src/main/webapp/script/v3/EditFieldUpdate.js +0 -406
  78. package/src/legacy/tool-ui/src/main/webapp/script/v3/EditFieldUpdateCache.js +0 -1
  79. package/src/legacy/tool-ui/src/main/webapp/script/v3/Notification.js +0 -151
  80. package/src/legacy/tool-ui/src/main/webapp/script/v3/content/edit.js +0 -194
  81. package/src/legacy/tool-ui/src/main/webapp/script/v3/content/state.js +0 -785
  82. package/src/legacy/tool-ui/src/main/webapp/script/v3/csrf.js +0 -35
  83. package/src/legacy/tool-ui/src/main/webapp/script/v3/dashboard.js +0 -65
  84. package/src/legacy/tool-ui/src/main/webapp/script/v3/input/dataTransfer.js +0 -129
  85. package/src/legacy/tool-ui/src/main/webapp/script/v3/input/file.js +0 -433
  86. package/src/legacy/tool-ui/src/main/webapp/script/v3/input/object.js +0 -743
  87. package/src/legacy/tool-ui/src/main/webapp/script/v3/input/read-only.js +0 -17
  88. package/src/legacy/tool-ui/src/main/webapp/script/v3/jquery.frame.js +0 -478
  89. package/src/legacy/tool-ui/src/main/webapp/script/v3/jquery.repeatable.js +0 -2406
  90. package/src/legacy/tool-ui/src/main/webapp/script/v3/plugin/popup.d.ts +0 -2
  91. package/src/legacy/tool-ui/src/main/webapp/script/v3/plugin/popup.js +0 -446
  92. package/src/legacy/tool-ui/src/main/webapp/script/v3/search-filters.js +0 -62
  93. package/src/legacy/tool-ui/src/main/webapp/script/v3/search.js +0 -53
  94. package/src/legacy/tool-ui/src/main/webapp/script/v3.js +0 -1049
  95. package/src/legacy/tool-ui/src/main/webapp/v4/Admin.js +0 -16
  96. package/src/legacy/tool-ui/src/main/webapp/v4/AutoExpand.js +0 -84
  97. package/src/legacy/tool-ui/src/main/webapp/v4/AutoSubmit.js +0 -68
  98. package/src/legacy/tool-ui/src/main/webapp/v4/Bridge.js +0 -536
  99. package/src/legacy/tool-ui/src/main/webapp/v4/CheckboxInput.js +0 -22
  100. package/src/legacy/tool-ui/src/main/webapp/v4/ColorInput.js +0 -5
  101. package/src/legacy/tool-ui/src/main/webapp/v4/ColorInputSpectrum.js +0 -107
  102. package/src/legacy/tool-ui/src/main/webapp/v4/ComboInput.js +0 -1491
  103. package/src/legacy/tool-ui/src/main/webapp/v4/CommunityWidget.js +0 -29
  104. package/src/legacy/tool-ui/src/main/webapp/v4/ContentEdit.js +0 -2427
  105. package/src/legacy/tool-ui/src/main/webapp/v4/ContentLock.js +0 -470
  106. package/src/legacy/tool-ui/src/main/webapp/v4/ContentReporting.js +0 -32
  107. package/src/legacy/tool-ui/src/main/webapp/v4/DataTable.js +0 -31
  108. package/src/legacy/tool-ui/src/main/webapp/v4/DateStringField.js +0 -485
  109. package/src/legacy/tool-ui/src/main/webapp/v4/Entry.js +0 -264
  110. package/src/legacy/tool-ui/src/main/webapp/v4/ExternalItemAuth.js +0 -16
  111. package/src/legacy/tool-ui/src/main/webapp/v4/Form.js +0 -31
  112. package/src/legacy/tool-ui/src/main/webapp/v4/Hierarchy.js +0 -100
  113. package/src/legacy/tool-ui/src/main/webapp/v4/Icon.ts +0 -49
  114. package/src/legacy/tool-ui/src/main/webapp/v4/ImageEditor.js +0 -2403
  115. package/src/legacy/tool-ui/src/main/webapp/v4/ImageEditorBundle.js +0 -5
  116. package/src/legacy/tool-ui/src/main/webapp/v4/LinkCarousel.js +0 -40
  117. package/src/legacy/tool-ui/src/main/webapp/v4/LinkList.js +0 -14
  118. package/src/legacy/tool-ui/src/main/webapp/v4/LinkTable.js +0 -123
  119. package/src/legacy/tool-ui/src/main/webapp/v4/Location.js +0 -19
  120. package/src/legacy/tool-ui/src/main/webapp/v4/LocationMap.js +0 -148
  121. package/src/legacy/tool-ui/src/main/webapp/v4/LookingGlass.js +0 -24
  122. package/src/legacy/tool-ui/src/main/webapp/v4/Message.js +0 -14
  123. package/src/legacy/tool-ui/src/main/webapp/v4/NumberBar.js +0 -32
  124. package/src/legacy/tool-ui/src/main/webapp/v4/Page.js +0 -890
  125. package/src/legacy/tool-ui/src/main/webapp/v4/Preview.js +0 -758
  126. package/src/legacy/tool-ui/src/main/webapp/v4/PreviewEditor.js +0 -86
  127. package/src/legacy/tool-ui/src/main/webapp/v4/PreviewOverlay.js +0 -1005
  128. package/src/legacy/tool-ui/src/main/webapp/v4/PubSub.js +0 -47
  129. package/src/legacy/tool-ui/src/main/webapp/v4/QueryField.js +0 -211
  130. package/src/legacy/tool-ui/src/main/webapp/v4/RegionMap.js +0 -215
  131. package/src/legacy/tool-ui/src/main/webapp/v4/RepeatableContentInputGroup.js +0 -160
  132. package/src/legacy/tool-ui/src/main/webapp/v4/RichTextEditor.js +0 -154
  133. package/src/legacy/tool-ui/src/main/webapp/v4/SearchFields.js +0 -281
  134. package/src/legacy/tool-ui/src/main/webapp/v4/SearchResult.js +0 -255
  135. package/src/legacy/tool-ui/src/main/webapp/v4/SharePreview.js +0 -56
  136. package/src/legacy/tool-ui/src/main/webapp/v4/Sortable.js +0 -874
  137. package/src/legacy/tool-ui/src/main/webapp/v4/StyleEmbeddedContent.js +0 -100
  138. package/src/legacy/tool-ui/src/main/webapp/v4/StyleguidePresets.js +0 -357
  139. package/src/legacy/tool-ui/src/main/webapp/v4/TabContainer.js +0 -360
  140. package/src/legacy/tool-ui/src/main/webapp/v4/Taxonomy.js +0 -27
  141. package/src/legacy/tool-ui/src/main/webapp/v4/ThemeBundleEditor.js +0 -224
  142. package/src/legacy/tool-ui/src/main/webapp/v4/TimedContent.js +0 -147
  143. package/src/legacy/tool-ui/src/main/webapp/v4/TimedContentBundle.js +0 -8
  144. package/src/legacy/tool-ui/src/main/webapp/v4/VideoEditor.js +0 -2417
  145. package/src/legacy/tool-ui/src/main/webapp/v4/VideoEditorBundle.js +0 -8
  146. package/src/legacy/tool-ui/src/main/webapp/v4/ViewMirror.js +0 -52
  147. package/src/legacy/tool-ui/src/main/webapp/v4/ViewPreview.d.ts +0 -13
  148. package/src/legacy/tool-ui/src/main/webapp/v4/ViewPreview.js +0 -177
  149. package/src/legacy/tool-ui/src/main/webapp/v4/Widget.js +0 -90
  150. package/src/legacy/tool-ui/src/main/webapp/v4/__mocks__/fileMock.js +0 -1
  151. package/src/legacy/tool-ui/src/main/webapp/v4/__mocks__/styleMock.js +0 -1
  152. package/src/legacy/tool-ui/src/main/webapp/v4/__mocks__/textArea.mock.js +0 -20
  153. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/globals.js +0 -770
  154. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/ProseMirror.test.js +0 -16
  155. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/index.html +0 -54
  156. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/comment_manager/CommentManager.test.js +0 -29
  157. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/comment_manager/index.html +0 -35
  158. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/custom_keyboard/CustomKeyboard.js +0 -42
  159. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/custom_keyboard/index.html +0 -37
  160. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/enhancement_manager/EnhancementManager.test.js +0 -288
  161. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/enhancement_manager/block.html +0 -38
  162. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/enhancement_manager/inline.html +0 -38
  163. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/enhancement_manager/no-popups.html +0 -38
  164. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/list_manager/ListManager.js +0 -257
  165. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/list_manager/index.html +0 -38
  166. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/menubar/hierarchal.html +0 -33
  167. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/menubar/index.html +0 -33
  168. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/menubar/menubar.test.js +0 -195
  169. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/menubar/small.html +0 -34
  170. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/menubar/tags.html +0 -34
  171. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/placeholder_manager/PlaceholderManager.test.js +0 -134
  172. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/placeholder_manager/has-editable-placeholder.html +0 -32
  173. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/placeholder_manager/has-text.html +0 -34
  174. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/placeholder_manager/index.html +0 -31
  175. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/table_manager/TableManager.test.js +0 -63
  176. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/table_manager/existing.html +0 -48
  177. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/track_manager/TrackManager.test.js +0 -291
  178. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/track_manager/existing.html +0 -39
  179. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/integration/rte/plugins/track_manager/insert.html +0 -37
  180. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/Sortable.test.js +0 -105
  181. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/ProseMirror.test.js +0 -41
  182. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/codemirror-shim.test.js +0 -72
  183. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/plugins/collab_manager/CollabManager.test.js +0 -46
  184. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/plugins/enhancement_manager/EnhancementManager.test.js +0 -84
  185. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/plugins/list_manager/ListManager.test.js +0 -54
  186. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/plugins/menubar/menubar.test.js +0 -183
  187. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/plugins/spellcheck/SpellCheck.test.js +0 -45
  188. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/settings/BSSerializer.test.js +0 -346
  189. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/settings/menuItemsBuilder.test.js +0 -226
  190. package/src/legacy/tool-ui/src/main/webapp/v4/__tests__/unit/rte/utilities.test.js +0 -118
  191. package/src/legacy/tool-ui/src/main/webapp/v4/appetizeio/Appetizeio.js +0 -5
  192. package/src/legacy/tool-ui/src/main/webapp/v4/appetizeio/AppetizeioEmbedded.js +0 -113
  193. package/src/legacy/tool-ui/src/main/webapp/v4/compat/Fetch.js +0 -16
  194. package/src/legacy/tool-ui/src/main/webapp/v4/compat/jquery.js +0 -32
  195. package/src/legacy/tool-ui/src/main/webapp/v4/compat/requirejs.js +0 -13
  196. package/src/legacy/tool-ui/src/main/webapp/v4/dom/Tether.js +0 -1
  197. package/src/legacy/tool-ui/src/main/webapp/v4/dom/TetherLayout.js +0 -1
  198. package/src/legacy/tool-ui/src/main/webapp/v4/dom/closest.js +0 -1
  199. package/src/legacy/tool-ui/src/main/webapp/v4/dom/create.js +0 -1
  200. package/src/legacy/tool-ui/src/main/webapp/v4/dom/find.js +0 -1
  201. package/src/legacy/tool-ui/src/main/webapp/v4/dom/findAll.js +0 -1
  202. package/src/legacy/tool-ui/src/main/webapp/v4/dom/ifClick.js +0 -1
  203. package/src/legacy/tool-ui/src/main/webapp/v4/dom/ifMatches.js +0 -1
  204. package/src/legacy/tool-ui/src/main/webapp/v4/dom/ifUnmodified.js +0 -1
  205. package/src/legacy/tool-ui/src/main/webapp/v4/dom/index.js +0 -5
  206. package/src/legacy/tool-ui/src/main/webapp/v4/dom/insertBefore.js +0 -1
  207. package/src/legacy/tool-ui/src/main/webapp/v4/dom/insertFirst.js +0 -1
  208. package/src/legacy/tool-ui/src/main/webapp/v4/dom/insertLast.js +0 -1
  209. package/src/legacy/tool-ui/src/main/webapp/v4/dom/onFind.js +0 -1
  210. package/src/legacy/tool-ui/src/main/webapp/v4/dom/onFindOnce.js +0 -1
  211. package/src/legacy/tool-ui/src/main/webapp/v4/dom/onRTEReady.js +0 -1
  212. package/src/legacy/tool-ui/src/main/webapp/v4/dom/onRemove.js +0 -1
  213. package/src/legacy/tool-ui/src/main/webapp/v4/dom/onVisible.js +0 -1
  214. package/src/legacy/tool-ui/src/main/webapp/v4/dom/previousUntil.js +0 -1
  215. package/src/legacy/tool-ui/src/main/webapp/v4/dom/resolveIconCompat.js +0 -40
  216. package/src/legacy/tool-ui/src/main/webapp/v4/rtc/Socket.js +0 -1
  217. package/src/legacy/tool-ui/src/main/webapp/v4/rtc/index.js +0 -1
  218. package/src/legacy/tool-ui/src/main/webapp/v4/rte/ProseMirror.js +0 -909
  219. package/src/legacy/tool-ui/src/main/webapp/v4/rte/README.md +0 -68
  220. package/src/legacy/tool-ui/src/main/webapp/v4/rte/codemirror-shim.d.ts +0 -8
  221. package/src/legacy/tool-ui/src/main/webapp/v4/rte/codemirror-shim.js +0 -274
  222. package/src/legacy/tool-ui/src/main/webapp/v4/rte/collab-workflow.jpeg +0 -0
  223. package/src/legacy/tool-ui/src/main/webapp/v4/rte/interchangeable.ts +0 -250
  224. package/src/legacy/tool-ui/src/main/webapp/v4/rte/mention.js +0 -90
  225. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/PluginProvider.js +0 -124
  226. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/README.md +0 -46
  227. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/ai_inline_manager/AIInlineManager.ts +0 -124
  228. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/ai_inline_manager/views/AIInlineView.ts +0 -1019
  229. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/ai_manager/AiManager.ts +0 -199
  230. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/collab_manager/CollabManager.js +0 -339
  231. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/collab_manager/views/AvatarView.js +0 -96
  232. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/comment_manager/CommentManager.js +0 -348
  233. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/custom_keyboard/CustomKeyboard.js +0 -110
  234. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/custom_keyboard/README.md +0 -29
  235. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/EnhancementManager.js +0 -428
  236. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/README.md +0 -63
  237. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/commands.js +0 -690
  238. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/constants.js +0 -12
  239. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/enhancement-creation.jpeg +0 -0
  240. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/index.js +0 -15
  241. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/rte-flow.jpeg +0 -0
  242. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/views/ActionButtonView.js +0 -86
  243. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/views/BlockSubmenuView.js +0 -60
  244. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/views/EnhancementView.js +0 -208
  245. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/views/PreviewView.js +0 -102
  246. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/enhancement_manager/views/SubmenuView.js +0 -365
  247. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/find_replace_manager/FindReplaceManager.js +0 -239
  248. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/find_replace_manager/views/FindView.js +0 -604
  249. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/fullscreen_manager/FullscreenManager.js +0 -57
  250. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/fullscreen_manager/README.md +0 -26
  251. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/fullscreen_manager/commands.js +0 -16
  252. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/fullscreen_manager/index.js +0 -4
  253. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/fullscreen_manager/views/FullscreenView.js +0 -474
  254. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/html_editor_manager/htmlEditorManager.js +0 -66
  255. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/html_editor_manager/views/HtmlEditorView.js +0 -97
  256. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/list_manager/ListManager.js +0 -342
  257. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/list_manager/README.md +0 -50
  258. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/list_manager/commands.js +0 -207
  259. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/list_manager/constants.js +0 -26
  260. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/list_manager/index.js +0 -4
  261. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/menubar/Menubar.js +0 -485
  262. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/menubar/README.md +0 -40
  263. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/menubar/views/MenuView.js +0 -842
  264. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/paste_manager/PasteManager.js +0 -368
  265. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/placeholder_manager/PlaceHolderManager.js +0 -128
  266. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/raw_text_manager/README.md +0 -13
  267. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/raw_text_manager/RawTextManager.js +0 -96
  268. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/spellcheck/index.js +0 -3
  269. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/spellcheck/spellcheck-plugin.js +0 -280
  270. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/spellcheck/spellcheck-service.js +0 -94
  271. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/table_manager/TableManager.js +0 -57
  272. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/table_manager/commands.js +0 -97
  273. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/table_manager/views/TableSizerView.js +0 -88
  274. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/table_manager/views/TableView.js +0 -613
  275. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/track_manager/README.md +0 -13
  276. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/track_manager/TrackManager.js +0 -905
  277. package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/BSSerializer.js +0 -819
  278. package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/README.md +0 -80
  279. package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/commands.js +0 -98
  280. package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/constants.d.ts +0 -84
  281. package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/constants.js +0 -87
  282. package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/index.js +0 -13
  283. package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/keymapBuilder.js +0 -223
  284. package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/menuItemsBuilder.js +0 -559
  285. package/src/legacy/tool-ui/src/main/webapp/v4/rte/settings/schemaBuilder.js +0 -1281
  286. package/src/legacy/tool-ui/src/main/webapp/v4/rte/utilities.d.ts +0 -4
  287. package/src/legacy/tool-ui/src/main/webapp/v4/rte/utilities.js +0 -359
  288. package/src/legacy/tool-ui/src/main/webapp/v4/theme/ColorRotator.js +0 -1
  289. package/src/legacy/tool-ui/src/main/webapp/v4/util/debounce.js +0 -1
  290. package/src/legacy/tool-ui/src/main/webapp/v4/util/getComponentKey.js +0 -1
  291. package/src/legacy/tool-ui/src/main/webapp/v4/util/noise.js +0 -1
  292. package/src/legacy/tool-ui/src/main/webapp/v4/util/repaint.js +0 -1
  293. package/src/legacy/tool-ui/src/main/webapp/v4/util/storage.js +0 -1
  294. package/src/legacy/tool-ui/src/main/webapp/v4/util/throttle.js +0 -1
  295. package/src/legacy/tool-ui/src/main/webapp/v4/widget/AssignmentContent.js +0 -33
  296. package/src/legacy/tool-ui/src/main/webapp/v4/widget/AssignmentDeskDashboard.js +0 -217
  297. package/src/legacy/tool-ui/src/main/webapp/v4/widget/AssociatedContentWidget.js +0 -7
  298. package/src/legacy/tool-ui/src/main/webapp/v4/widget/BulkUpload.js +0 -19
  299. package/src/legacy/tool-ui/src/main/webapp/v4/widget/Calendar.js +0 -7
  300. package/src/legacy/tool-ui/src/main/webapp/v4/widget/ClosableWindow.js +0 -13
  301. package/src/legacy/tool-ui/src/main/webapp/v4/widget/PitchAssignments.js +0 -25
  302. package/src/legacy/tool-ui/src/main/webapp/v4/widget/PitchContent.js +0 -33
  303. package/src/legacy/tool-ui/src/main/webapp/v4/widget/Revisions.js +0 -61
@@ -1,785 +0,0 @@
1
- define(['jquery', '../../bsp-utils'], function ($, bspUtils) {
2
- bspUtils.onDomInsert(document, '.message', {
3
- insert: function (message) {
4
- var $message = $(message)
5
-
6
- if (
7
- $message.text() === '' &&
8
- $message.find('[data-dynamic-html], [data-dynamic-text]').length > 0
9
- ) {
10
- $message.hide()
11
- }
12
- },
13
- })
14
-
15
- $(document).on(
16
- 'change input',
17
- '.contentForm .inputContainer, .standardForm .inputContainer, .enhancementForm .inputContainer',
18
- function (event) {
19
- $(event.target)
20
- .closest('.inputContainer:not(.is-multiInputs)')
21
- .attr('data-interacted', true)
22
- },
23
- )
24
-
25
- bspUtils.onDomInsert(
26
- document,
27
- '.contentForm, .enhancementForm, .standardForm, .StandardForm',
28
- {
29
- insert: function (form) {
30
- var $form = $(form)
31
- var $wipSaveStatus = $form.find(
32
- '.widget-publishing > .icon-action-publish > .WorkInProgressSaveStatus',
33
- )
34
- var wipEnabled
35
- var wipSavingMessage
36
-
37
- var differentInitialFields = $form
38
- .find('input[name="_differentInitialFields"]')
39
- .val()
40
-
41
- if (differentInitialFields) {
42
- differentInitialFields = JSON.parse(differentInitialFields)
43
-
44
- if (differentInitialFields) {
45
- bspUtils.onDomInsert(form, '.objectInputs', {
46
- insert: function (inputs) {
47
- var $inputs = $(inputs)
48
- var fields =
49
- differentInitialFields[$inputs.attr('data-object-id')]
50
-
51
- if (fields) {
52
- $.each(fields, function (i, field) {
53
- $inputs
54
- .find('.inputContainer[data-field-name="' + field + '"]')
55
- .attr('data-interacted', true)
56
- })
57
- }
58
- },
59
- })
60
- }
61
- }
62
-
63
- if ($form.is('.contentForm')) {
64
- $form.one('change input', function () {
65
- wipEnabled = true
66
- })
67
- }
68
-
69
- // Triggers an event that results in an update call, in case the state is outdated upon returning to a window.
70
- document.addEventListener('visibilitychange', () => {
71
- if (document.visibilityState !== 'visible') return
72
- $(document)
73
- .find('.contentForm, .enhancementForm, .standardForm')
74
- .trigger('change')
75
- })
76
-
77
- let lastUpdateTime = 0
78
- let updateRunning
79
-
80
- function update(rerunning) {
81
- // Avoids an unnecessary update when the user is not actively using the window.
82
- if (document.visibilityState !== 'visible') {
83
- return
84
- }
85
-
86
- // Avoids an unnecessary update when the pre-publish dialog is open.
87
- if (document.querySelector('.PrePublish.Popup.is-visible')) {
88
- return
89
- }
90
-
91
- updateRunning = true
92
-
93
- var action = $form.attr('action')
94
- var questionAt = action.indexOf('?')
95
- // var end = +new Date() + 1000
96
- var $dynamicTexts = $form.find(
97
- '[data-dynamic-text]:not([data-dynamic-text=""]),' +
98
- '[data-dynamic-html]:not([data-dynamic-html=""]),' +
99
- '[data-dynamic-preview]:not([data-dynamic-preview=""]),' +
100
- '[data-dynamic-placeholder]:not([data-dynamic-placeholder=""]),' +
101
- '[data-dynamic-predicate]:not([data-dynamic-predicate=""]),' +
102
- '[data-dynamic-searcher-path]:not([data-dynamic-searcher-path=""]),' +
103
- '[data-dynamic-value-generator]:not([data-dynamic-value-generator=""])',
104
- )
105
-
106
- $dynamicTexts = $dynamicTexts.filter(function () {
107
- return $(this).closest('.contentDiffCurrent').length === 0
108
- })
109
-
110
- var fieldNames = {}
111
-
112
- $form.find('.objectInputs').each(function () {
113
- var $inputs = $(this)
114
-
115
- fieldNames[$inputs.attr('data-object-id')] = $.makeArray(
116
- $inputs
117
- .find('> .inputContainer:not(.is-readOnly)')
118
- .map(function () {
119
- return $(this).attr('data-field-name')
120
- }),
121
- )
122
- })
123
-
124
- if (wipSavingMessage && $wipSaveStatus) {
125
- $wipSaveStatus.text(wipSavingMessage)
126
- }
127
-
128
- // Javascript and jQuery utilities will both convert LF (newline) into CRLF, so with
129
- // textarea fields reset to the raw value of the field to preserve.
130
- const formData = new FormData(form)
131
- formData.forEach((v, k) => {
132
- if (v instanceof File) {
133
- formData.delete(k)
134
- return
135
- }
136
- let field = form.querySelector(`[name="${k}"]`)
137
- if (field.nodeName === 'TEXTAREA') {
138
- formData.set(k, field.value)
139
- }
140
- })
141
-
142
- const updateTime = +new Date()
143
-
144
- $.ajax({
145
- type: 'post',
146
- url:
147
- CONTEXT_PATH +
148
- 'contentState?wip=' +
149
- wipEnabled +
150
- '&wipContentUpdateDate=' +
151
- $form.attr('data-content-update-date') +
152
- '&idle=true' +
153
- (questionAt > -1 ? '&' + action.substring(questionAt + 1) : ''),
154
- cache: false,
155
- dataType: 'json',
156
-
157
- // If we are looking at a content update, then the current state (for viewing the diff) resides in the form
158
- // as well. We need to remove that from the form post or it messes up the dynamic values that return.
159
- data:
160
- new URLSearchParams(formData).toString() +
161
- '&_fns=' +
162
- encodeURIComponent(JSON.stringify(fieldNames)) +
163
- $dynamicTexts
164
- .map(function () {
165
- var $element = $(this)
166
-
167
- return (
168
- '&_dti=' +
169
- encodeURIComponent(
170
- $element
171
- .closest('[data-object-id]')
172
- .attr('data-object-id') || '',
173
- ) +
174
- '&_dtt=' +
175
- encodeURIComponent(
176
- $element.attr('data-dynamic-text') ||
177
- $element.attr('data-dynamic-html') ||
178
- $element.attr('data-dynamic-preview') ||
179
- $element.attr('data-dynamic-placeholder') ||
180
- '',
181
- ) +
182
- '&_dth=' +
183
- encodeURIComponent(
184
- $element.attr('data-dynamic-hash') || '',
185
- ) +
186
- '&_dtf=' +
187
- encodeURIComponent(
188
- $element.attr('data-dynamic-field-name') ||
189
- $element
190
- .closest('[data-field-name]')
191
- .attr('data-field-name') ||
192
- '',
193
- ) +
194
- '&_dtq=' +
195
- encodeURIComponent(
196
- $element.attr('data-dynamic-predicate') || '',
197
- ) +
198
- '&_dts=' +
199
- encodeURIComponent(
200
- $element.attr('data-dynamic-searcher-path') || '',
201
- ) +
202
- '&_dvg=' +
203
- encodeURIComponent(
204
- $element.attr('data-dynamic-value-generator') || '',
205
- ) +
206
- '&_dfi=' +
207
- encodeURIComponent(
208
- $element
209
- .siblings('.ComboInput')
210
- .children('.ComboInput-filter')
211
- .val() || '',
212
- )
213
- )
214
- })
215
- .get()
216
- .join(''),
217
-
218
- success: function (data) {
219
- if (lastUpdateTime < updateTime) {
220
- lastUpdateTime = updateTime
221
- } else {
222
- return
223
- }
224
-
225
- if (!data) {
226
- return
227
- }
228
-
229
- // Guards against Rich Text Element implementations improperly returning UUIDs in preview markup.
230
- // Usually in the form of serialized State data. Doing so can cause always unique preview strings.
231
- const idPattern =
232
- /&quot;_id&quot;:&quot;[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}&quot;/g
233
-
234
- if (wipEnabled && $wipSaveStatus) {
235
- var wipMessage = data._wip
236
-
237
- if (wipMessage) {
238
- var wipSaving = data._wipSaving
239
- if (wipSaving) {
240
- wipSavingMessage = wipSaving
241
- }
242
-
243
- $wipSaveStatus.removeAttr('data-status')
244
- $wipSaveStatus.text(wipMessage)
245
-
246
- const wipTitle = data._wipTitle
247
- if (wipTitle) {
248
- $wipSaveStatus.attr('title', wipTitle)
249
- }
250
-
251
- const wipStatus = data._wipStatus
252
- if (wipStatus === 'deleted') {
253
- wipSavingMessage = null
254
- }
255
-
256
- setTimeout(function () {
257
- $wipSaveStatus.attr('data-status', wipStatus)
258
- if (wipStatus === 'saved') {
259
- $wipSaveStatus.removeAttr('inert')
260
- }
261
- }, 0)
262
- }
263
- }
264
-
265
- for (const { type, id, field, body } of data._dynamic || []) {
266
- if (field) {
267
- const $row = $form.find(
268
- `.CIG[data-id="${id}"] > .CIG-row[data-field-name="${field}"]`,
269
- )
270
-
271
- if ($row.length === 0) {
272
- continue
273
- }
274
-
275
- if (type === 'field') {
276
- const hash = $row.attr('data-hash')
277
- const $newRow = $(body)
278
- const newHash = $newRow.attr('data-hash')
279
-
280
- if (hash !== newHash) {
281
- // Is tab inactive?
282
- if ($row.hasClass('TC-unselected')) {
283
- $newRow.addClass('TC-unselected')
284
- } else {
285
- $newRow.removeClass('TC-unselected')
286
- }
287
-
288
- // Is cluster collapsed?
289
- if ($row.hasClass('is-inHiddenCluster')) {
290
- $newRow.addClass('is-inHiddenCluster')
291
- }
292
-
293
- // Remove cluster name
294
- $newRow.children('h2').remove()
295
-
296
- $newRow.attr(
297
- 'data-interacted',
298
- $row.attr('data-interacted'),
299
- )
300
-
301
- $row.after($newRow)
302
- $row.remove()
303
- $newRow.trigger('create')
304
- }
305
- } else if (type === 'note') {
306
- const $noteElement = $row.find('> .CIG-note.dynamic-note')
307
- const previousText = $noteElement.attr('data-previous-text')
308
- const hasNoteChanged = previousText !== body
309
- const shouldRemoveNote = !body
310
-
311
- if (hasNoteChanged || shouldRemoveNote) {
312
- $noteElement.remove()
313
- }
314
-
315
- if (!shouldRemoveNote && hasNoteChanged) {
316
- const $newNote = $(body).attr('data-previous-text', body)
317
- $row
318
- .find('> .CIG-small, > .CIG-large')
319
- .first()
320
- .before($newNote)
321
- }
322
- } else if (type === 'placeholder') {
323
- const input = $row.find('.CIG-placeholder')[0]
324
-
325
- if (!input) {
326
- continue
327
- }
328
-
329
- const dataset = input.dataset
330
- const placeholderContainer =
331
- input.tagName === 'SELECT' ? dataset : input
332
- const placeholder = placeholderContainer.placeholder
333
-
334
- if (!dataset.previousPlaceholder) {
335
- dataset.previousPlaceholder = placeholder
336
- }
337
-
338
- if (
339
- (placeholder && placeholder.replaceAll(idPattern, '')) !==
340
- body.replaceAll(idPattern, '')
341
- ) {
342
- dataset.previousPlaceholder = placeholder
343
- placeholderContainer.placeholder = body
344
- const clearOnChange =
345
- dataset.placeholderClearOnChange === 'true'
346
-
347
- if (clearOnChange || body === input.value) {
348
- input.value = ''
349
- }
350
-
351
- $(input).trigger('placeholderUpdate', {
352
- clearOnChange,
353
- })
354
- }
355
- }
356
- } else if (type === 'note') {
357
- const $group = $form.find(`.CIG[data-id="${id}"]`)
358
- const $noteElement = $group.find(
359
- '> .CIG-note.dynamic-note, > .Message',
360
- )
361
- const previousText = $noteElement.attr('data-previous-text')
362
- const hasNoteChanged =
363
- previousText !== body &&
364
- $noteElement[0]?.hasAttribute('data-previous-text')
365
- const isGroupEmpty = $group.children().length === 0
366
- const shouldRemoveNote = !body
367
-
368
- if (hasNoteChanged || shouldRemoveNote) {
369
- $noteElement.remove()
370
- }
371
-
372
- if (!shouldRemoveNote && hasNoteChanged) {
373
- const $newNote = $(body).attr('data-previous-text', body)
374
- const message = $newNote[0].querySelector(
375
- '.Message:not(:has(.Message-icon))',
376
- )
377
- if (message) {
378
- const icon = document.createElement('span')
379
- icon.className = 'Message-icon'
380
- icon.setAttribute('aria-hidden', 'true')
381
- message.append(icon)
382
- }
383
- $group.removeClass('is-empty').prepend($newNote)
384
- }
385
-
386
- if (isGroupEmpty && shouldRemoveNote) {
387
- $group.addClass('is-empty')
388
- }
389
- }
390
- }
391
-
392
- let rerun = false
393
-
394
- $dynamicTexts.each(function (index) {
395
- var $element = $(this)
396
- var text = data._dynamicTexts[index]
397
-
398
- if (text.indexOf('data-dynamic-') > -1) {
399
- rerun = true
400
- }
401
-
402
- var dynamicPredicate = data._dynamicPredicates[index]
403
- var dynamicSearcherPath = data._dynamicSearcherPaths[index]
404
- var refreshObjectId = false
405
-
406
- if (
407
- $element.attr('data-placeholder-clear-on-change') === 'true'
408
- ) {
409
- var oldClearKey = $element.attr('data-old-clear-key')
410
- var newClearKey = text || 'null'
411
-
412
- if (!oldClearKey) {
413
- $element.attr('data-old-clear-key', newClearKey)
414
- } else if (oldClearKey !== newClearKey) {
415
- $element.attr('data-old-clear-key', newClearKey)
416
-
417
- if ($element.is('input, select, textarea')) {
418
- var rte = $element.data('rte2')
419
-
420
- if (rte) {
421
- rte.fromHTML('')
422
- }
423
-
424
- $element.val('')
425
- $element.change()
426
- }
427
- }
428
- }
429
-
430
- if ($element.is('[data-dynamic-searcher-path]')) {
431
- $element.attr('data-searcher-path', dynamicSearcherPath)
432
- refreshObjectId = true
433
- }
434
-
435
- if ($element.is('[data-dynamic-predicate]')) {
436
- $element.attr('data-additional-query', dynamicPredicate)
437
- $element.trigger('input-disable', false)
438
- refreshObjectId = true
439
- }
440
-
441
- if (refreshObjectId) {
442
- $element.trigger('refresh.objectId')
443
- }
444
-
445
- // If text is missing set to empty to compare & replace below
446
- if (text === null) {
447
- text = ''
448
- }
449
-
450
- $element.closest('.message').toggle(text !== '')
451
-
452
- var $previousText = $element.attr('data-previous-text')
453
-
454
- // Replace only when text has changed
455
- if (
456
- $previousText === null ||
457
- ($previousText !== text &&
458
- $element.closest('.is-removing').length === 0)
459
- ) {
460
- if ($element.is('[data-dynamic-text]')) {
461
- $element.text(text)
462
- } else if ($element.is('[data-dynamic-html]')) {
463
- // support legacy dynamic note html
464
- var $legacyDynamicTextWrapper = $element.parent()
465
-
466
- if (
467
- $legacyDynamicTextWrapper
468
- .parent()
469
- .hasClass('CIG-noteItem')
470
- ) {
471
- if (text) {
472
- $legacyDynamicTextWrapper.addClass('Message is-info')
473
- } else {
474
- $legacyDynamicTextWrapper.removeClass('Message is-info')
475
- }
476
- }
477
- $element.html(text)
478
- } else if ($element.is('[data-dynamic-preview]')) {
479
- $element.attr('src', text)
480
-
481
- // Trigger an imageUpdate event so other code can update appropriate elements
482
- // (Used by repeatable plugin)
483
- $element.trigger('imageUpdate')
484
- } else if ($element.is('[data-dynamic-placeholder]')) {
485
- $element.attr('placeholder', text)
486
-
487
- // Trigger a placeholderUpdate event so other code can listen for placeholder changes
488
- // (used by the rich text editor).
489
- // Note: originally called this event 'placeholder' but that caused a jquery error for some reason,
490
- // so using placeholderUpdate instead.
491
- if (!$element.val()) {
492
- $element.trigger('placeholderUpdate')
493
- }
494
- }
495
- }
496
-
497
- $element.attr('data-previous-text', text)
498
-
499
- // Populate dynamic values
500
- if ($element.is('[data-dynamic-value-generator]')) {
501
- const selectElement = $element.get(0)
502
- const allOptions = [...selectElement.options]
503
- const oldValues = new Set(allOptions.map((e) => e.value))
504
- const oldLabels = new Set(allOptions.map((e) => e.label))
505
- const dynamicValue = data._dynamicValues[index]
506
- const newValues = new Set(dynamicValue.map((e) => e.value))
507
- const newLabels = new Set(dynamicValue.map((e) => e.label))
508
-
509
- // At this point, we don't update options for multiple select
510
- // if there's no changes between old and new options as options may be visible to users.
511
- if (
512
- !selectElement.multiple ||
513
- oldValues.size != newValues.size ||
514
- oldLabels.size != newLabels.size ||
515
- [...oldValues].filter((e) => !newValues.has(e)).length ||
516
- [...oldLabels].filter((e) => !newLabels.has(e)).length
517
- ) {
518
- if (selectElement.multiple) {
519
- const values = new Set()
520
- const listId =
521
- selectElement?.nextElementSibling?.getAttribute(
522
- 'aria-owns',
523
- )
524
- const list = document.querySelectorAll(`#${listId} li`)
525
-
526
- if (list.length !== 0) {
527
- list.forEach((li) => {
528
- if (li.getAttribute('aria-selected') === 'true') {
529
- values.add(li.getAttribute('data-value'))
530
- }
531
- })
532
-
533
- for (const option of allOptions) {
534
- option.selected = values.has(option.value)
535
- }
536
- }
537
- }
538
-
539
- const selectedOptions = [...selectElement.selectedOptions]
540
-
541
- // remove existing Optgroups and Options
542
- selectElement
543
- .querySelectorAll('optgroup')
544
- .forEach((optGroup) => {
545
- optGroup.remove()
546
- })
547
- selectElement
548
- .querySelectorAll('option')
549
- .forEach((option) => {
550
- option.remove()
551
- })
552
-
553
- selectedOptions.forEach((e) => selectElement.add(e))
554
- const selectedValues = selectedOptions.map((e) => e.value)
555
-
556
- // instantiate map to store group name with list of Options in that group
557
- let optGroupMap = new Map([
558
- [String.prototype, [String.prototype]],
559
- ])
560
-
561
- dynamicValue.forEach((dv) => {
562
- const value = dv.value
563
- let group = dv.group
564
- // format the group name
565
- if (group == null) {
566
- group = ''
567
- } else {
568
- group = group.toLowerCase()
569
- }
570
- const optionIndex = selectedValues.indexOf(value)
571
- let option
572
-
573
- if (optionIndex > -1) {
574
- // find the existing selected Option
575
- option = selectedOptions[optionIndex]
576
- } else {
577
- // create a new Option
578
- option = new Option()
579
- option.value = value
580
- option.setAttribute('data-source', group)
581
- }
582
-
583
- // add the Option to map based on group name
584
- if (optGroupMap.has(group)) {
585
- optGroupMap.get(group).push(option)
586
- } else {
587
- optGroupMap.set(group, [option])
588
- }
589
-
590
- if (dv.labelHtml) {
591
- option.setAttribute('data-drop-down-html', dv.labelHtml)
592
- } else {
593
- option.innerText = dv.label
594
- }
595
- })
596
-
597
- // add all the no-group options to the Select first
598
- // sort the Options list to put the selected one(s) first
599
- const noGroupOptions = optGroupMap.get('')
600
- if (noGroupOptions) {
601
- const sortedNoGroupOptions = [
602
- ...noGroupOptions.filter((option) => !option.value),
603
- ...noGroupOptions.filter(
604
- (option) => option.value && option.selected,
605
- ),
606
- ...noGroupOptions.filter(
607
- (option) => option.value && !option.selected,
608
- ),
609
- ]
610
- for (const noGroupOption of sortedNoGroupOptions) {
611
- selectElement.add(noGroupOption)
612
- }
613
- }
614
-
615
- // add the rest of the groups to the Select
616
- for (let [groupName, options] of optGroupMap) {
617
- if (groupName != '') {
618
- let optGroup = document.createElement('optgroup')
619
- optGroup.label = groupName
620
- optGroup.setAttribute('value', groupName)
621
- if (selectElement.multiple) {
622
- optGroup.setAttribute('data-select-option', 'some')
623
- }
624
- // sort the Options list to put the selected one(s) first
625
- const sortedOptions = [
626
- ...options.filter((option) => option.selected),
627
- ...options.filter((option) => !option.selected),
628
- ]
629
- for (const option of sortedOptions) {
630
- optGroup.append(option)
631
- }
632
- selectElement.add(optGroup)
633
- }
634
- }
635
- }
636
- }
637
- })
638
-
639
- // Highlight fields that have changed.
640
- const diffs = $.extend(
641
- true,
642
- {},
643
- data._differences,
644
- data._hiddenDifferences,
645
- )
646
-
647
- if (diffs) {
648
- let $containers = $()
649
- let $changed = $()
650
-
651
- $containers = $containers.add($form.find('.inputContainer'))
652
- $containers = $containers.add(
653
- $form.find(
654
- '.repeatableForm > ol > li, .repeatableForm > ul > li',
655
- ),
656
- )
657
-
658
- $.each(diffs, function (id, fields) {
659
- if (fields.length === 0) {
660
- return
661
- }
662
-
663
- var $inputs = $form.find(
664
- '.objectInputs[data-object-id="' + id + '"]',
665
- )
666
-
667
- $.each(fields, function (name) {
668
- var $inputContainer = $inputs
669
- .find(
670
- '.inputContainer[data-field-name="' +
671
- name +
672
- '"][data-interacted]',
673
- )
674
- .closest('.inputContainer:not(.inputContainer-unlabeled)')
675
-
676
- $changed = $changed.add($inputContainer)
677
-
678
- var $inputGroup = $inputContainer.closest('.EIG')
679
- if ($inputGroup) {
680
- $changed = $changed.add(
681
- $inputGroup.closest(
682
- '.inputContainer:not(.inputContainer-unlabeled)',
683
- ),
684
- )
685
- }
686
- })
687
-
688
- var $li = $inputs.closest('li')
689
-
690
- if (
691
- $changed.length > 0 &&
692
- $li.parent().parent().is('.repeatableForm')
693
- ) {
694
- $changed = $changed.add($li)
695
- }
696
- })
697
-
698
- $containers.not($changed).removeClass('state-changed')
699
- $changed.addClass('state-changed')
700
- $form.trigger('content-state-differences')
701
- }
702
-
703
- $form.resize()
704
-
705
- if (!rerunning && rerun) {
706
- update(true)
707
- }
708
-
709
- $form.trigger('cms-updateContentState', [data])
710
-
711
- const oldState = $form.data('brightspot-content-state')
712
-
713
- const newState = JSON.stringify(data.state, function (k, v) {
714
- if (
715
- v === null ||
716
- v === false ||
717
- (Array.isArray(v) && v.length === 0) ||
718
- (v && typeof v === 'object' && Object.keys(v).length === 0)
719
- ) {
720
- return undefined
721
- } else {
722
- return v
723
- }
724
- })
725
-
726
- if (oldState !== newState) {
727
- $form.data('brightspot-content-state', newState)
728
-
729
- if (oldState) {
730
- $form[0].dispatchEvent(
731
- new CustomEvent('brightspot-content-state-change', {
732
- bubbles: true,
733
- detail: newState,
734
- }),
735
- )
736
- }
737
- }
738
- },
739
-
740
- complete: function () {
741
- updateRunning = false
742
- },
743
- })
744
- }
745
-
746
- let timeoutId
747
- let waitingId
748
-
749
- $form.bind('create change input', ({ type, target }) => {
750
- let run = !target.classList.contains('ComboInput-filter')
751
- const ci = target.closest('.ComboInput')
752
-
753
- if (ci) {
754
- const input = ci.parentNode.querySelector('select')
755
-
756
- if (input) {
757
- // Value generated inputs should always trigger an update.
758
- run = !!input.dataset.dynamicValueGenerator && type === 'input'
759
- }
760
- }
761
-
762
- if (run) {
763
- if (updateRunning) {
764
- if (!waitingId) {
765
- waitingId = setInterval(() => {
766
- if (!updateRunning) {
767
- clearInterval(waitingId)
768
- waitingId = null
769
- update()
770
- }
771
- }, 20)
772
- }
773
- } else {
774
- clearTimeout(timeoutId)
775
- timeoutId = setTimeout(update, type === 'change' ? 100 : 500)
776
- }
777
- }
778
- })
779
-
780
- $wipSaveStatus.click(update)
781
- update()
782
- },
783
- },
784
- )
785
- })