@uva-glass/component-library 3.55.1 → 3.55.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 (921) hide show
  1. package/dist/Accordion-BpnBHYIx.js +69 -0
  2. package/dist/Accordion-BpnBHYIx.js.map +1 -0
  3. package/dist/AccordionCard-BXy-plB7.js +43 -0
  4. package/dist/AccordionCard-BXy-plB7.js.map +1 -0
  5. package/dist/ActionList-O9w1hqNg.js +95 -0
  6. package/dist/ActionList-O9w1hqNg.js.map +1 -0
  7. package/dist/AddCatalogueLinkForm-Cy6fPNvN.js +117 -0
  8. package/dist/AddCatalogueLinkForm-Cy6fPNvN.js.map +1 -0
  9. package/dist/AppStatusBar-Bca0KFDR.js +20 -0
  10. package/dist/AppStatusBar-Bca0KFDR.js.map +1 -0
  11. package/dist/Attention-Bq5UU9I8.js +13 -0
  12. package/dist/Attention-Bq5UU9I8.js.map +1 -0
  13. package/dist/Backdrop-D8AHeuBn.js +10 -0
  14. package/dist/Backdrop-D8AHeuBn.js.map +1 -0
  15. package/dist/Button.module-DJlNwQUj.js +16 -0
  16. package/dist/Button.module-DJlNwQUj.js.map +1 -0
  17. package/dist/ButtonGroup-DR80lTLz.js +21 -0
  18. package/dist/ButtonGroup-DR80lTLz.js.map +1 -0
  19. package/dist/Card-DMFyuTmy.js +32 -0
  20. package/dist/Card-DMFyuTmy.js.map +1 -0
  21. package/dist/Checkbox-D6-b_4dC.js +12 -0
  22. package/dist/Checkbox-D6-b_4dC.js.map +1 -0
  23. package/dist/CheckboxButtonBar-CalU0IYK.js +79 -0
  24. package/dist/CheckboxButtonBar-CalU0IYK.js.map +1 -0
  25. package/dist/Chip-DJHvFToV.js +22 -0
  26. package/dist/Chip-DJHvFToV.js.map +1 -0
  27. package/dist/ClipboardButton-geHjMl2J.js +43 -0
  28. package/dist/ClipboardButton-geHjMl2J.js.map +1 -0
  29. package/dist/Column-BwKEOOuL.js +84 -0
  30. package/dist/Column-BwKEOOuL.js.map +1 -0
  31. package/dist/Container-BLjtYDqq.js +31 -0
  32. package/dist/Container-BLjtYDqq.js.map +1 -0
  33. package/dist/ControlsButton-zemVxTlg.js +64 -0
  34. package/dist/ControlsButton-zemVxTlg.js.map +1 -0
  35. package/dist/CopyableText-DkyhZ6wk.js +57 -0
  36. package/dist/CopyableText-DkyhZ6wk.js.map +1 -0
  37. package/dist/Drawer-Ggofac6y.js +77 -0
  38. package/dist/Drawer-Ggofac6y.js.map +1 -0
  39. package/dist/EmptyStateDataDisplay-D0QiI8nE.js +46 -0
  40. package/dist/EmptyStateDataDisplay-D0QiI8nE.js.map +1 -0
  41. package/dist/ExpandableInfoPanel-CnBVVNlJ.js +58 -0
  42. package/dist/ExpandableInfoPanel-CnBVVNlJ.js.map +1 -0
  43. package/dist/FeedbackBar-ByKp32HE.js +43 -0
  44. package/dist/FeedbackBar-ByKp32HE.js.map +1 -0
  45. package/dist/FeedbackBox-Bu7uB9DP.js +29 -0
  46. package/dist/FeedbackBox-Bu7uB9DP.js.map +1 -0
  47. package/dist/FieldHint-D0HtbTnt.js +16 -0
  48. package/dist/FieldHint-D0HtbTnt.js.map +1 -0
  49. package/dist/Fieldset-CoNu_Owa.js +23 -0
  50. package/dist/Fieldset-CoNu_Owa.js.map +1 -0
  51. package/dist/Flyout-DEpzfZOC.js +18 -0
  52. package/dist/Flyout-DEpzfZOC.js.map +1 -0
  53. package/dist/FormField-BZSoQdp9.js +21 -0
  54. package/dist/FormField-BZSoQdp9.js.map +1 -0
  55. package/dist/HorizontalList-C22DaDz-.js +20 -0
  56. package/dist/HorizontalList-C22DaDz-.js.map +1 -0
  57. package/dist/IconButton-CWCMH9uf.js +24 -0
  58. package/dist/IconButton-CWCMH9uf.js.map +1 -0
  59. package/dist/InfoBanner-DyznQLGr.js +13 -0
  60. package/dist/InfoBanner-DyznQLGr.js.map +1 -0
  61. package/dist/InfoMessage-I-VlwxVc.js +19 -0
  62. package/dist/InfoMessage-I-VlwxVc.js.map +1 -0
  63. package/dist/Input-Bn-arMaC.js +25 -0
  64. package/dist/Input-Bn-arMaC.js.map +1 -0
  65. package/dist/InputField-BWAy19w9.js +51 -0
  66. package/dist/InputField-BWAy19w9.js.map +1 -0
  67. package/dist/Label-o0BcWTUS.js +21 -0
  68. package/dist/Label-o0BcWTUS.js.map +1 -0
  69. package/dist/Lexical.prod-DIglXatJ.js +5246 -0
  70. package/dist/Lexical.prod-DIglXatJ.js.map +1 -0
  71. package/dist/LexicalClipboard.prod-Bnzu0sh_.js +248 -0
  72. package/dist/LexicalClipboard.prod-Bnzu0sh_.js.map +1 -0
  73. package/dist/LexicalComposerContext.prod-Ca-YN_fj.js +22 -0
  74. package/dist/LexicalComposerContext.prod-Ca-YN_fj.js.map +1 -0
  75. package/dist/LexicalExtension.prod-COPHoPpX.js +886 -0
  76. package/dist/LexicalExtension.prod-COPHoPpX.js.map +1 -0
  77. package/dist/LexicalLink.prod-Bf9JUdMv.js +683 -0
  78. package/dist/LexicalLink.prod-Bf9JUdMv.js.map +1 -0
  79. package/dist/LexicalList.prod-DRz8vsM9.js +766 -0
  80. package/dist/LexicalList.prod-DRz8vsM9.js.map +1 -0
  81. package/dist/LexicalTable.prod-D16GW-aZ.js +2003 -0
  82. package/dist/LexicalTable.prod-D16GW-aZ.js.map +1 -0
  83. package/dist/LexicalUtils.prod-BBTLliac.js +360 -0
  84. package/dist/LexicalUtils.prod-BBTLliac.js.map +1 -0
  85. package/dist/LinkContextMenu-m_CGQEiX.js +101 -0
  86. package/dist/LinkContextMenu-m_CGQEiX.js.map +1 -0
  87. package/dist/MenuLink-Cm1yZO_5.js +21 -0
  88. package/dist/MenuLink-Cm1yZO_5.js.map +1 -0
  89. package/dist/MetaDataBar-C4QO9oBV.js +23 -0
  90. package/dist/MetaDataBar-C4QO9oBV.js.map +1 -0
  91. package/dist/MetaDataList-CAR1HTYs.js +24 -0
  92. package/dist/MetaDataList-CAR1HTYs.js.map +1 -0
  93. package/dist/ModalDialog-HUkDdAJ-.js +114 -0
  94. package/dist/ModalDialog-HUkDdAJ-.js.map +1 -0
  95. package/dist/MultiSelectBox-Cuh_o-A1.js +189 -0
  96. package/dist/MultiSelectBox-Cuh_o-A1.js.map +1 -0
  97. package/dist/MultiSelectItem-BF5xRjz5.js +36 -0
  98. package/dist/MultiSelectItem-BF5xRjz5.js.map +1 -0
  99. package/dist/Notification-CIhsHuF0.js +68 -0
  100. package/dist/Notification-CIhsHuF0.js.map +1 -0
  101. package/dist/OverlayCloseButton-rttFbAM_.js +22 -0
  102. package/dist/OverlayCloseButton-rttFbAM_.js.map +1 -0
  103. package/dist/OverlayStepBar-CjaoYdsh.js +45 -0
  104. package/dist/OverlayStepBar-CjaoYdsh.js.map +1 -0
  105. package/dist/PageOverlay-D_wG2oie.js +108 -0
  106. package/dist/PageOverlay-D_wG2oie.js.map +1 -0
  107. package/dist/PasteHandlerPlugin-DjD1wryY.js +235 -0
  108. package/dist/PasteHandlerPlugin-DjD1wryY.js.map +1 -0
  109. package/dist/Periods-BYETtB6R.js +40 -0
  110. package/dist/Periods-BYETtB6R.js.map +1 -0
  111. package/dist/ProgrammeCard-76gG7ksx.js +27 -0
  112. package/dist/ProgrammeCard-76gG7ksx.js.map +1 -0
  113. package/dist/RadioButton-Bto2p5B9.js +35 -0
  114. package/dist/RadioButton-Bto2p5B9.js.map +1 -0
  115. package/dist/RadioGroup-JeTjVp5B.js +50 -0
  116. package/dist/RadioGroup-JeTjVp5B.js.map +1 -0
  117. package/dist/Repeater-BhkTEUai.js +22 -0
  118. package/dist/Repeater-BhkTEUai.js.map +1 -0
  119. package/dist/RteEditor.module-Jk80F1FA.js +42 -0
  120. package/dist/RteEditor.module-Jk80F1FA.js.map +1 -0
  121. package/dist/SearchField.module-BgxjHaPG.js +19 -0
  122. package/dist/SearchField.module-BgxjHaPG.js.map +1 -0
  123. package/dist/SectionNotification-CQqwPTqP.js +14 -0
  124. package/dist/SectionNotification-CQqwPTqP.js.map +1 -0
  125. package/dist/SelectListbox.module-HaPs1CLD.js +30 -0
  126. package/dist/SelectListbox.module-HaPs1CLD.js.map +1 -0
  127. package/dist/Slider-BlLyrET9.js +102 -0
  128. package/dist/Slider-BlLyrET9.js.map +1 -0
  129. package/dist/Sortable.module-BTUOSbOU.js +27 -0
  130. package/dist/Sortable.module-BTUOSbOU.js.map +1 -0
  131. package/dist/SortableProvider-Dc7hwkb5.js +147 -0
  132. package/dist/SortableProvider-Dc7hwkb5.js.map +1 -0
  133. package/dist/Spinner-D8tWqg9j.js +31 -0
  134. package/dist/Spinner-D8tWqg9j.js.map +1 -0
  135. package/dist/StatusBage-DQDOF5-U.js +13 -0
  136. package/dist/StatusBage-DQDOF5-U.js.map +1 -0
  137. package/dist/StatusPill-DM7n3I4W.js +30 -0
  138. package/dist/StatusPill-DM7n3I4W.js.map +1 -0
  139. package/dist/TableCellContextMenu-D0IMQr3E.js +119 -0
  140. package/dist/TableCellContextMenu-D0IMQr3E.js.map +1 -0
  141. package/dist/TableCellResizerPlugin-CgYsYsuY.js +208 -0
  142. package/dist/TableCellResizerPlugin-CgYsYsuY.js.map +1 -0
  143. package/dist/TextArea-DqKIpOfT.js +68 -0
  144. package/dist/TextArea-DqKIpOfT.js.map +1 -0
  145. package/dist/ToggleSwitch-C7z7JVtx.js +51 -0
  146. package/dist/ToggleSwitch-C7z7JVtx.js.map +1 -0
  147. package/dist/Tooltip-BzB3jznk.js +80 -0
  148. package/dist/Tooltip-BzB3jznk.js.map +1 -0
  149. package/dist/VarIndicator-C-GueOZD.js +50 -0
  150. package/dist/VarIndicator-C-GueOZD.js.map +1 -0
  151. package/dist/WeekSelector.module-BLPrVYgn.js +18 -0
  152. package/dist/WeekSelector.module-BLPrVYgn.js.map +1 -0
  153. package/dist/__mocks__/svgrMock.js +12 -9
  154. package/dist/__mocks__/svgrMock.js.map +1 -1
  155. package/dist/assets/Accordion.css +1 -1
  156. package/dist/assets/AccordionCard.css +1 -1
  157. package/dist/assets/ActionList.css +1 -1
  158. package/dist/assets/AddCatalogueLinkForm.css +1 -1
  159. package/dist/assets/AppStatusBar.css +1 -1
  160. package/dist/assets/Attention.css +1 -1
  161. package/dist/assets/Backdrop.css +1 -1
  162. package/dist/assets/Backdrop2.css +1 -1
  163. package/dist/assets/Button.css +1 -1
  164. package/dist/assets/ButtonGroup.css +1 -1
  165. package/dist/assets/Card.css +1 -1
  166. package/dist/assets/Checkbox.css +1 -1
  167. package/dist/assets/CheckboxButtonBar.css +1 -1
  168. package/dist/assets/Chip.css +1 -1
  169. package/dist/assets/ClipboardButton.css +1 -1
  170. package/dist/assets/Column.css +1 -1
  171. package/dist/assets/Container.css +1 -1
  172. package/dist/assets/ControlsButton.css +1 -1
  173. package/dist/assets/CopyableText.css +1 -1
  174. package/dist/assets/Drawer.css +1 -1
  175. package/dist/assets/EmptyStateDataDisplay.css +1 -1
  176. package/dist/assets/ExpandableInfoPanel.css +1 -1
  177. package/dist/assets/FeedbackBar.css +1 -1
  178. package/dist/assets/FeedbackBox.css +1 -1
  179. package/dist/assets/Fieldset.css +1 -1
  180. package/dist/assets/Flyout.css +1 -1
  181. package/dist/assets/FormField.css +1 -1
  182. package/dist/assets/GridRow.css +1 -1
  183. package/dist/assets/HorizontalList.css +1 -1
  184. package/dist/assets/Icon.css +1 -1
  185. package/dist/assets/IconButton.css +1 -1
  186. package/dist/assets/InfoBanner.css +1 -1
  187. package/dist/assets/InfoMessage.css +1 -1
  188. package/dist/assets/Input.css +1 -1
  189. package/dist/assets/InputField.css +1 -1
  190. package/dist/assets/Label.css +1 -1
  191. package/dist/assets/LinkContextMenu.css +1 -1
  192. package/dist/assets/MenuLink.css +1 -1
  193. package/dist/assets/MenuLink2.css +1 -1
  194. package/dist/assets/MetaDataBar.css +1 -1
  195. package/dist/assets/MetaDataList.css +1 -1
  196. package/dist/assets/ModalDialog.css +1 -1
  197. package/dist/assets/MultiSelectBox.css +1 -1
  198. package/dist/assets/MultiSelectItem.css +1 -1
  199. package/dist/assets/Notification.css +1 -1
  200. package/dist/assets/OverlayCloseButton.css +1 -1
  201. package/dist/assets/OverlayStepBar.css +1 -1
  202. package/dist/assets/PageOverlay.css +1 -1
  203. package/dist/assets/Periods.css +1 -1
  204. package/dist/assets/ProgrammeCard.css +1 -1
  205. package/dist/assets/RadioButton.css +1 -1
  206. package/dist/assets/RadioButton2.css +1 -1
  207. package/dist/assets/RadioGroup.css +1 -1
  208. package/dist/assets/RteEditor.css +1 -1
  209. package/dist/assets/SearchField.css +1 -1
  210. package/dist/assets/SectionNotification.css +1 -1
  211. package/dist/assets/SelectListbox.css +1 -1
  212. package/dist/assets/Slider.css +1 -1
  213. package/dist/assets/Sortable.css +1 -1
  214. package/dist/assets/Spinner.css +1 -1
  215. package/dist/assets/StatusBage.css +1 -1
  216. package/dist/assets/StatusPill.css +1 -1
  217. package/dist/assets/TableCellContextMenu.css +1 -1
  218. package/dist/assets/TextArea.css +1 -1
  219. package/dist/assets/ToggleSwitch.css +1 -1
  220. package/dist/assets/Tooltip.css +1 -1
  221. package/dist/assets/VarIndicator.css +1 -1
  222. package/dist/assets/WeekSelector.css +1 -1
  223. package/dist/assets/components.css +1 -0
  224. package/dist/chunk-DeC0fbbY.js +23 -0
  225. package/dist/chunk-SZQXB3JV-D0XG4Tlp.js +8448 -0
  226. package/dist/chunk-SZQXB3JV-D0XG4Tlp.js.map +1 -0
  227. package/dist/client-UU-mS47K.js +18953 -0
  228. package/dist/client-UU-mS47K.js.map +1 -0
  229. package/dist/clsx-BD2qMUU1.js +18 -0
  230. package/dist/clsx-BD2qMUU1.js.map +1 -0
  231. package/dist/components/Accordion/Accordion.js +2 -94
  232. package/dist/components/Accordion/Accordion.stories.js +30 -32
  233. package/dist/components/Accordion/Accordion.stories.js.map +1 -1
  234. package/dist/components/Accordion/Accordion.test.js +49 -27
  235. package/dist/components/Accordion/Accordion.test.js.map +1 -1
  236. package/dist/components/Accordion/index.js +2 -5
  237. package/dist/components/AccordionCard/AccordionCard.js +2 -58
  238. package/dist/components/AccordionCard/AccordionCard.stories.js +31 -32
  239. package/dist/components/AccordionCard/AccordionCard.stories.js.map +1 -1
  240. package/dist/components/AccordionCard/AccordionCard.test.js +54 -31
  241. package/dist/components/AccordionCard/AccordionCard.test.js.map +1 -1
  242. package/dist/components/AccordionCard/index.js +2 -5
  243. package/dist/components/ActionList/ActionList.js +2 -83
  244. package/dist/components/ActionList/ActionList.stories.js +49 -38
  245. package/dist/components/ActionList/ActionList.stories.js.map +1 -1
  246. package/dist/components/ActionList/ActionList.test.js +97 -57
  247. package/dist/components/ActionList/ActionList.test.js.map +1 -1
  248. package/dist/components/ActionList/index.js +2 -5
  249. package/dist/components/AppStatusBar/AppStatusBar.js +2 -13
  250. package/dist/components/AppStatusBar/AppStatusBar.stories.js +25 -26
  251. package/dist/components/AppStatusBar/AppStatusBar.stories.js.map +1 -1
  252. package/dist/components/AppStatusBar/AppStatusBar.test.js +17 -8
  253. package/dist/components/AppStatusBar/AppStatusBar.test.js.map +1 -1
  254. package/dist/components/AppStatusBar/index.js +2 -5
  255. package/dist/components/Attention/Attention.js +2 -12
  256. package/dist/components/Attention/Attention.stories.js +18 -16
  257. package/dist/components/Attention/Attention.stories.js.map +1 -1
  258. package/dist/components/Attention/Attention.test.js +14 -8
  259. package/dist/components/Attention/Attention.test.js.map +1 -1
  260. package/dist/components/Attention/index.js +2 -5
  261. package/dist/components/Backdrop/Backdrop.js +2 -8
  262. package/dist/components/Backdrop/Backdrop.stories.js +32 -28
  263. package/dist/components/Backdrop/Backdrop.stories.js.map +1 -1
  264. package/dist/components/Backdrop/Backdrop.test.js +13 -7
  265. package/dist/components/Backdrop/Backdrop.test.js.map +1 -1
  266. package/dist/components/Backdrop/index.js +2 -5
  267. package/dist/components/ButtonGroup/ButtonGroup.js +2 -26
  268. package/dist/components/ButtonGroup/ButtonGroup.stories.js +29 -39
  269. package/dist/components/ButtonGroup/ButtonGroup.stories.js.map +1 -1
  270. package/dist/components/ButtonGroup/index.js +2 -5
  271. package/dist/components/Buttons/Button.js +16 -22
  272. package/dist/components/Buttons/Button.js.map +1 -1
  273. package/dist/components/Buttons/Button.stories.js +43 -56
  274. package/dist/components/Buttons/Button.stories.js.map +1 -1
  275. package/dist/components/Buttons/Button.test.js +60 -33
  276. package/dist/components/Buttons/Button.test.js.map +1 -1
  277. package/dist/components/Buttons/LinkButton.js +14 -11
  278. package/dist/components/Buttons/LinkButton.js.map +1 -1
  279. package/dist/components/Buttons/LinkButton.stories.js +41 -57
  280. package/dist/components/Buttons/LinkButton.stories.js.map +1 -1
  281. package/dist/components/Buttons/LinkButton.test.js +71 -65
  282. package/dist/components/Buttons/LinkButton.test.js.map +1 -1
  283. package/dist/components/Buttons/MenuButton.js +18 -15
  284. package/dist/components/Buttons/MenuButton.js.map +1 -1
  285. package/dist/components/Buttons/MenuButton.stories.js +45 -61
  286. package/dist/components/Buttons/MenuButton.stories.js.map +1 -1
  287. package/dist/components/Buttons/MenuButton.test.js +70 -64
  288. package/dist/components/Buttons/MenuButton.test.js.map +1 -1
  289. package/dist/components/Buttons/index.js +4 -9
  290. package/dist/components/Card/Card.js +2 -39
  291. package/dist/components/Card/Card.stories.js +42 -49
  292. package/dist/components/Card/Card.stories.js.map +1 -1
  293. package/dist/components/Card/Card.test.js +14 -8
  294. package/dist/components/Card/Card.test.js.map +1 -1
  295. package/dist/components/Card/index.js +2 -5
  296. package/dist/components/Checkbox/Checkbox.js +2 -9
  297. package/dist/components/Checkbox/Checkbox.stories.js +44 -41
  298. package/dist/components/Checkbox/Checkbox.stories.js.map +1 -1
  299. package/dist/components/Checkbox/Checkbox.test.js +21 -15
  300. package/dist/components/Checkbox/Checkbox.test.js.map +1 -1
  301. package/dist/components/Checkbox/index.js +2 -5
  302. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js +2 -114
  303. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +277 -310
  304. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js.map +1 -1
  305. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +71 -85
  306. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js.map +1 -1
  307. package/dist/components/CheckboxButtonBar/index.js +2 -5
  308. package/dist/components/CheckboxTree/CheckboxTree.js +3 -172
  309. package/dist/components/CheckboxTree/CheckboxTree.stories.js +89 -139
  310. package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
  311. package/dist/components/CheckboxTree/index.js +3 -5
  312. package/dist/components/Chip/Chip.js +2 -14
  313. package/dist/components/Chip/Chip.stories.js +24 -28
  314. package/dist/components/Chip/Chip.stories.js.map +1 -1
  315. package/dist/components/Chip/index.js +2 -5
  316. package/dist/components/ControlsButton/ControlsButton.js +2 -82
  317. package/dist/components/ControlsButton/ControlsButton.stories.js +98 -122
  318. package/dist/components/ControlsButton/ControlsButton.stories.js.map +1 -1
  319. package/dist/components/ControlsButton/index.js +2 -5
  320. package/dist/components/CopyableText/CopyableText.js +2 -64
  321. package/dist/components/CopyableText/CopyableText.stories.js +36 -35
  322. package/dist/components/CopyableText/CopyableText.stories.js.map +1 -1
  323. package/dist/components/CopyableText/index.js +2 -5
  324. package/dist/components/Drawer/Drawer.js +2 -62
  325. package/dist/components/Drawer/Drawer.stories.js +49 -68
  326. package/dist/components/Drawer/Drawer.stories.js.map +1 -1
  327. package/dist/components/Drawer/index.js +2 -5
  328. package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.js +2 -50
  329. package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.js +17 -18
  330. package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.js.map +1 -1
  331. package/dist/components/EmptyStateDataDisplay/index.js +2 -5
  332. package/dist/components/ExpandableInfoPanel/ExpandableInfoPanel.js +2 -57
  333. package/dist/components/ExpandableInfoPanel/ExpandableInfoPanel.stories.js +57 -50
  334. package/dist/components/ExpandableInfoPanel/ExpandableInfoPanel.stories.js.map +1 -1
  335. package/dist/components/ExpandableInfoPanel/index.js +2 -5
  336. package/dist/components/FeedbackBar/FeedbackBar.js +2 -30
  337. package/dist/components/FeedbackBar/FeedbackBar.stories.js +30 -33
  338. package/dist/components/FeedbackBar/FeedbackBar.stories.js.map +1 -1
  339. package/dist/components/FeedbackBar/FeedbackBar.test.js +18 -12
  340. package/dist/components/FeedbackBar/FeedbackBar.test.js.map +1 -1
  341. package/dist/components/FeedbackBar/index.js +2 -5
  342. package/dist/components/FeedbackBox/FeedbackBox.js +2 -31
  343. package/dist/components/FeedbackBox/FeedbackBox.stories.js +30 -34
  344. package/dist/components/FeedbackBox/FeedbackBox.stories.js.map +1 -1
  345. package/dist/components/FeedbackBox/index.js +2 -5
  346. package/dist/components/FieldHint/FieldHint.js +2 -15
  347. package/dist/components/FieldHint/FieldHint.stories.js +27 -35
  348. package/dist/components/FieldHint/FieldHint.stories.js.map +1 -1
  349. package/dist/components/FieldHint/index.js +2 -5
  350. package/dist/components/Fieldset/Fieldset.js +2 -32
  351. package/dist/components/Fieldset/Fieldset.stories.js +40 -46
  352. package/dist/components/Fieldset/Fieldset.stories.js.map +1 -1
  353. package/dist/components/Fieldset/index.js +2 -5
  354. package/dist/components/FormField/FormField.js +2 -23
  355. package/dist/components/FormField/FormField.stories.js +40 -45
  356. package/dist/components/FormField/FormField.stories.js.map +1 -1
  357. package/dist/components/FormField/index.js +2 -5
  358. package/dist/components/FormInput/FormInput.js +3 -79
  359. package/dist/components/FormInput/FormInput.stories.js +60 -40
  360. package/dist/components/FormInput/FormInput.stories.js.map +1 -1
  361. package/dist/components/FormInput/index.js +3 -5
  362. package/dist/components/GridRow/Column/Column.js +2 -7
  363. package/dist/components/GridRow/Column/index.js +2 -5
  364. package/dist/components/GridRow/GridRow.js +27 -38
  365. package/dist/components/GridRow/GridRow.js.map +1 -1
  366. package/dist/components/GridRow/GridRow.stories.js +198 -95
  367. package/dist/components/GridRow/GridRow.stories.js.map +1 -1
  368. package/dist/components/GridRow/index.js +2 -5
  369. package/dist/components/HorizontalList/HorizontalList.js +2 -13
  370. package/dist/components/HorizontalList/HorizontalList.stories.js +44 -46
  371. package/dist/components/HorizontalList/HorizontalList.stories.js.map +1 -1
  372. package/dist/components/HorizontalList/index.js +2 -5
  373. package/dist/components/Icon/Icon.js +16 -9
  374. package/dist/components/Icon/Icon.js.map +1 -1
  375. package/dist/components/Icon/Icon.stories.js +47 -50
  376. package/dist/components/Icon/Icon.stories.js.map +1 -1
  377. package/dist/components/Icon/icons/index.js +2 -672
  378. package/dist/components/Icon/index.js +2 -5
  379. package/dist/components/IconButton/IconButton.js +2 -28
  380. package/dist/components/IconButton/IconButton.stories.js +55 -58
  381. package/dist/components/IconButton/IconButton.stories.js.map +1 -1
  382. package/dist/components/IconButton/index.js +2 -5
  383. package/dist/components/InfoBanner/InfoBanner.js +2 -12
  384. package/dist/components/InfoBanner/InfoBanner.stories.js +18 -22
  385. package/dist/components/InfoBanner/InfoBanner.stories.js.map +1 -1
  386. package/dist/components/InfoBanner/index.js +2 -5
  387. package/dist/components/InfoMessage/InfoMessage.js +2 -23
  388. package/dist/components/InfoMessage/InfoMessage.stories.js +21 -26
  389. package/dist/components/InfoMessage/InfoMessage.stories.js.map +1 -1
  390. package/dist/components/InfoMessage/index.js +2 -5
  391. package/dist/components/Input/Input.js +2 -28
  392. package/dist/components/Input/Input.stories.js +31 -50
  393. package/dist/components/Input/Input.stories.js.map +1 -1
  394. package/dist/components/Input/index.js +2 -5
  395. package/dist/components/InputField/InputField.js +2 -70
  396. package/dist/components/InputField/InputField.stories.js +81 -109
  397. package/dist/components/InputField/InputField.stories.js.map +1 -1
  398. package/dist/components/InputField/index.js +2 -5
  399. package/dist/components/Label/Label.js +2 -24
  400. package/dist/components/Label/Label.stories.js +26 -37
  401. package/dist/components/Label/Label.stories.js.map +1 -1
  402. package/dist/components/Label/Label.test.js +35 -20
  403. package/dist/components/Label/Label.test.js.map +1 -1
  404. package/dist/components/Label/index.js +2 -5
  405. package/dist/components/MenuLink/MenuLink.js +2 -25
  406. package/dist/components/MenuLink/MenuLink.stories.js +64 -27
  407. package/dist/components/MenuLink/MenuLink.stories.js.map +1 -1
  408. package/dist/components/MenuLink/index.js +2 -5
  409. package/dist/components/MetaDataBar/MetaDataBar.js +2 -13
  410. package/dist/components/MetaDataBar/MetaDataBar.stories.js +20 -20
  411. package/dist/components/MetaDataBar/MetaDataBar.stories.js.map +1 -1
  412. package/dist/components/MetaDataBar/MetaDataBar.test.js +26 -16
  413. package/dist/components/MetaDataBar/MetaDataBar.test.js.map +1 -1
  414. package/dist/components/MetaDataBar/index.js +2 -5
  415. package/dist/components/MetaDataList/MetaDataList.js +2 -14
  416. package/dist/components/MetaDataList/MetaDataList.stories.js +21 -23
  417. package/dist/components/MetaDataList/MetaDataList.stories.js.map +1 -1
  418. package/dist/components/MetaDataList/index.js +2 -5
  419. package/dist/components/ModalDialog/ModalDialog.js +2 -130
  420. package/dist/components/ModalDialog/ModalDialog.stories.js +80 -93
  421. package/dist/components/ModalDialog/ModalDialog.stories.js.map +1 -1
  422. package/dist/components/ModalDialog/index.js +2 -5
  423. package/dist/components/MultiSelect/MultiSelect.js +3 -8
  424. package/dist/components/MultiSelect/MultiSelect.stories.js +83 -93
  425. package/dist/components/MultiSelect/MultiSelect.stories.js.map +1 -1
  426. package/dist/components/MultiSelect/components/MultiSelectHeader.js +3 -34
  427. package/dist/components/MultiSelect/components/MultiSelectItem.js +2 -9
  428. package/dist/components/MultiSelect/index.js +3 -5
  429. package/dist/components/MultiSelectBox/MultiSelectBox.js +2 -207
  430. package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +101 -70
  431. package/dist/components/MultiSelectBox/MultiSelectBox.stories.js.map +1 -1
  432. package/dist/components/MultiSelectBox/MultiSelectBox.test.js +54 -29
  433. package/dist/components/MultiSelectBox/MultiSelectBox.test.js.map +1 -1
  434. package/dist/components/MultiSelectBox/index.js +2 -5
  435. package/dist/components/Notification/Notification.js +2 -58
  436. package/dist/components/Notification/Notification.stories.js +43 -40
  437. package/dist/components/Notification/Notification.stories.js.map +1 -1
  438. package/dist/components/Notification/Notification.test.js +24 -10
  439. package/dist/components/Notification/Notification.test.js.map +1 -1
  440. package/dist/components/Notification/index.js +2 -5
  441. package/dist/components/OverlayCloseButton/OverlayCloseButton.js +2 -25
  442. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +30 -29
  443. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js.map +1 -1
  444. package/dist/components/OverlayCloseButton/index.js +2 -5
  445. package/dist/components/OverlayStepBar/OverlayStepBar.js +2 -57
  446. package/dist/components/OverlayStepBar/OverlayStepBar.stories.js +44 -49
  447. package/dist/components/OverlayStepBar/OverlayStepBar.stories.js.map +1 -1
  448. package/dist/components/OverlayStepBar/index.js +2 -5
  449. package/dist/components/PageOverlay/PageOverlay.js +2 -114
  450. package/dist/components/PageOverlay/PageOverlay.stories.js +155 -163
  451. package/dist/components/PageOverlay/PageOverlay.stories.js.map +1 -1
  452. package/dist/components/PageOverlay/index.js +2 -5
  453. package/dist/components/PeriodSelector/PeriodSelector.js +3 -96
  454. package/dist/components/PeriodSelector/PeriodSelector.stories.js +27 -24
  455. package/dist/components/PeriodSelector/PeriodSelector.stories.js.map +1 -1
  456. package/dist/components/PeriodSelector/index.js +3 -5
  457. package/dist/components/Periods/Periods.js +2 -46
  458. package/dist/components/Periods/Periods.stories.js +53 -60
  459. package/dist/components/Periods/Periods.stories.js.map +1 -1
  460. package/dist/components/Periods/index.js +2 -5
  461. package/dist/components/ProgrammeCard/ProgrammeCard.js +2 -29
  462. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +71 -80
  463. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
  464. package/dist/components/ProgrammeCard/index.js +2 -5
  465. package/dist/components/RadioButton/RadioButton.js +2 -26
  466. package/dist/components/RadioButton/RadioButton.stories.js +30 -40
  467. package/dist/components/RadioButton/RadioButton.stories.js.map +1 -1
  468. package/dist/components/RadioButton/index.js +2 -5
  469. package/dist/components/RadioGroup/RadioGroup.js +2 -52
  470. package/dist/components/RadioGroup/RadioGroup.stories.js +39 -46
  471. package/dist/components/RadioGroup/RadioGroup.stories.js.map +1 -1
  472. package/dist/components/RadioGroup/Radiogroup.test.js +46 -22
  473. package/dist/components/RadioGroup/Radiogroup.test.js.map +1 -1
  474. package/dist/components/RadioGroup/index.js +2 -5
  475. package/dist/components/RadioTabSelector/RadioTabSelector.js +3 -94
  476. package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +76 -74
  477. package/dist/components/RadioTabSelector/RadioTabSelector.stories.js.map +1 -1
  478. package/dist/components/RadioTabSelector/index.js +3 -5
  479. package/dist/components/Repeater/Repeater.js +2 -19
  480. package/dist/components/Repeater/Repeater.stories.js +32 -42
  481. package/dist/components/Repeater/Repeater.stories.js.map +1 -1
  482. package/dist/components/Repeater/index.js +2 -5
  483. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +3 -43
  484. package/dist/components/RteEditor/EditorHeader/index.js +3 -5
  485. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +45 -47
  486. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js.map +1 -1
  487. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/index.js +2 -5
  488. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/AddCatalogueLinkForm.js +2 -108
  489. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/index.js +2 -5
  490. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js +150 -194
  491. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js.map +1 -1
  492. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/index.js +2 -5
  493. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +3 -81
  494. package/dist/components/RteEditor/Plugins/HistoryPlugin/index.js +3 -5
  495. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +3 -38
  496. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +2 -95
  497. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +3 -217
  498. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +2 -12
  499. package/dist/components/RteEditor/Plugins/LinkPlugin/index.js +3 -5
  500. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +75 -83
  501. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
  502. package/dist/components/RteEditor/Plugins/ListPlugin/index.js +2 -5
  503. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +2 -31
  504. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/index.js +2 -5
  505. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +2 -14
  506. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +2 -5
  507. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +3 -36
  508. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js +2 -133
  509. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/index.js +2 -5
  510. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -42
  511. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +69 -92
  512. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -1
  513. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +4 -7
  514. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +3 -90
  515. package/dist/components/RteEditor/Plugins/ToolbarPlugin/index.js +3 -5
  516. package/dist/components/RteEditor/Plugins/index.js +7 -21
  517. package/dist/components/RteEditor/Providers/LanguageProvider.js +22 -17
  518. package/dist/components/RteEditor/Providers/LanguageProvider.js.map +1 -1
  519. package/dist/components/RteEditor/RteEditor.js +3 -871
  520. package/dist/components/RteEditor/RteEditor.stories.js +160 -207
  521. package/dist/components/RteEditor/RteEditor.stories.js.map +1 -1
  522. package/dist/components/RteEditor/UvaTheme/UvaTheme.js +41 -40
  523. package/dist/components/RteEditor/UvaTheme/UvaTheme.js.map +1 -1
  524. package/dist/components/RteEditor/UvaTheme/index.js +2 -5
  525. package/dist/components/RteEditor/helpers.js +33 -40
  526. package/dist/components/RteEditor/helpers.js.map +1 -1
  527. package/dist/components/RteEditor/hooks/components/Flyout.js +2 -11
  528. package/dist/components/RteEditor/hooks/useFlyout.js +35 -23
  529. package/dist/components/RteEditor/hooks/useFlyout.js.map +1 -1
  530. package/dist/components/RteEditor/hooks/useTranslation.js +9 -8
  531. package/dist/components/RteEditor/hooks/useTranslation.js.map +1 -1
  532. package/dist/components/RteEditor/index.js +3 -6
  533. package/dist/components/RteEditor/mockCatalogueSearchData.js +484 -484
  534. package/dist/components/RteEditor/mockCatalogueSearchData.js.map +1 -1
  535. package/dist/components/RteEditor/mockRteContent.js +6 -100
  536. package/dist/components/RteEditor/mockRteContent.js.map +1 -1
  537. package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +98 -122
  538. package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js.map +1 -1
  539. package/dist/components/RteEditor/nodes/CourseCatalogueNode/index.js +2 -11
  540. package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +58 -72
  541. package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js.map +1 -1
  542. package/dist/components/RteEditor/nodes/TableWrapperNode/index.js +2 -10
  543. package/dist/components/RteEditor/nodes/index.js +3 -18
  544. package/dist/components/RteEditor/translations.js +216 -215
  545. package/dist/components/RteEditor/translations.js.map +1 -1
  546. package/dist/components/SearchField/SearchField.js +104 -105
  547. package/dist/components/SearchField/SearchField.js.map +1 -1
  548. package/dist/components/SearchField/SearcheField.stories.js +89 -118
  549. package/dist/components/SearchField/SearcheField.stories.js.map +1 -1
  550. package/dist/components/SearchField/components/ResultOptionBox.js +19 -12
  551. package/dist/components/SearchField/components/ResultOptionBox.js.map +1 -1
  552. package/dist/components/SearchField/components/ResultsOption.js +50 -55
  553. package/dist/components/SearchField/components/ResultsOption.js.map +1 -1
  554. package/dist/components/SearchField/index.js +2 -5
  555. package/dist/components/SearchField/mockData.js +136 -135
  556. package/dist/components/SearchField/mockData.js.map +1 -1
  557. package/dist/components/SectionNotification/SectionNotification.js +2 -18
  558. package/dist/components/SectionNotification/SectionNotification.stories.js +21 -24
  559. package/dist/components/SectionNotification/SectionNotification.stories.js.map +1 -1
  560. package/dist/components/SectionNotification/index.js +2 -5
  561. package/dist/components/SelectListbox/SelectListBox.stories.js +3415 -248
  562. package/dist/components/SelectListbox/SelectListBox.stories.js.map +1 -1
  563. package/dist/components/SelectListbox/SelectListbox.js +45 -56
  564. package/dist/components/SelectListbox/SelectListbox.js.map +1 -1
  565. package/dist/components/SelectListbox/SelectProvider.js +42 -43
  566. package/dist/components/SelectListbox/SelectProvider.js.map +1 -1
  567. package/dist/components/SelectListbox/components/SelectButton.js +63 -77
  568. package/dist/components/SelectListbox/components/SelectButton.js.map +1 -1
  569. package/dist/components/SelectListbox/components/SelectContainer.js +22 -21
  570. package/dist/components/SelectListbox/components/SelectContainer.js.map +1 -1
  571. package/dist/components/SelectListbox/components/SelectOption.js +69 -66
  572. package/dist/components/SelectListbox/components/SelectOption.js.map +1 -1
  573. package/dist/components/SelectListbox/components/SelectOptionBox.js +28 -30
  574. package/dist/components/SelectListbox/components/SelectOptionBox.js.map +1 -1
  575. package/dist/components/SelectListbox/index.js +2 -5
  576. package/dist/components/Slider/Slider.js +2 -113
  577. package/dist/components/Slider/Slider.stories.js +59 -38
  578. package/dist/components/Slider/Slider.stories.js.map +1 -1
  579. package/dist/components/Slider/index.js +2 -5
  580. package/dist/components/Sortable/Sortable.js +25 -41
  581. package/dist/components/Sortable/Sortable.js.map +1 -1
  582. package/dist/components/Sortable/Sortable.stories.js +79 -59
  583. package/dist/components/Sortable/Sortable.stories.js.map +1 -1
  584. package/dist/components/Sortable/SortableProvider.js +2 -10
  585. package/dist/components/Sortable/actions.js +24 -32
  586. package/dist/components/Sortable/actions.js.map +1 -1
  587. package/dist/components/Sortable/components/SortableContainer.js +2 -9
  588. package/dist/components/Sortable/components/SortableHandle.js +13 -9
  589. package/dist/components/Sortable/components/SortableHandle.js.map +1 -1
  590. package/dist/components/Sortable/components/SortableItem.js +103 -113
  591. package/dist/components/Sortable/components/SortableItem.js.map +1 -1
  592. package/dist/components/Sortable/constants.js +6 -14
  593. package/dist/components/Sortable/constants.js.map +1 -1
  594. package/dist/components/Sortable/index.js +1 -4
  595. package/dist/components/Sortable/sortableReducer.js +76 -90
  596. package/dist/components/Sortable/sortableReducer.js.map +1 -1
  597. package/dist/components/Spinner/Spinner.js +2 -22
  598. package/dist/components/Spinner/Spinner.stories.js +21 -26
  599. package/dist/components/Spinner/Spinner.stories.js.map +1 -1
  600. package/dist/components/Spinner/index.js +2 -5
  601. package/dist/components/StatusBadge/StatusBadge.stories.js +18 -21
  602. package/dist/components/StatusBadge/StatusBadge.stories.js.map +1 -1
  603. package/dist/components/StatusBadge/StatusBadge.test.js +19 -10
  604. package/dist/components/StatusBadge/StatusBadge.test.js.map +1 -1
  605. package/dist/components/StatusBadge/StatusBage.js +2 -10
  606. package/dist/components/StatusBadge/index.js +2 -5
  607. package/dist/components/StatusPill/StatusPill.js +2 -35
  608. package/dist/components/StatusPill/StatusPill.stories.js +20 -20
  609. package/dist/components/StatusPill/StatusPill.stories.js.map +1 -1
  610. package/dist/components/StatusPill/index.js +2 -5
  611. package/dist/components/TextArea/TextArea.js +2 -65
  612. package/dist/components/TextArea/TextArea.stories.js +30 -31
  613. package/dist/components/TextArea/TextArea.stories.js.map +1 -1
  614. package/dist/components/TextArea/TextArea.test.js +38 -22
  615. package/dist/components/TextArea/TextArea.test.js.map +1 -1
  616. package/dist/components/TextArea/index.js +2 -5
  617. package/dist/components/ToggleSwitch/ToggleSwitch.js +2 -66
  618. package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +20 -26
  619. package/dist/components/ToggleSwitch/ToggleSwitch.stories.js.map +1 -1
  620. package/dist/components/ToggleSwitch/index.js +2 -5
  621. package/dist/components/Tooltip/Tooltip.js +2 -75
  622. package/dist/components/Tooltip/Tooltip.stories.js +27 -32
  623. package/dist/components/Tooltip/Tooltip.stories.js.map +1 -1
  624. package/dist/components/Tooltip/index.js +2 -5
  625. package/dist/components/VarIndicator/VarIndicator.js +2 -62
  626. package/dist/components/VarIndicator/VarIndicator.stories.js +31 -30
  627. package/dist/components/VarIndicator/VarIndicator.stories.js.map +1 -1
  628. package/dist/components/VarIndicator/VarIndicator.test.js +72 -54
  629. package/dist/components/VarIndicator/VarIndicator.test.js.map +1 -1
  630. package/dist/components/VarIndicator/index.js +2 -5
  631. package/dist/components/WeekSelector/WeekSelector.js +89 -97
  632. package/dist/components/WeekSelector/WeekSelector.js.map +1 -1
  633. package/dist/components/WeekSelector/WeekSelector.stories.js +146 -191
  634. package/dist/components/WeekSelector/WeekSelector.stories.js.map +1 -1
  635. package/dist/components/WeekSelector/components/WeekSelectorButton.js +20 -22
  636. package/dist/components/WeekSelector/components/WeekSelectorButton.js.map +1 -1
  637. package/dist/components/WeekSelector/components/WeekSelectorOption.js +72 -85
  638. package/dist/components/WeekSelector/components/WeekSelectorOption.js.map +1 -1
  639. package/dist/components/WeekSelector/components/WeekSelectorOptionContainer.js +30 -17
  640. package/dist/components/WeekSelector/components/WeekSelectorOptionContainer.js.map +1 -1
  641. package/dist/components/WeekSelector/index.js +2 -5
  642. package/dist/components/WeekSelector/mockdata.js +470 -469
  643. package/dist/components/WeekSelector/mockdata.js.map +1 -1
  644. package/dist/components/hooks/useDebounce.js +17 -16
  645. package/dist/components/hooks/useDebounce.js.map +1 -1
  646. package/dist/components/hooks/useOnClickOutside.js +15 -14
  647. package/dist/components/hooks/useOnClickOutside.js.map +1 -1
  648. package/dist/components/hooks/usePositionedFloaters.js +66 -71
  649. package/dist/components/hooks/usePositionedFloaters.js.map +1 -1
  650. package/dist/components/hooks/useResponsive.js +36 -32
  651. package/dist/components/hooks/useResponsive.js.map +1 -1
  652. package/dist/components/index.js +64 -139
  653. package/dist/components-C4MCdrDH.js +1995 -0
  654. package/dist/components-C4MCdrDH.js.map +1 -0
  655. package/dist/dist-2TKCXdYZ.js +2005 -0
  656. package/dist/dist-2TKCXdYZ.js.map +1 -0
  657. package/dist/esm-UNe_gmRA.js +2781 -0
  658. package/dist/esm-UNe_gmRA.js.map +1 -0
  659. package/dist/helpers-BBSxTGRl.js +34 -0
  660. package/dist/helpers-BBSxTGRl.js.map +1 -0
  661. package/dist/icons-TRhI-4V6.js +2681 -0
  662. package/dist/icons-TRhI-4V6.js.map +1 -0
  663. package/dist/index.js +64 -139
  664. package/dist/lib-6BbFZdI7.js +5595 -0
  665. package/dist/lib-6BbFZdI7.js.map +1 -0
  666. package/dist/react-18-CRbkdI-3.js +43 -0
  667. package/dist/react-18-CRbkdI-3.js.map +1 -0
  668. package/dist/react.esm-CzIhAqlo.js +3297 -0
  669. package/dist/react.esm-CzIhAqlo.js.map +1 -0
  670. package/dist/setupTests.js +1226 -36
  671. package/dist/setupTests.js.map +1 -1
  672. package/dist/storyComponents/ClipboardButton/ClipboardButton.js +2 -45
  673. package/dist/storyComponents/ClipboardButton/index.js +2 -5
  674. package/dist/storyComponents/Container/Container.js +2 -40
  675. package/dist/storyComponents/Container/index.js +2 -5
  676. package/dist/storybook__react.d.js +6939 -7524
  677. package/dist/storybook__react.d.js.map +1 -1
  678. package/dist/test-DQruvi8i.js +19466 -0
  679. package/dist/test-DQruvi8i.js.map +1 -0
  680. package/dist/test-utils-BSs0eZfL.js +21 -0
  681. package/dist/test-utils-BSs0eZfL.js.map +1 -0
  682. package/dist/types/UserInterface.js +0 -2
  683. package/dist/vite-env.d.js +0 -2
  684. package/package.json +27 -27
  685. package/dist/Button.module-S1-6tV9o.js +0 -16
  686. package/dist/Button.module-S1-6tV9o.js.map +0 -1
  687. package/dist/Column-BL3dsYxn.js +0 -101
  688. package/dist/Column-BL3dsYxn.js.map +0 -1
  689. package/dist/Lexical.prod-o6Eq_uLx.js +0 -5202
  690. package/dist/Lexical.prod-o6Eq_uLx.js.map +0 -1
  691. package/dist/LexicalClipboard.prod-CnUrf2_p.js +0 -265
  692. package/dist/LexicalClipboard.prod-CnUrf2_p.js.map +0 -1
  693. package/dist/LexicalComposerContext.prod-DOyoZx0P.js +0 -22
  694. package/dist/LexicalComposerContext.prod-DOyoZx0P.js.map +0 -1
  695. package/dist/LexicalExtension.prod-CanXuzFO.js +0 -551
  696. package/dist/LexicalExtension.prod-CanXuzFO.js.map +0 -1
  697. package/dist/LexicalLink.prod-DAVbKER8.js +0 -561
  698. package/dist/LexicalLink.prod-DAVbKER8.js.map +0 -1
  699. package/dist/LexicalList.prod-C6cknPBV.js +0 -632
  700. package/dist/LexicalList.prod-C6cknPBV.js.map +0 -1
  701. package/dist/LexicalSelection.prod-B8GGrzJ3.js +0 -116
  702. package/dist/LexicalSelection.prod-B8GGrzJ3.js.map +0 -1
  703. package/dist/LexicalTable.prod-upbwOtcE.js +0 -1892
  704. package/dist/LexicalTable.prod-upbwOtcE.js.map +0 -1
  705. package/dist/LexicalUtils.prod-CF7x-KWm.js +0 -134
  706. package/dist/LexicalUtils.prod-CF7x-KWm.js.map +0 -1
  707. package/dist/MultiSelectItem-BzBmsKof.js +0 -24
  708. package/dist/MultiSelectItem-BzBmsKof.js.map +0 -1
  709. package/dist/RteEditor.module-CoTOIw5i.js +0 -41
  710. package/dist/RteEditor.module-CoTOIw5i.js.map +0 -1
  711. package/dist/SearchField.module-CMUEgX7d.js +0 -17
  712. package/dist/SearchField.module-CMUEgX7d.js.map +0 -1
  713. package/dist/SelectListbox.module-CXqMuXRB.js +0 -29
  714. package/dist/SelectListbox.module-CXqMuXRB.js.map +0 -1
  715. package/dist/Sortable.module-DCVXxKnw.js +0 -26
  716. package/dist/Sortable.module-DCVXxKnw.js.map +0 -1
  717. package/dist/SortableProvider-BbwlEPIr.js +0 -160
  718. package/dist/SortableProvider-BbwlEPIr.js.map +0 -1
  719. package/dist/TableCellResizerPlugin-qMtSAoKT.js +0 -248
  720. package/dist/TableCellResizerPlugin-qMtSAoKT.js.map +0 -1
  721. package/dist/TablePlugin-BRZcXq73.js +0 -308
  722. package/dist/TablePlugin-BRZcXq73.js.map +0 -1
  723. package/dist/WeekSelector.module-Clco7jTs.js +0 -17
  724. package/dist/WeekSelector.module-Clco7jTs.js.map +0 -1
  725. package/dist/_commonjsHelpers-DaMA6jEr.js +0 -9
  726. package/dist/_commonjsHelpers-DaMA6jEr.js.map +0 -1
  727. package/dist/assets/CheckboxTree.css +0 -1
  728. package/dist/assets/EditorHeader.css +0 -1
  729. package/dist/assets/FormInput.css +0 -1
  730. package/dist/assets/PeriodSelector.css +0 -1
  731. package/dist/assets/RadioTabSelector.css +0 -1
  732. package/dist/assets/TablePlugin.css +0 -1
  733. package/dist/chunk-OPOZOKLO-nJkI9rUN.js +0 -4508
  734. package/dist/chunk-OPOZOKLO-nJkI9rUN.js.map +0 -1
  735. package/dist/client-D5eE1v54.js +0 -27222
  736. package/dist/client-D5eE1v54.js.map +0 -1
  737. package/dist/clsx-OuTLNxxd.js +0 -17
  738. package/dist/clsx-OuTLNxxd.js.map +0 -1
  739. package/dist/components/Accordion/Accordion.js.map +0 -1
  740. package/dist/components/Accordion/index.js.map +0 -1
  741. package/dist/components/AccordionCard/AccordionCard.js.map +0 -1
  742. package/dist/components/AccordionCard/index.js.map +0 -1
  743. package/dist/components/ActionList/ActionList.js.map +0 -1
  744. package/dist/components/ActionList/index.js.map +0 -1
  745. package/dist/components/AppStatusBar/AppStatusBar.js.map +0 -1
  746. package/dist/components/AppStatusBar/index.js.map +0 -1
  747. package/dist/components/Attention/Attention.js.map +0 -1
  748. package/dist/components/Attention/index.js.map +0 -1
  749. package/dist/components/Backdrop/Backdrop.js.map +0 -1
  750. package/dist/components/Backdrop/index.js.map +0 -1
  751. package/dist/components/ButtonGroup/ButtonGroup.js.map +0 -1
  752. package/dist/components/ButtonGroup/index.js.map +0 -1
  753. package/dist/components/Buttons/index.js.map +0 -1
  754. package/dist/components/Card/Card.js.map +0 -1
  755. package/dist/components/Card/index.js.map +0 -1
  756. package/dist/components/Checkbox/Checkbox.js.map +0 -1
  757. package/dist/components/Checkbox/index.js.map +0 -1
  758. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js.map +0 -1
  759. package/dist/components/CheckboxButtonBar/index.js.map +0 -1
  760. package/dist/components/CheckboxTree/CheckboxTree.js.map +0 -1
  761. package/dist/components/CheckboxTree/index.js.map +0 -1
  762. package/dist/components/Chip/Chip.js.map +0 -1
  763. package/dist/components/Chip/index.js.map +0 -1
  764. package/dist/components/ControlsButton/ControlsButton.js.map +0 -1
  765. package/dist/components/ControlsButton/index.js.map +0 -1
  766. package/dist/components/CopyableText/CopyableText.js.map +0 -1
  767. package/dist/components/CopyableText/index.js.map +0 -1
  768. package/dist/components/Drawer/Drawer.js.map +0 -1
  769. package/dist/components/Drawer/index.js.map +0 -1
  770. package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.js.map +0 -1
  771. package/dist/components/EmptyStateDataDisplay/index.js.map +0 -1
  772. package/dist/components/ExpandableInfoPanel/ExpandableInfoPanel.js.map +0 -1
  773. package/dist/components/ExpandableInfoPanel/index.js.map +0 -1
  774. package/dist/components/FeedbackBar/FeedbackBar.js.map +0 -1
  775. package/dist/components/FeedbackBar/index.js.map +0 -1
  776. package/dist/components/FeedbackBox/FeedbackBox.js.map +0 -1
  777. package/dist/components/FeedbackBox/index.js.map +0 -1
  778. package/dist/components/FieldHint/FieldHint.js.map +0 -1
  779. package/dist/components/FieldHint/index.js.map +0 -1
  780. package/dist/components/Fieldset/Fieldset.js.map +0 -1
  781. package/dist/components/Fieldset/index.js.map +0 -1
  782. package/dist/components/FormField/FormField.js.map +0 -1
  783. package/dist/components/FormField/index.js.map +0 -1
  784. package/dist/components/FormInput/FormInput.js.map +0 -1
  785. package/dist/components/FormInput/index.js.map +0 -1
  786. package/dist/components/GridRow/Column/Column.js.map +0 -1
  787. package/dist/components/GridRow/Column/index.js.map +0 -1
  788. package/dist/components/GridRow/index.js.map +0 -1
  789. package/dist/components/HorizontalList/HorizontalList.js.map +0 -1
  790. package/dist/components/HorizontalList/index.js.map +0 -1
  791. package/dist/components/Icon/icons/index.js.map +0 -1
  792. package/dist/components/Icon/index.js.map +0 -1
  793. package/dist/components/IconButton/IconButton.js.map +0 -1
  794. package/dist/components/IconButton/index.js.map +0 -1
  795. package/dist/components/InfoBanner/InfoBanner.js.map +0 -1
  796. package/dist/components/InfoBanner/index.js.map +0 -1
  797. package/dist/components/InfoMessage/InfoMessage.js.map +0 -1
  798. package/dist/components/InfoMessage/index.js.map +0 -1
  799. package/dist/components/Input/Input.js.map +0 -1
  800. package/dist/components/Input/index.js.map +0 -1
  801. package/dist/components/InputField/InputField.js.map +0 -1
  802. package/dist/components/InputField/index.js.map +0 -1
  803. package/dist/components/Label/Label.js.map +0 -1
  804. package/dist/components/Label/index.js.map +0 -1
  805. package/dist/components/MenuLink/MenuLink.js.map +0 -1
  806. package/dist/components/MenuLink/index.js.map +0 -1
  807. package/dist/components/MetaDataBar/MetaDataBar.js.map +0 -1
  808. package/dist/components/MetaDataBar/index.js.map +0 -1
  809. package/dist/components/MetaDataList/MetaDataList.js.map +0 -1
  810. package/dist/components/MetaDataList/index.js.map +0 -1
  811. package/dist/components/ModalDialog/ModalDialog.js.map +0 -1
  812. package/dist/components/ModalDialog/index.js.map +0 -1
  813. package/dist/components/MultiSelect/MultiSelect.js.map +0 -1
  814. package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +0 -1
  815. package/dist/components/MultiSelect/components/MultiSelectItem.js.map +0 -1
  816. package/dist/components/MultiSelect/index.js.map +0 -1
  817. package/dist/components/MultiSelectBox/MultiSelectBox.js.map +0 -1
  818. package/dist/components/MultiSelectBox/index.js.map +0 -1
  819. package/dist/components/Notification/Notification.js.map +0 -1
  820. package/dist/components/Notification/index.js.map +0 -1
  821. package/dist/components/OverlayCloseButton/OverlayCloseButton.js.map +0 -1
  822. package/dist/components/OverlayCloseButton/index.js.map +0 -1
  823. package/dist/components/OverlayStepBar/OverlayStepBar.js.map +0 -1
  824. package/dist/components/OverlayStepBar/index.js.map +0 -1
  825. package/dist/components/PageOverlay/PageOverlay.js.map +0 -1
  826. package/dist/components/PageOverlay/index.js.map +0 -1
  827. package/dist/components/PeriodSelector/PeriodSelector.js.map +0 -1
  828. package/dist/components/PeriodSelector/index.js.map +0 -1
  829. package/dist/components/Periods/Periods.js.map +0 -1
  830. package/dist/components/Periods/index.js.map +0 -1
  831. package/dist/components/ProgrammeCard/ProgrammeCard.js.map +0 -1
  832. package/dist/components/ProgrammeCard/index.js.map +0 -1
  833. package/dist/components/RadioButton/RadioButton.js.map +0 -1
  834. package/dist/components/RadioButton/index.js.map +0 -1
  835. package/dist/components/RadioGroup/RadioGroup.js.map +0 -1
  836. package/dist/components/RadioGroup/index.js.map +0 -1
  837. package/dist/components/RadioTabSelector/RadioTabSelector.js.map +0 -1
  838. package/dist/components/RadioTabSelector/index.js.map +0 -1
  839. package/dist/components/Repeater/Repeater.js.map +0 -1
  840. package/dist/components/Repeater/index.js.map +0 -1
  841. package/dist/components/RteEditor/EditorHeader/EditorHeader.js.map +0 -1
  842. package/dist/components/RteEditor/EditorHeader/index.js.map +0 -1
  843. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/index.js.map +0 -1
  844. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/AddCatalogueLinkForm.js.map +0 -1
  845. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/AddCatalogueLinkForm/index.js.map +0 -1
  846. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/index.js.map +0 -1
  847. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +0 -1
  848. package/dist/components/RteEditor/Plugins/HistoryPlugin/index.js.map +0 -1
  849. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js.map +0 -1
  850. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js.map +0 -1
  851. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +0 -1
  852. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js.map +0 -1
  853. package/dist/components/RteEditor/Plugins/LinkPlugin/index.js.map +0 -1
  854. package/dist/components/RteEditor/Plugins/ListPlugin/index.js.map +0 -1
  855. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js.map +0 -1
  856. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/index.js.map +0 -1
  857. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js.map +0 -1
  858. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js.map +0 -1
  859. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js.map +0 -1
  860. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js.map +0 -1
  861. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/index.js.map +0 -1
  862. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js.map +0 -1
  863. package/dist/components/RteEditor/Plugins/TablePlugin/index.js.map +0 -1
  864. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +0 -1
  865. package/dist/components/RteEditor/Plugins/ToolbarPlugin/index.js.map +0 -1
  866. package/dist/components/RteEditor/Plugins/index.js.map +0 -1
  867. package/dist/components/RteEditor/RteEditor.js.map +0 -1
  868. package/dist/components/RteEditor/UvaTheme/index.js.map +0 -1
  869. package/dist/components/RteEditor/hooks/components/Flyout.js.map +0 -1
  870. package/dist/components/RteEditor/index.js.map +0 -1
  871. package/dist/components/RteEditor/nodes/CourseCatalogueNode/index.js.map +0 -1
  872. package/dist/components/RteEditor/nodes/TableWrapperNode/index.js.map +0 -1
  873. package/dist/components/RteEditor/nodes/index.js.map +0 -1
  874. package/dist/components/SearchField/index.js.map +0 -1
  875. package/dist/components/SectionNotification/SectionNotification.js.map +0 -1
  876. package/dist/components/SectionNotification/index.js.map +0 -1
  877. package/dist/components/SelectListbox/index.js.map +0 -1
  878. package/dist/components/Slider/Slider.js.map +0 -1
  879. package/dist/components/Slider/index.js.map +0 -1
  880. package/dist/components/Sortable/SortableProvider.js.map +0 -1
  881. package/dist/components/Sortable/components/SortableContainer.js.map +0 -1
  882. package/dist/components/Sortable/index.js.map +0 -1
  883. package/dist/components/Spinner/Spinner.js.map +0 -1
  884. package/dist/components/Spinner/index.js.map +0 -1
  885. package/dist/components/StatusBadge/StatusBage.js.map +0 -1
  886. package/dist/components/StatusBadge/index.js.map +0 -1
  887. package/dist/components/StatusPill/StatusPill.js.map +0 -1
  888. package/dist/components/StatusPill/index.js.map +0 -1
  889. package/dist/components/TextArea/TextArea.js.map +0 -1
  890. package/dist/components/TextArea/index.js.map +0 -1
  891. package/dist/components/ToggleSwitch/ToggleSwitch.js.map +0 -1
  892. package/dist/components/ToggleSwitch/index.js.map +0 -1
  893. package/dist/components/Tooltip/Tooltip.js.map +0 -1
  894. package/dist/components/Tooltip/index.js.map +0 -1
  895. package/dist/components/VarIndicator/VarIndicator.js.map +0 -1
  896. package/dist/components/VarIndicator/index.js.map +0 -1
  897. package/dist/components/WeekSelector/index.js.map +0 -1
  898. package/dist/components/index.js.map +0 -1
  899. package/dist/index-B_q_4aBT.js +0 -24946
  900. package/dist/index-B_q_4aBT.js.map +0 -1
  901. package/dist/index-CULNJwuI.js +0 -2355
  902. package/dist/index-CULNJwuI.js.map +0 -1
  903. package/dist/index-D6WVIfcJ.js +0 -6039
  904. package/dist/index-D6WVIfcJ.js.map +0 -1
  905. package/dist/index-YdDr6J97.js +0 -3099
  906. package/dist/index-YdDr6J97.js.map +0 -1
  907. package/dist/index-yEhaxKq-.js +0 -238
  908. package/dist/index-yEhaxKq-.js.map +0 -1
  909. package/dist/index.js.map +0 -1
  910. package/dist/react-18-CxCoNkIN.js +0 -41
  911. package/dist/react-18-CxCoNkIN.js.map +0 -1
  912. package/dist/react.esm-C68fQMAi.js +0 -4237
  913. package/dist/react.esm-C68fQMAi.js.map +0 -1
  914. package/dist/storyComponents/ClipboardButton/ClipboardButton.js.map +0 -1
  915. package/dist/storyComponents/ClipboardButton/index.js.map +0 -1
  916. package/dist/storyComponents/Container/Container.js.map +0 -1
  917. package/dist/storyComponents/Container/index.js.map +0 -1
  918. package/dist/test-utils-BcpWLsLH.js +0 -56
  919. package/dist/test-utils-BcpWLsLH.js.map +0 -1
  920. package/dist/types/UserInterface.js.map +0 -1
  921. package/dist/vite-env.d.js.map +0 -1
@@ -1,1892 +0,0 @@
1
- import { _ as Rt, s as Xt, x as qt, P as Vt, T as Kt, A as jt } from "./LexicalUtils.prod-CF7x-KWm.js";
2
- import { q as T, A as et, Z as G, M as Ne, $ as L, w as P, S as tt, r as Zt, y as Se, j as dt, V as J, p as nt, s as Gt, I as ot, t as me, D as re, a as ae, T as ke, Y as rt, P as B, c as Qt, u as en, v as tn, e as nn, B as on, E as He, U as rn, H as ln, G as sn, n as an, J as De, f as be, K as cn, m as ne, N as un, R as hn, W as fn, X as dn, a0 as X, a1 as gn, a2 as pn, a3 as At, a4 as mn, a5 as Cn, a6 as _n, a7 as Sn, a8 as wn, a9 as yn, aa as bn, ab as Nn, ac as xn, ad as pe, ae as $e, af as vn, d as Ot, ag as Fn, ah as Tn, x as Rn, h as Kn, ai as An, aj as gt, ak as On, al as pt, g as kn, am as mt, z as Ct, b as Re, an as En } from "./Lexical.prod-o6Eq_uLx.js";
3
- import { o as _t } from "./LexicalExtension.prod-CanXuzFO.js";
4
- import { F as Mn, _ as $n } from "./LexicalClipboard.prod-CnUrf2_p.js";
5
- const ie = /^(\d+(?:\.\d+)?)px$/, H = { BOTH: 3, COLUMN: 2, NO_STATUS: 0, ROW: 1 };
6
- class he extends et {
7
- __colSpan;
8
- __rowSpan;
9
- __headerState;
10
- __width;
11
- __backgroundColor;
12
- __verticalAlign;
13
- static getType() {
14
- return "tablecell";
15
- }
16
- static clone(e) {
17
- return new he(e.__headerState, e.__colSpan, e.__width, e.__key);
18
- }
19
- afterCloneFrom(e) {
20
- super.afterCloneFrom(e), this.__rowSpan = e.__rowSpan, this.__backgroundColor = e.__backgroundColor, this.__verticalAlign = e.__verticalAlign;
21
- }
22
- static importDOM() {
23
- return { td: (e) => ({ conversion: St, priority: 0 }), th: (e) => ({ conversion: St, priority: 0 }) };
24
- }
25
- static importJSON(e) {
26
- return V().updateFromJSON(e);
27
- }
28
- updateFromJSON(e) {
29
- return super.updateFromJSON(e).setHeaderStyles(e.headerState).setColSpan(e.colSpan || 1).setRowSpan(e.rowSpan || 1).setWidth(e.width || void 0).setBackgroundColor(e.backgroundColor || null).setVerticalAlign(e.verticalAlign || void 0);
30
- }
31
- constructor(e = H.NO_STATUS, t = 1, o, l) {
32
- super(l), this.__colSpan = t, this.__rowSpan = 1, this.__headerState = e, this.__width = o, this.__backgroundColor = null, this.__verticalAlign = void 0;
33
- }
34
- createDOM(e) {
35
- const t = document.createElement(this.getTag());
36
- return this.__width && (t.style.width = `${this.__width}px`), this.__colSpan > 1 && (t.colSpan = this.__colSpan), this.__rowSpan > 1 && (t.rowSpan = this.__rowSpan), this.__backgroundColor !== null && (t.style.backgroundColor = this.__backgroundColor), Ie(this.__verticalAlign) && (t.style.verticalAlign = this.__verticalAlign), G(t, e.theme.tableCell, this.hasHeader() && e.theme.tableCellHeader), t;
37
- }
38
- exportDOM(e) {
39
- const t = super.exportDOM(e);
40
- if (Ne(t.element)) {
41
- const o = t.element;
42
- o.setAttribute("data-temporary-table-cell-lexical-key", this.getKey()), o.style.border = "1px solid black", this.__colSpan > 1 && (o.colSpan = this.__colSpan), this.__rowSpan > 1 && (o.rowSpan = this.__rowSpan), o.style.width = `${this.getWidth() || 75}px`, o.style.verticalAlign = this.getVerticalAlign() || "top", o.style.textAlign = "start", this.__backgroundColor === null && this.hasHeader() && (o.style.backgroundColor = "#f2f3f5");
43
- }
44
- return t;
45
- }
46
- exportJSON() {
47
- return { ...super.exportJSON(), ...Ie(this.__verticalAlign) && { verticalAlign: this.__verticalAlign }, backgroundColor: this.getBackgroundColor(), colSpan: this.__colSpan, headerState: this.__headerState, rowSpan: this.__rowSpan, width: this.getWidth() };
48
- }
49
- getColSpan() {
50
- return this.getLatest().__colSpan;
51
- }
52
- setColSpan(e) {
53
- const t = this.getWritable();
54
- return t.__colSpan = e, t;
55
- }
56
- getRowSpan() {
57
- return this.getLatest().__rowSpan;
58
- }
59
- setRowSpan(e) {
60
- const t = this.getWritable();
61
- return t.__rowSpan = e, t;
62
- }
63
- getTag() {
64
- return this.hasHeader() ? "th" : "td";
65
- }
66
- setHeaderStyles(e, t = H.BOTH) {
67
- const o = this.getWritable();
68
- return o.__headerState = e & t | o.__headerState & ~t, o;
69
- }
70
- getHeaderStyles() {
71
- return this.getLatest().__headerState;
72
- }
73
- setWidth(e) {
74
- const t = this.getWritable();
75
- return t.__width = e, t;
76
- }
77
- getWidth() {
78
- return this.getLatest().__width;
79
- }
80
- getBackgroundColor() {
81
- return this.getLatest().__backgroundColor;
82
- }
83
- setBackgroundColor(e) {
84
- const t = this.getWritable();
85
- return t.__backgroundColor = e, t;
86
- }
87
- getVerticalAlign() {
88
- return this.getLatest().__verticalAlign;
89
- }
90
- setVerticalAlign(e) {
91
- const t = this.getWritable();
92
- return t.__verticalAlign = e || void 0, t;
93
- }
94
- toggleHeaderStyle(e) {
95
- const t = this.getWritable();
96
- return (t.__headerState & e) === e ? t.__headerState -= e : t.__headerState += e, t;
97
- }
98
- hasHeaderState(e) {
99
- return (this.getHeaderStyles() & e) === e;
100
- }
101
- hasHeader() {
102
- return this.getLatest().__headerState !== H.NO_STATUS;
103
- }
104
- updateDOM(e) {
105
- return e.__headerState !== this.__headerState || e.__width !== this.__width || e.__colSpan !== this.__colSpan || e.__rowSpan !== this.__rowSpan || e.__backgroundColor !== this.__backgroundColor || e.__verticalAlign !== this.__verticalAlign;
106
- }
107
- isShadowRoot() {
108
- return !0;
109
- }
110
- collapseAtStart() {
111
- return !0;
112
- }
113
- canBeEmpty() {
114
- return !1;
115
- }
116
- canIndent() {
117
- return !1;
118
- }
119
- }
120
- function Ie(n) {
121
- return n === "middle" || n === "bottom";
122
- }
123
- function St(n) {
124
- const e = n, t = n.nodeName.toLowerCase();
125
- let o;
126
- ie.test(e.style.width) && (o = parseFloat(e.style.width));
127
- let l = H.NO_STATUS;
128
- t === "th" && (l = e.getAttribute("scope") === "col" ? H.COLUMN : H.ROW);
129
- const s = V(l, e.colSpan, o);
130
- s.__rowSpan = e.rowSpan;
131
- const r = e.style.backgroundColor;
132
- r !== "" && (s.__backgroundColor = r);
133
- const i = e.style.verticalAlign;
134
- Ie(i) && (s.__verticalAlign = i);
135
- const u = e.style, f = (u && u.textDecoration || "").split(" "), h = u.fontWeight === "700" || u.fontWeight === "bold", p = f.includes("line-through"), m = u.fontStyle === "italic", a = f.includes("underline");
136
- return { after: (c) => {
137
- const g = [];
138
- let d = null;
139
- const C = () => {
140
- if (d) {
141
- const _ = d.getFirstChild();
142
- dt(_) && d.getChildrenSize() === 1 && _.remove();
143
- }
144
- };
145
- for (const _ of c) Zt(_) || Se(_) || dt(_) ? (Se(_) && (h && _.toggleFormat("bold"), p && _.toggleFormat("strikethrough"), m && _.toggleFormat("italic"), a && _.toggleFormat("underline")), d ? d.append(_) : (d = J().append(_), g.push(d))) : (g.push(_), C(), d = null);
146
- return C(), g.length === 0 && g.push(J()), g;
147
- }, node: s };
148
- }
149
- function V(n = H.NO_STATUS, e = 1, t) {
150
- return tt(new he(n, e, t));
151
- }
152
- function y(n) {
153
- return n instanceof he;
154
- }
155
- const zn = an("INSERT_TABLE_COMMAND");
156
- function b(n, ...e) {
157
- const t = new URL("https://lexical.dev/docs/error"), o = new URLSearchParams();
158
- o.append("code", n);
159
- for (const l of e) o.append("v", l);
160
- throw t.search = o.toString(), Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
161
- }
162
- class Fe extends et {
163
- __height;
164
- static getType() {
165
- return "tablerow";
166
- }
167
- static clone(e) {
168
- return new Fe(e.__height, e.__key);
169
- }
170
- static importDOM() {
171
- return { tr: (e) => ({ conversion: Wn, priority: 0 }) };
172
- }
173
- static importJSON(e) {
174
- return ve().updateFromJSON(e);
175
- }
176
- updateFromJSON(e) {
177
- return super.updateFromJSON(e).setHeight(e.height);
178
- }
179
- constructor(e, t) {
180
- super(t), this.__height = e;
181
- }
182
- exportJSON() {
183
- const e = this.getHeight();
184
- return { ...super.exportJSON(), ...e === void 0 ? void 0 : { height: e } };
185
- }
186
- createDOM(e) {
187
- const t = document.createElement("tr");
188
- return this.__height && (t.style.height = `${this.__height}px`), G(t, e.theme.tableRow), t;
189
- }
190
- extractWithChild(e, t, o) {
191
- return o === "html";
192
- }
193
- isShadowRoot() {
194
- return !0;
195
- }
196
- setHeight(e) {
197
- const t = this.getWritable();
198
- return t.__height = e, t;
199
- }
200
- getHeight() {
201
- return this.getLatest().__height;
202
- }
203
- updateDOM(e) {
204
- return e.__height !== this.__height;
205
- }
206
- canBeEmpty() {
207
- return !1;
208
- }
209
- canIndent() {
210
- return !1;
211
- }
212
- }
213
- function Wn(n) {
214
- const e = n;
215
- let t;
216
- return ie.test(e.style.height) && (t = parseFloat(e.style.height)), { after: (o) => Rt(o, y), node: ve(t) };
217
- }
218
- function ve(n) {
219
- return tt(new Fe(n));
220
- }
221
- function z(n) {
222
- return n instanceof Fe;
223
- }
224
- const lt = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Pn = lt && "documentMode" in document ? document.documentMode : null, wt = lt && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);
225
- function Ln(n, e, t = !0) {
226
- const o = ct();
227
- for (let l = 0; l < n; l++) {
228
- const s = ve();
229
- for (let r = 0; r < e; r++) {
230
- let i = H.NO_STATUS;
231
- typeof t == "object" ? (l === 0 && t.rows && (i |= H.ROW), r === 0 && t.columns && (i |= H.COLUMN)) : t && (l === 0 && (i |= H.ROW), r === 0 && (i |= H.COLUMN));
232
- const u = V(i), f = J();
233
- f.append(nt()), u.append(f), s.append(u);
234
- }
235
- o.append(s);
236
- }
237
- return o;
238
- }
239
- function uo(n) {
240
- const e = T(n, (t) => y(t));
241
- return y(e) ? e : null;
242
- }
243
- function kt(n) {
244
- const e = T(n, (t) => z(t));
245
- if (z(e)) return e;
246
- throw new Error("Expected table cell to be inside of table row.");
247
- }
248
- function st(n) {
249
- const e = T(n, (t) => M(t));
250
- if (M(e)) return e;
251
- throw new Error("Expected table cell to be inside of table.");
252
- }
253
- function ho(n) {
254
- const e = kt(n);
255
- return st(e).getChildren().findIndex((t) => t.is(e));
256
- }
257
- function fo(n) {
258
- return kt(n).getChildren().findIndex((e) => e.is(n));
259
- }
260
- lt && "InputEvent" in window && !Pn && new window.InputEvent("input");
261
- const Je = (n, e) => n === H.BOTH || n === e ? e : H.NO_STATUS;
262
- function go(n = !0) {
263
- const e = L();
264
- P(e) || K(e) || b(188);
265
- const t = e.anchor.getNode(), o = e.focus.getNode(), [l] = D(t), [s, , r] = D(o), [, i, u] = I(r, s, l), { startRow: f } = u, { startRow: h } = i;
266
- return n ? Ue(f + l.__rowSpan > h + s.__rowSpan ? l : s, !0) : Ue(h < f ? s : l, !1);
267
- }
268
- function Ue(n, e = !0) {
269
- const [, , t] = D(n), [o, l] = I(t, n, n), s = o[0].length, { startRow: r } = l;
270
- let i = null;
271
- if (e) {
272
- const u = r + n.__rowSpan - 1, f = o[u], h = ve();
273
- for (let m = 0; m < s; m++) {
274
- const { cell: a, startRow: c } = f[m];
275
- if (c + a.__rowSpan - 1 <= u) {
276
- const g = f[m].cell.__headerState, d = Je(g, H.COLUMN);
277
- h.append(V(d).append(J()));
278
- } else a.setRowSpan(a.__rowSpan + 1);
279
- }
280
- const p = t.getChildAtIndex(u);
281
- z(p) || b(256), p.insertAfter(h), i = h;
282
- } else {
283
- const u = r, f = o[u], h = ve();
284
- for (let m = 0; m < s; m++) {
285
- const { cell: a, startRow: c } = f[m];
286
- if (c === u) {
287
- const g = f[m].cell.__headerState, d = Je(g, H.COLUMN);
288
- h.append(V(d).append(J()));
289
- } else a.setRowSpan(a.__rowSpan + 1);
290
- }
291
- const p = t.getChildAtIndex(u);
292
- z(p) || b(257), p.insertBefore(h), i = h;
293
- }
294
- return i;
295
- }
296
- function po(n = !0) {
297
- const e = L();
298
- P(e) || K(e) || b(188);
299
- const t = e.anchor.getNode(), o = e.focus.getNode(), [l] = D(t), [s, , r] = D(o), [, i, u] = I(r, s, l), { startColumn: f } = u, { startColumn: h } = i;
300
- return n ? Ye(f + l.__colSpan > h + s.__colSpan ? l : s, !0) : Ye(h < f ? s : l, !1);
301
- }
302
- function Ye(n, e = !0, t = !0) {
303
- const [, , o] = D(n), [l, s] = I(o, n, n), r = l.length, { startColumn: i } = s, u = e ? i + n.__colSpan - 1 : i - 1, f = o.getFirstChild();
304
- z(f) || b(120);
305
- let h = null;
306
- function p(c = H.NO_STATUS) {
307
- const g = V(c).append(J());
308
- return h === null && (h = g), g;
309
- }
310
- let m = f;
311
- e: for (let c = 0; c < r; c++) {
312
- if (c !== 0) {
313
- const w = m.getNextSibling();
314
- z(w) || b(121), m = w;
315
- }
316
- const g = l[c], d = g[u < 0 ? 0 : u].cell.__headerState, C = Je(d, H.ROW);
317
- if (u < 0) {
318
- Et(m, p(C));
319
- continue;
320
- }
321
- const { cell: _, startColumn: S, startRow: N } = g[u];
322
- if (S + _.__colSpan - 1 <= u) {
323
- let w = _, x = N, v = u;
324
- for (; x !== c && w.__rowSpan > 1; ) {
325
- if (v -= _.__colSpan, !(v >= 0)) {
326
- m.append(p(C));
327
- continue e;
328
- }
329
- {
330
- const { cell: O, startRow: R } = g[v];
331
- w = O, x = R;
332
- }
333
- }
334
- w.insertAfter(p(C));
335
- } else _.setColSpan(_.__colSpan + 1);
336
- }
337
- h !== null && t && Xe(h);
338
- const a = o.getColWidths();
339
- if (a) {
340
- const c = [...a], g = u < 0 ? 0 : u, d = c[g];
341
- c.splice(g, 0, d), o.setColWidths(c);
342
- }
343
- return h;
344
- }
345
- function mo() {
346
- const n = L();
347
- P(n) || K(n) || b(188);
348
- const e = n.anchor.getNode(), t = n.focus.getNode(), [o, , l] = D(e), [s] = D(t), [r, i, u] = I(l, o, s), { startColumn: f } = i, { startRow: h, startColumn: p } = u, m = Math.min(f, p), a = Math.max(f + o.__colSpan - 1, p + s.__colSpan - 1), c = a - m + 1;
349
- if (r[0].length === a - m + 1) return l.selectPrevious(), void l.remove();
350
- const g = r.length;
351
- for (let S = 0; S < g; S++) for (let N = m; N <= a; N++) {
352
- const { cell: w, startColumn: x } = r[S][N];
353
- if (x < m) {
354
- if (N === m) {
355
- const v = m - x;
356
- w.setColSpan(w.__colSpan - Math.min(c, w.__colSpan - v));
357
- }
358
- } else if (x + w.__colSpan - 1 > a) {
359
- if (N === a) {
360
- const v = a - x + 1;
361
- w.setColSpan(w.__colSpan - v);
362
- }
363
- } else w.remove();
364
- }
365
- const d = r[h], C = f > p ? d[f + o.__colSpan] : d[p + s.__colSpan];
366
- if (C !== void 0) {
367
- const { cell: S } = C;
368
- Xe(S);
369
- } else {
370
- const S = p < f ? d[p - 1] : d[f - 1], { cell: N } = S;
371
- Xe(N);
372
- }
373
- const _ = l.getColWidths();
374
- if (_) {
375
- const S = [..._];
376
- S.splice(m, c), l.setColWidths(S);
377
- }
378
- }
379
- function Xe(n) {
380
- const e = n.getFirstDescendant();
381
- e == null ? n.selectStart() : e.getParentOrThrow().selectStart();
382
- }
383
- function Et(n, e) {
384
- const t = n.getFirstChild();
385
- t !== null ? t.insertBefore(e) : n.append(e);
386
- }
387
- function Hn(n) {
388
- if (n.length === 0) return null;
389
- const e = st(n[0]), [t] = oe(e, null, null);
390
- let o = 1 / 0, l = -1 / 0, s = 1 / 0, r = -1 / 0;
391
- const i = /* @__PURE__ */ new Set();
392
- for (const a of t) for (const c of a) {
393
- if (!c || !c.cell) continue;
394
- const g = c.cell.getKey();
395
- if (!i.has(g) && n.some((d) => d.is(c.cell))) {
396
- i.add(g);
397
- const d = c.startRow, C = c.startColumn, _ = c.cell.__rowSpan || 1, S = c.cell.__colSpan || 1;
398
- o = Math.min(o, d), l = Math.max(l, d + _ - 1), s = Math.min(s, C), r = Math.max(r, C + S - 1);
399
- }
400
- }
401
- if (o === 1 / 0 || s === 1 / 0) return null;
402
- const u = l - o + 1, f = r - s + 1, h = t[o][s];
403
- if (!h.cell) return null;
404
- const p = h.cell;
405
- p.setColSpan(f), p.setRowSpan(u);
406
- const m = /* @__PURE__ */ new Set([p.getKey()]);
407
- for (let a = o; a <= l; a++) for (let c = s; c <= r; c++) {
408
- const g = t[a][c];
409
- if (!g.cell) continue;
410
- const d = g.cell, C = d.getKey();
411
- m.has(C) || (m.add(C), Bn(d) || p.append(...d.getChildren()), d.remove());
412
- }
413
- return p.getChildrenSize() === 0 && p.append(J()), p;
414
- }
415
- function Bn(n) {
416
- if (n.getChildrenSize() !== 1) return !1;
417
- const e = n.getFirstChildOrThrow();
418
- return !(!rt(e) || !e.isEmpty());
419
- }
420
- function Dn(n) {
421
- const [e, t, o] = D(n), l = e.__colSpan, s = e.__rowSpan;
422
- if (l === 1 && s === 1) return;
423
- const [r, i] = I(o, e, e), { startColumn: u, startRow: f } = i, h = e.__headerState & H.COLUMN, p = Array.from({ length: l }, (c, g) => {
424
- let d = h;
425
- for (let C = 0; d !== 0 && C < r.length; C++) d &= r[C][g + u].cell.__headerState;
426
- return d;
427
- }), m = e.__headerState & H.ROW, a = Array.from({ length: s }, (c, g) => {
428
- let d = m;
429
- for (let C = 0; d !== 0 && C < r[0].length; C++) d &= r[g + f][C].cell.__headerState;
430
- return d;
431
- });
432
- if (l > 1) {
433
- for (let c = 1; c < l; c++) e.insertAfter(V(p[c] | a[0]).append(J()));
434
- e.setColSpan(1);
435
- }
436
- if (s > 1) {
437
- let c;
438
- for (let g = 1; g < s; g++) {
439
- const d = f + g, C = r[d];
440
- c = (c || t).getNextSibling(), z(c) || b(125);
441
- let _ = null;
442
- for (let S = 0; S < u; S++) {
443
- const N = C[S], w = N.cell;
444
- N.startRow === d && (_ = w), w.__colSpan > 1 && (S += w.__colSpan - 1);
445
- }
446
- if (_ === null) for (let S = l - 1; S >= 0; S--) Et(c, V(p[S] | a[g]).append(J()));
447
- else for (let S = l - 1; S >= 0; S--) _.insertAfter(V(p[S] | a[g]).append(J()));
448
- }
449
- e.setRowSpan(1);
450
- }
451
- }
452
- function I(n, e, t) {
453
- const [o, l, s] = oe(n, e, t);
454
- return l === null && b(207), s === null && b(208), [o, l, s];
455
- }
456
- function oe(n, e, t) {
457
- const o = [];
458
- let l = null, s = null;
459
- function r(u) {
460
- let f = o[u];
461
- return f === void 0 && (o[u] = f = []), f;
462
- }
463
- const i = n.getChildren();
464
- for (let u = 0; u < i.length; u++) {
465
- const f = i[u];
466
- z(f) || b(209);
467
- const h = r(u);
468
- for (let p = f.getFirstChild(), m = 0; p != null; p = p.getNextSibling()) {
469
- for (y(p) || b(147); h[m] !== void 0; ) m++;
470
- const a = { cell: p, startColumn: m, startRow: u }, { __rowSpan: c, __colSpan: g } = p;
471
- for (let d = 0; d < c && !(u + d >= i.length); d++) {
472
- const C = r(u + d);
473
- for (let _ = 0; _ < g; _++) C[m + _] = a;
474
- }
475
- e !== null && l === null && e.is(p) && (l = a), t !== null && s === null && t.is(p) && (s = a);
476
- }
477
- }
478
- return [o, l, s];
479
- }
480
- function D(n) {
481
- let e;
482
- if (n instanceof he) e = n;
483
- else if ("__type" in n) {
484
- const l = T(n, y);
485
- y(l) || b(148), e = l;
486
- } else {
487
- const l = T(n.getNode(), y);
488
- y(l) || b(148), e = l;
489
- }
490
- const t = e.getParent();
491
- z(t) || b(149);
492
- const o = t.getParent();
493
- return M(o) || b(210), [e, t, o];
494
- }
495
- function Ee(n, e, t) {
496
- let o, l = Math.min(e.startColumn, t.startColumn), s = Math.min(e.startRow, t.startRow), r = Math.max(e.startColumn + e.cell.__colSpan - 1, t.startColumn + t.cell.__colSpan - 1), i = Math.max(e.startRow + e.cell.__rowSpan - 1, t.startRow + t.cell.__rowSpan - 1);
497
- do {
498
- o = !1;
499
- for (let u = 0; u < n.length; u++) for (let f = 0; f < n[0].length; f++) {
500
- const h = n[u][f];
501
- if (!h) continue;
502
- const p = h.startColumn + h.cell.__colSpan - 1, m = h.startRow + h.cell.__rowSpan - 1, a = h.startColumn <= r && p >= l, c = h.startRow <= i && m >= s;
503
- if (a && c) {
504
- const g = Math.min(l, h.startColumn), d = Math.max(r, p), C = Math.min(s, h.startRow), _ = Math.max(i, m);
505
- g === l && d === r && C === s && _ === i || (l = g, r = d, s = C, i = _, o = !0);
506
- }
507
- }
508
- } while (o);
509
- return { maxColumn: r, maxRow: i, minColumn: l, minRow: s };
510
- }
511
- function qe(n) {
512
- const [e, , t] = D(n), o = t.getChildren(), l = o.length, s = o[0].getChildren().length, r = new Array(l);
513
- for (let i = 0; i < l; i++) r[i] = new Array(s);
514
- for (let i = 0; i < l; i++) {
515
- const u = o[i].getChildren();
516
- let f = 0;
517
- for (let h = 0; h < u.length; h++) {
518
- for (; r[i][f]; ) f++;
519
- const p = u[h], m = p.__rowSpan || 1, a = p.__colSpan || 1;
520
- for (let c = 0; c < m; c++) for (let g = 0; g < a; g++) r[i + c][f + g] = p;
521
- if (e === p) return { colSpan: a, columnIndex: f, rowIndex: i, rowSpan: m };
522
- f += a;
523
- }
524
- }
525
- return null;
526
- }
527
- function yt(n) {
528
- const [[e, t, o, l], [s, r, i, u]] = ["anchor", "focus"].map((f) => {
529
- const h = n[f].getNode(), p = T(h, y);
530
- y(p) || b(238, f, h.getKey(), h.getType());
531
- const m = p.getParent();
532
- z(m) || b(239, f);
533
- const a = m.getParent();
534
- return M(a) || b(240, f), [h, p, m, a];
535
- });
536
- return l.is(u) || b(241), { anchorCell: t, anchorNode: e, anchorRow: o, anchorTable: l, focusCell: r, focusNode: s, focusRow: i, focusTable: u };
537
- }
538
- class ze {
539
- tableKey;
540
- anchor;
541
- focus;
542
- _cachedNodes;
543
- dirty;
544
- constructor(e, t, o) {
545
- this.anchor = t, this.focus = o, t._selection = this, o._selection = this, this._cachedNodes = null, this.dirty = !1, this.tableKey = e;
546
- }
547
- getStartEndPoints() {
548
- return [this.anchor, this.focus];
549
- }
550
- isValid() {
551
- if (this.tableKey === "root" || this.anchor.key === "root" || this.anchor.type !== "element" || this.focus.key === "root" || this.focus.type !== "element") return !1;
552
- const e = ae(this.tableKey), t = ae(this.anchor.key), o = ae(this.focus.key);
553
- return e !== null && t !== null && o !== null;
554
- }
555
- isBackward() {
556
- return this.focus.isBefore(this.anchor);
557
- }
558
- getCachedNodes() {
559
- return this._cachedNodes;
560
- }
561
- setCachedNodes(e) {
562
- this._cachedNodes = e;
563
- }
564
- is(e) {
565
- return K(e) && this.tableKey === e.tableKey && this.anchor.is(e.anchor) && this.focus.is(e.focus);
566
- }
567
- set(e, t, o) {
568
- this.dirty = this.dirty || e !== this.tableKey || t !== this.anchor.key || o !== this.focus.key, this.tableKey = e, this.anchor.key = t, this.focus.key = o, this._cachedNodes = null;
569
- }
570
- clone() {
571
- return new ze(this.tableKey, ke(this.anchor.key, this.anchor.offset, this.anchor.type), ke(this.focus.key, this.focus.offset, this.focus.type));
572
- }
573
- isCollapsed() {
574
- return !1;
575
- }
576
- extract() {
577
- return this.getNodes();
578
- }
579
- insertRawText(e) {
580
- }
581
- insertText() {
582
- }
583
- hasFormat(e) {
584
- let t = 0;
585
- this.getNodes().filter(y).forEach((l) => {
586
- const s = l.getFirstChild();
587
- rt(s) && (t |= s.getTextFormat());
588
- });
589
- const o = tn[e];
590
- return (t & o) !== 0;
591
- }
592
- insertNodes(e) {
593
- const t = this.focus.getNode();
594
- B(t) || b(151), Qt(t.select(0, t.getChildrenSize())).insertNodes(e);
595
- }
596
- getShape() {
597
- const { anchorCell: e, focusCell: t } = yt(this), o = qe(e);
598
- o === null && b(153);
599
- const l = qe(t);
600
- l === null && b(155);
601
- const s = Math.min(o.columnIndex, l.columnIndex), r = Math.max(o.columnIndex + o.colSpan - 1, l.columnIndex + l.colSpan - 1), i = Math.min(o.rowIndex, l.rowIndex), u = Math.max(o.rowIndex + o.rowSpan - 1, l.rowIndex + l.rowSpan - 1);
602
- return { fromX: Math.min(s, r), fromY: Math.min(i, u), toX: Math.max(s, r), toY: Math.max(i, u) };
603
- }
604
- getNodes() {
605
- if (!this.isValid()) return [];
606
- const e = this._cachedNodes;
607
- if (e !== null) return e;
608
- const { anchorTable: t, anchorCell: o, focusCell: l } = yt(this), s = l.getParents()[1];
609
- if (s !== t) {
610
- if (t.isParentOf(l)) {
611
- const d = s.getParent();
612
- d == null && b(159), this.set(this.tableKey, l.getKey(), d.getKey());
613
- } else {
614
- const d = t.getParent();
615
- d == null && b(158), this.set(this.tableKey, d.getKey(), l.getKey());
616
- }
617
- return this.getNodes();
618
- }
619
- const [r, i, u] = I(t, o, l), { minColumn: f, maxColumn: h, minRow: p, maxRow: m } = Ee(r, i, u), a = /* @__PURE__ */ new Map([[t.getKey(), t]]);
620
- let c = null;
621
- for (let d = p; d <= m; d++) for (let C = f; C <= h; C++) {
622
- const { cell: _ } = r[d][C], S = _.getParent();
623
- z(S) || b(160), S !== c && (a.set(S.getKey(), S), c = S), a.has(_.getKey()) || Jn(_, (N) => {
624
- a.set(N.getKey(), N);
625
- });
626
- }
627
- const g = Array.from(a.values());
628
- return en() || (this._cachedNodes = g), g;
629
- }
630
- getTextContent() {
631
- const e = this.getNodes().filter((o) => y(o));
632
- let t = "";
633
- for (let o = 0; o < e.length; o++) {
634
- const l = e[o], s = l.__parent, r = (e[o + 1] || {}).__parent;
635
- t += l.getTextContent() + (r !== s ? `
636
- ` : " ");
637
- }
638
- return t;
639
- }
640
- }
641
- function K(n) {
642
- return n instanceof ze;
643
- }
644
- function In() {
645
- const n = ke("root", 0, "element"), e = ke("root", 0, "element");
646
- return new ze("root", n, e);
647
- }
648
- function Ve(n, e, t) {
649
- n.getKey(), e.getKey(), t.getKey();
650
- const o = L(), l = K(o) ? o.clone() : In();
651
- return l.set(n.getKey(), e.getKey(), t.getKey()), l;
652
- }
653
- function Jn(n, e) {
654
- const t = [[n]];
655
- for (let o = t.at(-1); o !== void 0 && t.length > 0; o = t.at(-1)) {
656
- const l = o.pop();
657
- l === void 0 ? t.pop() : e(l) !== !1 && B(l) && t.push(l.getChildren());
658
- }
659
- }
660
- function Mt(n, e = ot()) {
661
- const t = ae(n);
662
- M(t) || b(231, n);
663
- const o = ce(t, e.getElementByKey(n));
664
- return o === null && b(232, n), { tableElement: o, tableNode: t };
665
- }
666
- class Un {
667
- focusX;
668
- focusY;
669
- listenersToRemove;
670
- table;
671
- isHighlightingCells;
672
- anchorX;
673
- anchorY;
674
- tableNodeKey;
675
- anchorCell;
676
- focusCell;
677
- anchorCellNodeKey;
678
- focusCellNodeKey;
679
- editor;
680
- tableSelection;
681
- hasHijackedSelectionStyles;
682
- isSelecting;
683
- pointerType;
684
- shouldCheckSelection;
685
- abortController;
686
- listenerOptions;
687
- nextFocus;
688
- constructor(e, t) {
689
- this.isHighlightingCells = !1, this.anchorX = -1, this.anchorY = -1, this.focusX = -1, this.focusY = -1, this.listenersToRemove = /* @__PURE__ */ new Set(), this.tableNodeKey = t, this.editor = e, this.table = { columns: 0, domRows: [], rows: 0 }, this.tableSelection = null, this.anchorCellNodeKey = null, this.focusCellNodeKey = null, this.anchorCell = null, this.focusCell = null, this.hasHijackedSelectionStyles = !1, this.isSelecting = !1, this.pointerType = null, this.shouldCheckSelection = !1, this.abortController = new AbortController(), this.listenerOptions = { signal: this.abortController.signal }, this.nextFocus = null, this.trackTable();
690
- }
691
- getTable() {
692
- return this.table;
693
- }
694
- removeListeners() {
695
- this.abortController.abort("removeListeners"), Array.from(this.listenersToRemove).forEach((e) => e()), this.listenersToRemove.clear();
696
- }
697
- $lookup() {
698
- return Mt(this.tableNodeKey, this.editor);
699
- }
700
- trackTable() {
701
- const e = new MutationObserver((t) => {
702
- this.editor.getEditorState().read(() => {
703
- let o = !1;
704
- for (let r = 0; r < t.length; r++) {
705
- const i = t[r].target.nodeName;
706
- if (i === "TABLE" || i === "TBODY" || i === "THEAD" || i === "TR") {
707
- o = !0;
708
- break;
709
- }
710
- }
711
- if (!o) return;
712
- const { tableNode: l, tableElement: s } = this.$lookup();
713
- this.table = Ce(l, s);
714
- }, { editor: this.editor });
715
- });
716
- this.editor.getEditorState().read(() => {
717
- const { tableNode: t, tableElement: o } = this.$lookup();
718
- this.table = Ce(t, o), e.observe(o, { attributes: !0, childList: !0, subtree: !0 });
719
- }, { editor: this.editor });
720
- }
721
- $clearHighlight() {
722
- const e = this.editor;
723
- this.isHighlightingCells = !1, this.anchorX = -1, this.anchorY = -1, this.focusX = -1, this.focusY = -1, this.tableSelection = null, this.anchorCellNodeKey = null, this.focusCellNodeKey = null, this.anchorCell = null, this.focusCell = null, this.hasHijackedSelectionStyles = !1, this.$enableHighlightStyle();
724
- const { tableNode: t, tableElement: o } = this.$lookup();
725
- Ke(e, Ce(t, o), null), L() !== null && (ne(null), e.dispatchCommand(pe, void 0));
726
- }
727
- $enableHighlightStyle() {
728
- const e = this.editor, { tableElement: t } = this.$lookup();
729
- me(t, e._config.theme.tableSelection), t.classList.remove("disable-selection"), this.hasHijackedSelectionStyles = !1;
730
- }
731
- $disableHighlightStyle() {
732
- const { tableElement: e } = this.$lookup();
733
- G(e, this.editor._config.theme.tableSelection), this.hasHijackedSelectionStyles = !0;
734
- }
735
- $updateTableTableSelection(e) {
736
- if (e !== null) {
737
- e.tableKey !== this.tableNodeKey && b(233, e.tableKey, this.tableNodeKey);
738
- const t = this.editor;
739
- this.tableSelection = e, this.isHighlightingCells = !0, this.$disableHighlightStyle(), this.updateDOMSelection(), Ke(t, this.table, this.tableSelection);
740
- } else this.$clearHighlight();
741
- }
742
- setShouldCheckSelection() {
743
- this.shouldCheckSelection = !0;
744
- }
745
- getAndClearShouldCheckSelection() {
746
- return !!this.shouldCheckSelection && (this.shouldCheckSelection = !1, !0);
747
- }
748
- setNextFocus(e) {
749
- this.nextFocus = e;
750
- }
751
- getAndClearNextFocus() {
752
- const { nextFocus: e } = this;
753
- return e !== null && (this.nextFocus = null), e;
754
- }
755
- updateDOMSelection() {
756
- if (this.anchorCell !== null && this.focusCell !== null) {
757
- const e = $e(this.editor._window);
758
- e && e.rangeCount > 0 && e.removeAllRanges();
759
- }
760
- }
761
- $setFocusCellForSelection(e, t = !1) {
762
- const o = this.editor, { tableNode: l } = this.$lookup(), s = e.x, r = e.y;
763
- if (this.focusCell = e, !this.isHighlightingCells && (t || this.anchorX !== s || this.anchorY !== r || this.tableSelection != null && this.anchorCellNodeKey != null) && (this.isHighlightingCells = !0, this.$disableHighlightStyle()), this.focusX !== -1 && this.focusY !== -1 && s === this.focusX && r === this.focusY) return !1;
764
- if (this.focusX = s, this.focusY = r, this.isHighlightingCells) {
765
- const i = Ze(l, e.elem);
766
- if (this.tableSelection != null && this.anchorCellNodeKey != null) {
767
- let u = i;
768
- if (u === null && t && (u = l.getCellNodeFromCords(s, r, this.table)), u !== null) {
769
- const f = this.$getAnchorTableCellOrThrow();
770
- return this.focusCellNodeKey = u.getKey(), this.tableSelection = Ve(l, f, u), ne(this.tableSelection), o.dispatchCommand(pe, void 0), Ke(o, this.table, this.tableSelection), !0;
771
- }
772
- }
773
- }
774
- return !1;
775
- }
776
- $getAnchorTableCell() {
777
- return this.anchorCellNodeKey ? ae(this.anchorCellNodeKey) : null;
778
- }
779
- $getAnchorTableCellOrThrow() {
780
- const e = this.$getAnchorTableCell();
781
- return e === null && b(234), e;
782
- }
783
- $getFocusTableCell() {
784
- return this.focusCellNodeKey ? ae(this.focusCellNodeKey) : null;
785
- }
786
- $getFocusTableCellOrThrow() {
787
- const e = this.$getFocusTableCell();
788
- return e === null && b(235), e;
789
- }
790
- $setAnchorCellForSelection(e) {
791
- this.isHighlightingCells = !1, this.anchorCell = e, this.anchorX = e.x, this.anchorY = e.y, this.focusX = -1, this.focusY = -1, this.focusCell = null, this.focusCellNodeKey = null;
792
- const { tableNode: t } = this.$lookup(), o = Ze(t, e.elem);
793
- if (o !== null) {
794
- const l = o.getKey();
795
- this.tableSelection != null ? (this.tableSelection = this.tableSelection.clone(), this.tableSelection.set(t.getKey(), l, l)) : this.tableSelection = Ve(t, o, o), this.anchorCellNodeKey = l;
796
- }
797
- }
798
- $formatCells(e) {
799
- const t = L();
800
- K(t) || b(236);
801
- const o = Fn(), l = o.anchor, s = o.focus, r = t.getNodes().filter(y);
802
- r.length > 0 || b(237);
803
- const i = r[0].getFirstChild(), u = rt(i) ? i.getFormatFlags(e, null) : null;
804
- r.forEach((f) => {
805
- l.set(f.getKey(), 0, "element"), s.set(f.getKey(), f.getChildrenSize(), "element"), o.formatText(e, u);
806
- }), ne(t), this.editor.dispatchCommand(pe, void 0);
807
- }
808
- $clearText() {
809
- const { editor: e } = this, t = ae(this.tableNodeKey);
810
- if (!M(t)) throw new Error("Expected TableNode.");
811
- const o = L();
812
- K(o) || b(253);
813
- const l = o.getNodes().filter(y), s = t.getFirstChild(), r = t.getLastChild();
814
- if (l.length > 0 && s !== null && r !== null && z(s) && z(r) && l[0] === s.getFirstChild() && l[l.length - 1] === r.getLastChild()) {
815
- t.selectPrevious();
816
- const i = t.getParent();
817
- return t.remove(), void (Tn(i) && i.isEmpty() && e.dispatchCommand(Ot, void 0));
818
- }
819
- l.forEach((i) => {
820
- if (B(i)) {
821
- const u = J(), f = nt();
822
- u.append(f), i.append(u), i.getChildren().forEach((h) => {
823
- h !== u && h.remove();
824
- });
825
- }
826
- }), Ke(e, this.table, null), ne(null), e.dispatchCommand(pe, void 0);
827
- }
828
- }
829
- const je = "__lexicalTableSelection";
830
- function ge(n) {
831
- return Ne(n) && n.nodeName === "TABLE";
832
- }
833
- function ce(n, e) {
834
- if (!e) return e;
835
- const t = ge(e) ? e : n.getDOMSlot(e).element;
836
- return t.nodeName !== "TABLE" && b(245, e.nodeName), t;
837
- }
838
- function it(n) {
839
- return n._window;
840
- }
841
- function xe(n, e) {
842
- for (let t = e, o = null; t !== null; t = t.getParent()) {
843
- if (n.is(t)) return o;
844
- y(t) && (o = t);
845
- }
846
- return null;
847
- }
848
- const Yn = [[un, "down"], [hn, "up"], [fn, "backward"], [dn, "forward"]], Xn = [pn, At, mn], qn = [Cn, _n];
849
- function Vn(n, e, t, o) {
850
- const l = t.getRootElement(), s = it(t);
851
- l !== null && s !== null || b(246);
852
- const r = new Un(t, n.getKey()), i = ce(n, e);
853
- (function(a, c) {
854
- bt(a) !== null && b(205), a[je] = c;
855
- })(i, r), r.listenersToRemove.add(() => (function(a, c) {
856
- bt(a) === c && delete a[je];
857
- })(i, r));
858
- const u = (a) => {
859
- if (r.pointerType = a.pointerType, a.button !== 0 || !be(a.target) || !s) return;
860
- const c = Me(a.target);
861
- c !== null && t.update(() => {
862
- const g = De();
863
- if (wt && a.shiftKey && ee(g, n) && (P(g) || K(g))) {
864
- const d = g.anchor.getNode(), C = xe(n, g.anchor.getNode());
865
- C ? (r.$setAnchorCellForSelection(se(r, C)), r.$setFocusCellForSelection(c), te(a)) : (n.isBefore(d) ? n.selectStart() : n.selectEnd()).anchor.set(g.anchor.key, g.anchor.offset, g.anchor.type);
866
- } else a.pointerType !== "touch" && r.$setAnchorCellForSelection(c);
867
- }), ((g) => {
868
- if (r.isSelecting) return;
869
- r.isSelecting = !0, g !== null && r.anchorCell === null && t.update(() => {
870
- r.$setAnchorCellForSelection(g);
871
- });
872
- const d = () => {
873
- r.isSelecting = !1, s.removeEventListener("pointerup", d), s.removeEventListener("pointermove", C);
874
- }, C = (_) => {
875
- if (1 & ~_.buttons && r.isSelecting) return r.isSelecting = !1, s.removeEventListener("pointerup", d), void s.removeEventListener("pointermove", C);
876
- if (!be(_.target)) return;
877
- let S = null;
878
- const N = !(wt || i.contains(_.target));
879
- if (N) S = Nt(i, _.target);
880
- else for (const w of document.elementsFromPoint(_.clientX, _.clientY)) if (S = Nt(i, w), S) break;
881
- if (S) {
882
- const w = S;
883
- r.anchorCell === null && t.update(() => {
884
- r.$setAnchorCellForSelection(w);
885
- }), r.focusCell !== null && S.elem === r.focusCell.elem || (r.setNextFocus({ focusCell: S, override: N }), t.dispatchCommand(pe, void 0));
886
- }
887
- };
888
- s.addEventListener("pointerup", d, r.listenerOptions), s.addEventListener("pointermove", C, r.listenerOptions);
889
- })(c);
890
- };
891
- i.addEventListener("pointerdown", u, r.listenerOptions), r.listenersToRemove.add(() => {
892
- i.removeEventListener("pointerdown", u);
893
- });
894
- const f = (a) => {
895
- a.detail >= 3 && be(a.target) && Me(a.target) !== null && a.preventDefault();
896
- };
897
- i.addEventListener("mousedown", f, r.listenerOptions), r.listenersToRemove.add(() => {
898
- i.removeEventListener("mousedown", f);
899
- });
900
- const h = (a) => {
901
- const c = a.target;
902
- a.button === 0 && be(c) && t.update(() => {
903
- const g = L();
904
- K(g) && g.tableKey === r.tableNodeKey && l.contains(c) && r.$clearHighlight();
905
- });
906
- };
907
- s.addEventListener("pointerdown", h, r.listenerOptions), r.listenersToRemove.add(() => {
908
- s.removeEventListener("pointerdown", h);
909
- });
910
- for (const [a, c] of Yn) r.listenersToRemove.add(t.registerCommand(a, (g) => Wt(t, g, c, n, r), X));
911
- r.listenersToRemove.add(t.registerCommand(gn, (a) => {
912
- const c = L();
913
- if (K(c)) {
914
- const g = xe(n, c.focus.getNode());
915
- if (g !== null) return te(a), g.selectEnd(), !0;
916
- }
917
- return !1;
918
- }, X));
919
- const p = (a) => () => {
920
- const c = L();
921
- if (!ee(c, n)) return !1;
922
- if (K(c)) return r.$clearText(), !0;
923
- if (P(c)) {
924
- if (!y(xe(n, c.anchor.getNode()))) return !1;
925
- const g = c.anchor.getNode(), d = c.focus.getNode(), C = n.isParentOf(g), _ = n.isParentOf(d);
926
- if (C && !_ || _ && !C) return r.$clearText(), !0;
927
- const S = T(c.anchor.getNode(), (w) => B(w)), N = S && T(S, (w) => B(w) && y(w.getParent()));
928
- if (!B(N) || !B(S)) return !1;
929
- if (a === At && N.getPreviousSibling() === null) return !0;
930
- }
931
- return !1;
932
- };
933
- for (const a of Xn) r.listenersToRemove.add(t.registerCommand(a, p(a), X));
934
- const m = (a) => {
935
- const c = L();
936
- if (!K(c) && !P(c)) return !1;
937
- const g = n.isParentOf(c.anchor.getNode());
938
- if (g !== n.isParentOf(c.focus.getNode())) {
939
- const d = g ? "anchor" : "focus", C = g ? "focus" : "anchor", { key: _, offset: S, type: N } = c[C];
940
- return n[c[d].isBefore(c[C]) ? "selectPrevious" : "selectNext"]()[C].set(_, S, N), !1;
941
- }
942
- return !!ee(c, n) && !!K(c) && (a && (a.preventDefault(), a.stopPropagation()), r.$clearText(), !0);
943
- };
944
- for (const a of qn) r.listenersToRemove.add(t.registerCommand(a, m, X));
945
- return r.listenersToRemove.add(t.registerCommand(Sn, (a) => {
946
- const c = L();
947
- if (c) {
948
- if (!K(c) && !P(c)) return !1;
949
- Mn(t, jt(a, ClipboardEvent) ? a : null, $n(c));
950
- const g = m(a);
951
- return P(c) ? (c.removeText(), !0) : g;
952
- }
953
- return !1;
954
- }, X)), r.listenersToRemove.add(t.registerCommand(wn, (a) => {
955
- const c = L();
956
- if (!ee(c, n)) return !1;
957
- if (K(c)) return r.$formatCells(a), !0;
958
- if (P(c)) {
959
- const g = T(c.anchor.getNode(), (d) => y(d));
960
- if (!y(g)) return !1;
961
- }
962
- return !1;
963
- }, X)), r.listenersToRemove.add(t.registerCommand(yn, (a) => {
964
- const c = L();
965
- if (!K(c) || !ee(c, n)) return !1;
966
- const g = c.anchor.getNode(), d = c.focus.getNode();
967
- if (!y(g) || !y(d)) return !1;
968
- if ((function(R, $) {
969
- if (K(R)) {
970
- const F = R.anchor.getNode(), A = R.focus.getNode();
971
- if ($ && F && A) {
972
- const [k] = I($, F, A);
973
- return F.getKey() === k[0][0].cell.getKey() && A.getKey() === k[k.length - 1].at(-1).cell.getKey();
974
- }
975
- }
976
- return !1;
977
- })(c, n)) return n.setFormat(a), !0;
978
- const [C, _, S] = I(n, g, d), N = Math.max(_.startRow + _.cell.__rowSpan - 1, S.startRow + S.cell.__rowSpan - 1), w = Math.max(_.startColumn + _.cell.__colSpan - 1, S.startColumn + S.cell.__colSpan - 1), x = Math.min(_.startRow, S.startRow), v = Math.min(_.startColumn, S.startColumn), O = /* @__PURE__ */ new Set();
979
- for (let R = x; R <= N; R++) for (let $ = v; $ <= w; $++) {
980
- const F = C[R][$].cell;
981
- if (O.has(F)) continue;
982
- O.add(F), F.setFormat(a);
983
- const A = F.getChildren();
984
- for (let k = 0; k < A.length; k++) {
985
- const W = A[k];
986
- B(W) && !W.isInline() && W.setFormat(a);
987
- }
988
- }
989
- return !0;
990
- }, X)), r.listenersToRemove.add(t.registerCommand(bn, (a) => {
991
- const c = L();
992
- if (!ee(c, n)) return !1;
993
- if (K(c)) return r.$clearHighlight(), !1;
994
- if (P(c)) {
995
- const g = T(c.anchor.getNode(), (d) => y(d));
996
- if (!y(g)) return !1;
997
- if (typeof a == "string") {
998
- const d = Ft(t, c, n);
999
- if (d) return vt(d, n, [nt(a)]), !0;
1000
- }
1001
- }
1002
- return !1;
1003
- }, X)), o && r.listenersToRemove.add(t.registerCommand(Nn, (a) => {
1004
- const c = L();
1005
- if (!P(c) || !c.isCollapsed() || !ee(c, n)) return !1;
1006
- const g = ye(c.anchor.getNode());
1007
- return !(g === null || !n.is(_e(g))) && (te(a), (function(d, C) {
1008
- const _ = C === "next" ? "getNextSibling" : "getPreviousSibling", S = C === "next" ? "getFirstChild" : "getLastChild", N = d[_]();
1009
- if (B(N)) return N.selectEnd();
1010
- const w = T(d, z);
1011
- w === null && b(247);
1012
- for (let v = w[_](); z(v); v = v[_]()) {
1013
- const O = v[S]();
1014
- if (B(O)) return O.selectEnd();
1015
- }
1016
- const x = T(w, M);
1017
- x === null && b(248), C === "next" ? x.selectNext() : x.selectPrevious();
1018
- })(g, a.shiftKey ? "previous" : "next"), !0);
1019
- }, X)), r.listenersToRemove.add(t.registerCommand(xn, (a) => n.isSelected(), X)), r.listenersToRemove.add(t.registerCommand(pe, () => {
1020
- const a = L(), c = De(), g = r.getAndClearNextFocus();
1021
- if (g !== null) {
1022
- const { focusCell: d } = g;
1023
- if (K(a) && a.tableKey === r.tableNodeKey) return (d.x !== r.focusX || d.y !== r.focusY) && (r.$setFocusCellForSelection(d), !0);
1024
- if (d !== r.anchorCell && r.anchorCell !== null && r.anchorCellNodeKey !== null && r.tableSelection !== null) return r.$setFocusCellForSelection(d, !0), !0;
1025
- }
1026
- if (r.getAndClearShouldCheckSelection() && P(c) && P(a) && a.isCollapsed()) {
1027
- const d = a.anchor.getNode(), C = n.getFirstChild(), _ = ye(d);
1028
- if (_ !== null && z(C)) {
1029
- const S = C.getFirstChild();
1030
- if (y(S) && n.is(T(_, (N) => N.is(n) || N.is(S)))) return S.selectStart(), !0;
1031
- }
1032
- }
1033
- if (P(a)) {
1034
- const { anchor: d, focus: C } = a, _ = d.getNode(), S = C.getNode(), N = ye(_), w = ye(S), x = !(!N || !n.is(_e(N))), v = !(!w || !n.is(_e(w))), O = x !== v, R = x && v, $ = a.isBackward();
1035
- if (O) {
1036
- const F = a.clone();
1037
- if (v) {
1038
- const [A] = I(n, w, w), k = A[0][0].cell, W = A[A.length - 1].at(-1).cell;
1039
- F.focus.set($ ? k.getKey() : W.getKey(), $ ? 0 : W.getChildrenSize(), "element");
1040
- } else if (x) {
1041
- const [A] = I(n, N, N), k = A[0][0].cell, W = A[A.length - 1].at(-1).cell;
1042
- F.anchor.set($ ? W.getKey() : k.getKey(), $ ? W.getChildrenSize() : 0, "element");
1043
- }
1044
- ne(F), xt(t, r);
1045
- } else if (R && (N.is(w) || (r.$setAnchorCellForSelection(se(r, N)), r.$setFocusCellForSelection(se(r, w), !0)), r.pointerType === "touch" && r.isSelecting && a.isCollapsed() && P(c) && c.isCollapsed())) {
1046
- const F = ye(c.anchor.getNode());
1047
- F && !F.is(w) && (r.$setAnchorCellForSelection(se(r, F)), r.$setFocusCellForSelection(se(r, w), !0), r.pointerType = null);
1048
- }
1049
- } else if (a && K(a) && a.is(c) && a.tableKey === n.getKey()) {
1050
- const d = $e(s);
1051
- if (d && d.anchorNode && d.focusNode) {
1052
- const C = re(d.focusNode), _ = C && !n.isParentOf(C), S = re(d.anchorNode), N = S && n.isParentOf(S);
1053
- if (_ && N && d.rangeCount > 0) {
1054
- const w = vn(d, t);
1055
- w && (w.anchor.set(n.getKey(), a.isBackward() ? n.getChildrenSize() : 0, "element"), d.removeAllRanges(), ne(w));
1056
- }
1057
- }
1058
- }
1059
- return a && !a.is(c) && (K(a) || K(c)) && r.tableSelection && !r.tableSelection.is(c) ? (K(a) && a.tableKey === r.tableNodeKey ? r.$updateTableTableSelection(a) : !K(a) && K(c) && c.tableKey === r.tableNodeKey && r.$updateTableTableSelection(null), !1) : (r.hasHijackedSelectionStyles && !n.isSelected() ? (function(d, C) {
1060
- C.$enableHighlightStyle(), at(C.table, (_) => {
1061
- const S = _.elem;
1062
- _.highlighted = !1, zt(d, _), S.getAttribute("style") || S.removeAttribute("style");
1063
- });
1064
- })(t, r) : !r.hasHijackedSelectionStyles && n.isSelected() && xt(t, r), !1);
1065
- }, X)), r.listenersToRemove.add(t.registerCommand(Ot, () => {
1066
- const a = L();
1067
- if (!P(a) || !a.isCollapsed() || !ee(a, n)) return !1;
1068
- const c = Ft(t, a, n);
1069
- return !!c && (vt(c, n), !0);
1070
- }, X)), r;
1071
- }
1072
- function bt(n) {
1073
- return n[je] || null;
1074
- }
1075
- function Me(n) {
1076
- let e = n;
1077
- for (; e != null; ) {
1078
- const t = e.nodeName;
1079
- if (t === "TD" || t === "TH") {
1080
- const o = e._cell;
1081
- return o === void 0 ? null : o;
1082
- }
1083
- e = e.parentNode;
1084
- }
1085
- return null;
1086
- }
1087
- function Nt(n, e) {
1088
- if (!n.contains(e)) return null;
1089
- let t = null;
1090
- for (let o = e; o != null; o = o.parentNode) {
1091
- if (o === n) return t;
1092
- const l = o.nodeName;
1093
- l !== "TD" && l !== "TH" || (t = o._cell || null);
1094
- }
1095
- return null;
1096
- }
1097
- function Ce(n, e) {
1098
- const t = [], o = { columns: 0, domRows: t, rows: 0 };
1099
- let l = ce(n, e).querySelector("tr"), s = 0, r = 0;
1100
- for (t.length = 0; l != null; ) {
1101
- const i = l.nodeName;
1102
- if (i === "TD" || i === "TH") {
1103
- const h = { elem: l, hasBackgroundColor: l.style.backgroundColor !== "", highlighted: !1, x: s, y: r };
1104
- l._cell = h;
1105
- let p = t[r];
1106
- p === void 0 && (p = t[r] = []), p[s] = h;
1107
- } else {
1108
- const h = l.firstChild;
1109
- if (h != null) {
1110
- l = h;
1111
- continue;
1112
- }
1113
- }
1114
- const u = l.nextSibling;
1115
- if (u != null) {
1116
- s++, l = u;
1117
- continue;
1118
- }
1119
- const f = l.parentNode;
1120
- if (f != null) {
1121
- const h = f.nextSibling;
1122
- if (h == null) break;
1123
- r++, s = 0, l = h;
1124
- }
1125
- }
1126
- return o.columns = s + 1, o.rows = r + 1, o;
1127
- }
1128
- function Ke(n, e, t) {
1129
- const o = new Set(t ? t.getNodes() : []);
1130
- at(e, (l, s) => {
1131
- const r = l.elem;
1132
- o.has(s) ? (l.highlighted = !0, $t(n, l)) : (l.highlighted = !1, zt(n, l), r.getAttribute("style") || r.removeAttribute("style"));
1133
- });
1134
- }
1135
- function at(n, e) {
1136
- const { domRows: t } = n;
1137
- for (let o = 0; o < t.length; o++) {
1138
- const l = t[o];
1139
- if (l) for (let s = 0; s < l.length; s++) {
1140
- const r = l[s];
1141
- if (!r) continue;
1142
- const i = re(r.elem);
1143
- i !== null && e(r, i, { x: s, y: o });
1144
- }
1145
- }
1146
- }
1147
- function xt(n, e) {
1148
- e.$disableHighlightStyle(), at(e.table, (t) => {
1149
- t.highlighted = !0, $t(n, t);
1150
- });
1151
- }
1152
- const jn = (n, e, t, o, l) => {
1153
- const s = l === "forward";
1154
- switch (l) {
1155
- case "backward":
1156
- case "forward":
1157
- return t !== (s ? n.table.columns - 1 : 0) ? Oe(e.getCellNodeFromCordsOrThrow(t + (s ? 1 : -1), o, n.table), s) : o !== (s ? n.table.rows - 1 : 0) ? Oe(e.getCellNodeFromCordsOrThrow(s ? 0 : n.table.columns - 1, o + (s ? 1 : -1), n.table), s) : s ? e.selectNext() : e.selectPrevious(), !0;
1158
- case "up":
1159
- return o !== 0 ? Oe(e.getCellNodeFromCordsOrThrow(t, o - 1, n.table), !1) : e.selectPrevious(), !0;
1160
- case "down":
1161
- return o !== n.table.rows - 1 ? Oe(e.getCellNodeFromCordsOrThrow(t, o + 1, n.table), !0) : e.selectNext(), !0;
1162
- default:
1163
- return !1;
1164
- }
1165
- };
1166
- function Be(n, e) {
1167
- let t, o;
1168
- if (e.startColumn === n.minColumn) t = "minColumn";
1169
- else {
1170
- if (e.startColumn + e.cell.__colSpan - 1 !== n.maxColumn) return null;
1171
- t = "maxColumn";
1172
- }
1173
- if (e.startRow === n.minRow) o = "minRow";
1174
- else {
1175
- if (e.startRow + e.cell.__rowSpan - 1 !== n.maxRow) return null;
1176
- o = "maxRow";
1177
- }
1178
- return [t, o];
1179
- }
1180
- function Ae([n, e]) {
1181
- return [n === "minColumn" ? "maxColumn" : "minColumn", e === "minRow" ? "maxRow" : "minRow"];
1182
- }
1183
- function de(n, e, [t, o]) {
1184
- const l = e[o], s = n[l];
1185
- s === void 0 && b(250, o, String(l));
1186
- const r = e[t], i = s[r];
1187
- return i === void 0 && b(250, t, String(r)), i;
1188
- }
1189
- function Zn(n, e, t, o, l) {
1190
- const s = Ee(e, t, o), r = (function(x, v) {
1191
- const { minColumn: O, maxColumn: R, minRow: $, maxRow: F } = v;
1192
- let A = 1, k = 1, W = 1, U = 1;
1193
- const j = x[$], le = x[F];
1194
- for (let q = O; q <= R; q++) A = Math.max(A, j[q].cell.__rowSpan), U = Math.max(U, le[q].cell.__rowSpan);
1195
- for (let q = $; q <= F; q++) k = Math.max(k, x[q][O].cell.__colSpan), W = Math.max(W, x[q][R].cell.__colSpan);
1196
- return { bottomSpan: U, leftSpan: k, rightSpan: W, topSpan: A };
1197
- })(e, s), { topSpan: i, leftSpan: u, bottomSpan: f, rightSpan: h } = r, p = (function(x, v) {
1198
- const O = Be(x, v);
1199
- return O === null && b(249, v.cell.getKey()), O;
1200
- })(s, t), [m, a] = Ae(p);
1201
- let c = s[m], g = s[a];
1202
- l === "forward" ? c += m === "maxColumn" ? 1 : u : l === "backward" ? c -= m === "minColumn" ? 1 : h : l === "down" ? g += a === "maxRow" ? 1 : i : l === "up" && (g -= a === "minRow" ? 1 : f);
1203
- const d = e[g];
1204
- if (d === void 0) return !1;
1205
- const C = d[c];
1206
- if (C === void 0) return !1;
1207
- const [_, S] = (function(x, v, O) {
1208
- const R = Ee(x, v, O), $ = Be(R, v);
1209
- if ($) return [de(x, R, $), de(x, R, Ae($))];
1210
- const F = Be(R, O);
1211
- if (F) return [de(x, R, Ae(F)), de(x, R, F)];
1212
- const A = ["minColumn", "minRow"];
1213
- return [de(x, R, A), de(x, R, Ae(A))];
1214
- })(e, t, C), N = se(n, _.cell), w = se(n, S.cell);
1215
- return n.$setAnchorCellForSelection(N), n.$setFocusCellForSelection(w, !0), !0;
1216
- }
1217
- function ee(n, e) {
1218
- if (P(n) || K(n)) {
1219
- const t = e.isParentOf(n.anchor.getNode()), o = e.isParentOf(n.focus.getNode());
1220
- return t && o;
1221
- }
1222
- return !1;
1223
- }
1224
- function Oe(n, e) {
1225
- e ? n.selectStart() : n.selectEnd();
1226
- }
1227
- function $t(n, e) {
1228
- const t = e.elem, o = n._config.theme;
1229
- y(re(t)) || b(131), G(t, o.tableCellSelected);
1230
- }
1231
- function zt(n, e) {
1232
- const t = e.elem;
1233
- y(re(t)) || b(131);
1234
- const o = n._config.theme;
1235
- me(t, o.tableCellSelected);
1236
- }
1237
- function ye(n) {
1238
- const e = T(n, y);
1239
- return y(e) ? e : null;
1240
- }
1241
- function _e(n) {
1242
- const e = T(n, M);
1243
- return M(e) ? e : null;
1244
- }
1245
- function Gn(n, e, t, o, l, s, r) {
1246
- const i = Kn(t.focus, l ? "previous" : "next");
1247
- if (An(i)) return !1;
1248
- let u = i;
1249
- for (const d of gt(i).iterNodeCarets("shadowRoot")) {
1250
- if (!On(d) || !B(d.origin)) return !1;
1251
- u = d;
1252
- }
1253
- const f = u.getParentAtCaret();
1254
- if (!y(f)) return !1;
1255
- const h = f, p = (function(d) {
1256
- for (const C of gt(d).iterNodeCarets("root")) {
1257
- const { origin: _ } = C;
1258
- if (y(_)) {
1259
- if (pt(C)) return kn(_, d.direction);
1260
- } else if (!z(_)) break;
1261
- }
1262
- return null;
1263
- })(mt(h, u.direction)), m = T(h, M);
1264
- if (!m || !m.is(s)) return !1;
1265
- const a = n.getElementByKey(h.getKey()), c = Me(a);
1266
- if (!a || !c) return !1;
1267
- const g = Qn(n, m);
1268
- if (r.table = g, p) if (o === "extend") {
1269
- const d = Me(n.getElementByKey(p.origin.getKey()));
1270
- if (!d) return !1;
1271
- r.$setAnchorCellForSelection(c), r.$setFocusCellForSelection(d, !0);
1272
- } else {
1273
- const d = Ct(p);
1274
- Re(t.anchor, d), Re(t.focus, d);
1275
- }
1276
- else if (o === "extend") r.$setAnchorCellForSelection(c), r.$setFocusCellForSelection(c, !0);
1277
- else {
1278
- const d = (function(C) {
1279
- const _ = En(C);
1280
- return pt(_) ? Ct(_) : C;
1281
- })(mt(m, i.direction));
1282
- Re(t.anchor, d), Re(t.focus, d);
1283
- }
1284
- return te(e), !0;
1285
- }
1286
- function Wt(n, e, t, o, l) {
1287
- if ((t === "up" || t === "down") && (function(r) {
1288
- const i = r.getRootElement();
1289
- return i ? i.hasAttribute("aria-controls") && i.getAttribute("aria-controls") === "typeahead-menu" : !1;
1290
- })(n)) return !1;
1291
- const s = L();
1292
- if (!ee(s, o)) {
1293
- if (P(s)) {
1294
- if (t === "backward") {
1295
- if (s.focus.offset > 0) return !1;
1296
- const r = (function(u) {
1297
- for (let f = u, h = u; h !== null; f = h, h = h.getParent()) if (B(h)) {
1298
- if (h !== f && h.getFirstChild() !== f) return null;
1299
- if (!h.isInline()) return h;
1300
- }
1301
- return null;
1302
- })(s.focus.getNode());
1303
- if (!r) return !1;
1304
- const i = r.getPreviousSibling();
1305
- return !!M(i) && (te(e), e.shiftKey ? s.focus.set(i.getParentOrThrow().getKey(), i.getIndexWithinParent(), "element") : i.selectEnd(), !0);
1306
- }
1307
- if (e.shiftKey && (t === "up" || t === "down")) {
1308
- const r = s.focus.getNode();
1309
- if (!s.isCollapsed() && (t === "up" && !s.isBackward() || t === "down" && s.isBackward())) {
1310
- let i = T(r, (m) => M(m));
1311
- if (y(i) && (i = T(i, M)), i !== o || !i) return !1;
1312
- const u = t === "down" ? i.getNextSibling() : i.getPreviousSibling();
1313
- if (!u) return !1;
1314
- let f = 0;
1315
- t === "up" && B(u) && (f = u.getChildrenSize());
1316
- let h = u;
1317
- t === "up" && B(u) && (h = u.getLastChild() || u, f = Se(h) ? h.getTextContentSize() : 0);
1318
- const p = s.clone();
1319
- return p.focus.set(h.getKey(), f, Se(h) ? "text" : "element"), ne(p), te(e), !0;
1320
- }
1321
- if (Rn(r)) {
1322
- const i = t === "up" ? s.getNodes()[s.getNodes().length - 1] : s.getNodes()[0];
1323
- if (i && xe(o, i) !== null) {
1324
- const u = o.getFirstDescendant(), f = o.getLastDescendant();
1325
- if (!u || !f) return !1;
1326
- const [h] = D(u), [p] = D(f), m = o.getCordsFromCellNode(h, l.table), a = o.getCordsFromCellNode(p, l.table), c = o.getDOMCellFromCordsOrThrow(m.x, m.y, l.table), g = o.getDOMCellFromCordsOrThrow(a.x, a.y, l.table);
1327
- return l.$setAnchorCellForSelection(c), l.$setFocusCellForSelection(g, !0), !0;
1328
- }
1329
- return !1;
1330
- }
1331
- {
1332
- let i = T(r, (f) => B(f) && !f.isInline());
1333
- if (y(i) && (i = T(i, M)), !i) return !1;
1334
- const u = t === "down" ? i.getNextSibling() : i.getPreviousSibling();
1335
- if (M(u) && l.tableNodeKey === u.getKey()) {
1336
- const f = u.getFirstDescendant(), h = u.getLastDescendant();
1337
- if (!f || !h) return !1;
1338
- const [p] = D(f), [m] = D(h), a = s.clone();
1339
- return a.focus.set((t === "up" ? p : m).getKey(), t === "up" ? 0 : m.getChildrenSize(), "element"), te(e), ne(a), !0;
1340
- }
1341
- }
1342
- }
1343
- }
1344
- return t === "down" && Qe(n) && l.setShouldCheckSelection(), !1;
1345
- }
1346
- if (P(s)) {
1347
- if (t === "backward" || t === "forward")
1348
- return Gn(n, e, s, e.shiftKey ? "extend" : "move", t === "backward", o, l);
1349
- if (s.isCollapsed()) {
1350
- const { anchor: r, focus: i } = s, u = T(r.getNode(), y), f = T(i.getNode(), y);
1351
- if (!y(u) || !u.is(f)) return !1;
1352
- const h = _e(u);
1353
- if (h !== o && h != null) {
1354
- const C = ce(h, n.getElementByKey(h.getKey()));
1355
- if (C != null) return l.table = Ce(h, C), Wt(n, e, t, h, l);
1356
- }
1357
- const p = n.getElementByKey(u.__key), m = n.getElementByKey(r.key);
1358
- if (m == null || p == null) return !1;
1359
- let a;
1360
- if (r.type === "element") a = m.getBoundingClientRect();
1361
- else {
1362
- const C = $e(it(n));
1363
- if (C === null || C.rangeCount === 0) return !1;
1364
- a = C.getRangeAt(0).getBoundingClientRect();
1365
- }
1366
- const c = t === "up" ? u.getFirstChild() : u.getLastChild();
1367
- if (c == null) return !1;
1368
- const g = n.getElementByKey(c.__key);
1369
- if (g == null) return !1;
1370
- const d = g.getBoundingClientRect();
1371
- if (t === "up" ? d.top > a.top - a.height : a.bottom + a.height > d.bottom) {
1372
- te(e);
1373
- const C = o.getCordsFromCellNode(u, l.table);
1374
- if (!e.shiftKey) return jn(l, o, C.x, C.y, t);
1375
- {
1376
- const _ = o.getDOMCellFromCordsOrThrow(C.x, C.y, l.table);
1377
- l.$setAnchorCellForSelection(_), l.$setFocusCellForSelection(_, !0);
1378
- }
1379
- return !0;
1380
- }
1381
- }
1382
- } else if (K(s)) {
1383
- const { anchor: r, focus: i } = s, u = T(r.getNode(), y), f = T(i.getNode(), y), [h] = s.getNodes();
1384
- M(h) || b(251);
1385
- const p = ce(h, n.getElementByKey(h.getKey()));
1386
- if (!y(u) || !y(f) || !M(h) || p == null) return !1;
1387
- l.$updateTableTableSelection(s);
1388
- const m = Ce(h, p), a = o.getCordsFromCellNode(u, m), c = o.getDOMCellFromCordsOrThrow(a.x, a.y, m);
1389
- if (l.$setAnchorCellForSelection(c), te(e), e.shiftKey) {
1390
- const [g, d, C] = I(o, u, f);
1391
- return Zn(l, g, d, C, t);
1392
- }
1393
- return f.selectEnd(), !0;
1394
- }
1395
- return !1;
1396
- }
1397
- function te(n) {
1398
- n.preventDefault(), n.stopImmediatePropagation(), n.stopPropagation();
1399
- }
1400
- function vt(n, e, t) {
1401
- const o = J();
1402
- n === "first" ? e.insertBefore(o) : e.insertAfter(o), o.append(...t || []), o.selectEnd();
1403
- }
1404
- function Ft(n, e, t) {
1405
- const o = t.getParent();
1406
- if (!o) return;
1407
- const l = $e(it(n));
1408
- if (!l) return;
1409
- const s = l.anchorNode, r = n.getElementByKey(o.getKey()), i = ce(t, n.getElementByKey(t.getKey()));
1410
- if (!s || !r || !i || !r.contains(s) || i.contains(s)) return;
1411
- const u = T(e.anchor.getNode(), (_) => y(_));
1412
- if (!u) return;
1413
- const f = T(u, (_) => M(_));
1414
- if (!M(f) || !f.is(t)) return;
1415
- const [h, p] = I(t, u, u), m = h[0][0], a = h[h.length - 1][h[0].length - 1], { startRow: c, startColumn: g } = p, d = c === m.startRow && g === m.startColumn, C = c === a.startRow && g === a.startColumn;
1416
- return d ? "first" : C ? "last" : void 0;
1417
- }
1418
- function se(n, e) {
1419
- const { tableNode: t } = n.$lookup(), o = t.getCordsFromCellNode(e, n.table);
1420
- return t.getDOMCellFromCordsOrThrow(o.x, o.y, n.table);
1421
- }
1422
- function Ze(n, e, t) {
1423
- return xe(n, re(e, t));
1424
- }
1425
- function Tt(n, e, t) {
1426
- if (!e.theme.tableAlignment) return;
1427
- const o = [], l = [];
1428
- for (const s of ["center", "right"]) {
1429
- const r = e.theme.tableAlignment[s];
1430
- r && (s === t ? l : o).push(r);
1431
- }
1432
- me(n, ...o), G(n, ...l);
1433
- }
1434
- const Ge = /* @__PURE__ */ new WeakSet();
1435
- function Qe(n = ot()) {
1436
- return Ge.has(n);
1437
- }
1438
- function Co(n, e) {
1439
- e ? Ge.add(n) : Ge.delete(n);
1440
- }
1441
- class ue extends et {
1442
- __rowStriping;
1443
- __frozenColumnCount;
1444
- __frozenRowCount;
1445
- __colWidths;
1446
- static getType() {
1447
- return "table";
1448
- }
1449
- getColWidths() {
1450
- return this.getLatest().__colWidths;
1451
- }
1452
- setColWidths(e) {
1453
- const t = this.getWritable();
1454
- return t.__colWidths = e, t;
1455
- }
1456
- static clone(e) {
1457
- return new ue(e.__key);
1458
- }
1459
- afterCloneFrom(e) {
1460
- super.afterCloneFrom(e), this.__colWidths = e.__colWidths, this.__rowStriping = e.__rowStriping, this.__frozenColumnCount = e.__frozenColumnCount, this.__frozenRowCount = e.__frozenRowCount;
1461
- }
1462
- static importDOM() {
1463
- return { table: (e) => ({ conversion: eo, priority: 1 }) };
1464
- }
1465
- static importJSON(e) {
1466
- return ct().updateFromJSON(e);
1467
- }
1468
- updateFromJSON(e) {
1469
- return super.updateFromJSON(e).setRowStriping(e.rowStriping || !1).setFrozenColumns(e.frozenColumnCount || 0).setFrozenRows(e.frozenRowCount || 0).setColWidths(e.colWidths);
1470
- }
1471
- constructor(e) {
1472
- super(e), this.__rowStriping = !1, this.__frozenColumnCount = 0, this.__frozenRowCount = 0, this.__colWidths = void 0;
1473
- }
1474
- exportJSON() {
1475
- return { ...super.exportJSON(), colWidths: this.getColWidths(), frozenColumnCount: this.__frozenColumnCount ? this.__frozenColumnCount : void 0, frozenRowCount: this.__frozenRowCount ? this.__frozenRowCount : void 0, rowStriping: this.__rowStriping ? this.__rowStriping : void 0 };
1476
- }
1477
- extractWithChild(e, t, o) {
1478
- return o === "html";
1479
- }
1480
- getDOMSlot(e) {
1481
- const t = ge(e) ? e : e.querySelector("table");
1482
- return ge(t) || b(229), super.getDOMSlot(e).withElement(t).withAfter(t.querySelector("colgroup"));
1483
- }
1484
- createDOM(e, t) {
1485
- const o = document.createElement("table");
1486
- this.__style && (o.style.cssText = this.__style);
1487
- const l = document.createElement("colgroup");
1488
- if (o.appendChild(l), Gt(l), G(o, e.theme.table), this.updateTableElement(null, o, e), Qe(t)) {
1489
- const s = document.createElement("div"), r = e.theme.tableScrollableWrapper;
1490
- return r ? G(s, r) : s.style.cssText = "overflow-x: auto;", s.appendChild(o), this.updateTableWrapper(null, s, o, e), s;
1491
- }
1492
- return o;
1493
- }
1494
- updateTableWrapper(e, t, o, l) {
1495
- this.__frozenColumnCount !== (e ? e.__frozenColumnCount : 0) && (function(s, r, i, u) {
1496
- u > 0 ? (G(s, i.theme.tableFrozenColumn), r.setAttribute("data-lexical-frozen-column", "true")) : (me(s, i.theme.tableFrozenColumn), r.removeAttribute("data-lexical-frozen-column"));
1497
- })(t, o, l, this.__frozenColumnCount), this.__frozenRowCount !== (e ? e.__frozenRowCount : 0) && (function(s, r, i, u) {
1498
- u > 0 ? (G(s, i.theme.tableFrozenRow), r.setAttribute("data-lexical-frozen-row", "true")) : (me(s, i.theme.tableFrozenRow), r.removeAttribute("data-lexical-frozen-row"));
1499
- })(t, o, l, this.__frozenRowCount);
1500
- }
1501
- updateTableElement(e, t, o) {
1502
- this.__style !== (e ? e.__style : "") && (t.style.cssText = this.__style), this.__rowStriping !== (!!e && e.__rowStriping) && (function(l, s, r) {
1503
- r ? (G(l, s.theme.tableRowStriping), l.setAttribute("data-lexical-row-striping", "true")) : (me(l, s.theme.tableRowStriping), l.removeAttribute("data-lexical-row-striping"));
1504
- })(t, o, this.__rowStriping), (function(l, s, r, i) {
1505
- const u = l.querySelector("colgroup");
1506
- if (!u) return;
1507
- const f = [];
1508
- for (let h = 0; h < r; h++) {
1509
- const p = document.createElement("col"), m = i && i[h];
1510
- m && (p.style.width = `${m}px`), f.push(p);
1511
- }
1512
- u.replaceChildren(...f);
1513
- })(t, 0, this.getColumnCount(), this.getColWidths()), Tt(t, o, this.getFormatType());
1514
- }
1515
- updateDOM(e, t, o) {
1516
- const l = this.getDOMSlot(t).element;
1517
- return t === l === Qe() || (Ne(s = t) && s.nodeName === "DIV" && this.updateTableWrapper(e, t, l, o), this.updateTableElement(e, l, o), !1);
1518
- var s;
1519
- }
1520
- exportDOM(e) {
1521
- const t = super.exportDOM(e), { element: o } = t;
1522
- return { after: (l) => {
1523
- if (t.after && (l = t.after(l)), !ge(l) && Ne(l) && (l = l.querySelector("table")), !ge(l)) return null;
1524
- Tt(l, e._config, this.getFormatType());
1525
- const [s] = oe(this, null, null), r = /* @__PURE__ */ new Map();
1526
- for (const h of s) for (const p of h) {
1527
- const m = p.cell.getKey();
1528
- r.has(m) || r.set(m, { colSpan: p.cell.getColSpan(), startColumn: p.startColumn });
1529
- }
1530
- const i = /* @__PURE__ */ new Set();
1531
- for (const h of l.querySelectorAll(":scope > tr > [data-temporary-table-cell-lexical-key]")) {
1532
- const p = h.getAttribute("data-temporary-table-cell-lexical-key");
1533
- if (p) {
1534
- const m = r.get(p);
1535
- if (h.removeAttribute("data-temporary-table-cell-lexical-key"), m) {
1536
- r.delete(p);
1537
- for (let a = 0; a < m.colSpan; a++) i.add(a + m.startColumn);
1538
- }
1539
- }
1540
- }
1541
- const u = l.querySelector(":scope > colgroup");
1542
- if (u) {
1543
- const h = Array.from(l.querySelectorAll(":scope > colgroup > col")).filter((p, m) => i.has(m));
1544
- u.replaceChildren(...h);
1545
- }
1546
- const f = l.querySelectorAll(":scope > tr");
1547
- if (f.length > 0) {
1548
- const h = document.createElement("tbody");
1549
- for (const p of f) h.appendChild(p);
1550
- l.append(h);
1551
- }
1552
- return l;
1553
- }, element: !ge(o) && Ne(o) ? o.querySelector("table") : o };
1554
- }
1555
- canBeEmpty() {
1556
- return !1;
1557
- }
1558
- isShadowRoot() {
1559
- return !0;
1560
- }
1561
- getCordsFromCellNode(e, t) {
1562
- const { rows: o, domRows: l } = t;
1563
- for (let s = 0; s < o; s++) {
1564
- const r = l[s];
1565
- if (r != null) for (let i = 0; i < r.length; i++) {
1566
- const u = r[i];
1567
- if (u == null) continue;
1568
- const { elem: f } = u, h = Ze(this, f);
1569
- if (h !== null && e.is(h)) return { x: i, y: s };
1570
- }
1571
- }
1572
- throw new Error("Cell not found in table.");
1573
- }
1574
- getDOMCellFromCords(e, t, o) {
1575
- const { domRows: l } = o, s = l[t];
1576
- if (s == null) return null;
1577
- const r = s[e < s.length ? e : s.length - 1];
1578
- return r ?? null;
1579
- }
1580
- getDOMCellFromCordsOrThrow(e, t, o) {
1581
- const l = this.getDOMCellFromCords(e, t, o);
1582
- if (!l) throw new Error("Cell not found at cords.");
1583
- return l;
1584
- }
1585
- getCellNodeFromCords(e, t, o) {
1586
- const l = this.getDOMCellFromCords(e, t, o);
1587
- if (l == null) return null;
1588
- const s = re(l.elem);
1589
- return y(s) ? s : null;
1590
- }
1591
- getCellNodeFromCordsOrThrow(e, t, o) {
1592
- const l = this.getCellNodeFromCords(e, t, o);
1593
- if (!l) throw new Error("Node at cords not TableCellNode.");
1594
- return l;
1595
- }
1596
- getRowStriping() {
1597
- return !!this.getLatest().__rowStriping;
1598
- }
1599
- setRowStriping(e) {
1600
- const t = this.getWritable();
1601
- return t.__rowStriping = e, t;
1602
- }
1603
- setFrozenColumns(e) {
1604
- const t = this.getWritable();
1605
- return t.__frozenColumnCount = e, t;
1606
- }
1607
- getFrozenColumns() {
1608
- return this.getLatest().__frozenColumnCount;
1609
- }
1610
- setFrozenRows(e) {
1611
- const t = this.getWritable();
1612
- return t.__frozenRowCount = e, t;
1613
- }
1614
- getFrozenRows() {
1615
- return this.getLatest().__frozenRowCount;
1616
- }
1617
- canSelectBefore() {
1618
- return !0;
1619
- }
1620
- canIndent() {
1621
- return !1;
1622
- }
1623
- getColumnCount() {
1624
- const e = this.getFirstChild();
1625
- if (!e) return 0;
1626
- let t = 0;
1627
- return e.getChildren().forEach((o) => {
1628
- y(o) && (t += o.getColSpan());
1629
- }), t;
1630
- }
1631
- }
1632
- function Qn(n, e) {
1633
- const t = n.getElementByKey(e.getKey());
1634
- return t === null && b(230), Ce(e, t);
1635
- }
1636
- function eo(n) {
1637
- const e = ct();
1638
- n.hasAttribute("data-lexical-row-striping") && e.setRowStriping(!0), n.hasAttribute("data-lexical-frozen-column") && e.setFrozenColumns(1), n.hasAttribute("data-lexical-frozen-row") && e.setFrozenRows(1);
1639
- const t = n.querySelector(":scope > colgroup");
1640
- if (t) {
1641
- let o = [];
1642
- for (const l of t.querySelectorAll(":scope > col")) {
1643
- let s = l.style.width || "";
1644
- if (!ie.test(s) && (s = l.getAttribute("width") || "", !/^\d+$/.test(s))) {
1645
- o = void 0;
1646
- break;
1647
- }
1648
- o.push(parseFloat(s));
1649
- }
1650
- o && e.setColWidths(o);
1651
- }
1652
- return { after: (o) => Rt(o, z), node: e };
1653
- }
1654
- function ct() {
1655
- return tt(new ue());
1656
- }
1657
- function M(n) {
1658
- return n instanceof ue;
1659
- }
1660
- function to(n) {
1661
- z(n.getParent()) ? n.isEmpty() && n.append(J()) : n.remove();
1662
- }
1663
- function no(n) {
1664
- M(n.getParent()) ? Kt(n, y) : n.remove();
1665
- }
1666
- function oo(n) {
1667
- Kt(n, z);
1668
- const [e] = oe(n, null, null), t = e.reduce((r, i) => Math.max(r, i.length), 0), o = n.getChildren();
1669
- for (let r = 0; r < e.length; ++r) {
1670
- const i = o[r];
1671
- if (!i) continue;
1672
- z(i) || b(254, i.constructor.name, i.getType());
1673
- const u = e[r].reduce((f, h) => h ? 1 + f : f, 0);
1674
- if (u !== t) for (let f = u; f < t; ++f) {
1675
- const h = V();
1676
- h.append(J()), i.append(h);
1677
- }
1678
- }
1679
- const l = n.getColWidths(), s = n.getColumnCount();
1680
- if (l && l.length !== s) {
1681
- let r;
1682
- if (s < l.length) r = l.slice(0, s);
1683
- else if (l.length > 0) {
1684
- const i = l[l.length - 1];
1685
- r = [...l, ...Array(s - l.length).fill(i)];
1686
- }
1687
- n.setColWidths(r);
1688
- }
1689
- }
1690
- function ro(n) {
1691
- if (n.detail < 3 || !be(n.target)) return !1;
1692
- const e = re(n.target);
1693
- if (e === null) return !1;
1694
- const t = T(e, (o) => B(o) && !o.isInline());
1695
- return t === null ? !1 : !!y(t.getParent()) && (t.select(0), !0);
1696
- }
1697
- function lo() {
1698
- const n = L();
1699
- if (!P(n)) return !1;
1700
- const e = _e(n.anchor.getNode());
1701
- if (e === null) return !1;
1702
- const t = cn();
1703
- if (!t.is(e.getParent()) || t.getChildrenSize() !== 1) return !1;
1704
- const [o] = oe(e, null, null);
1705
- if (o.length === 0 || o[0].length === 0) return !1;
1706
- const l = o[0][0];
1707
- if (!l || !l.cell) return !1;
1708
- const s = o[o.length - 1], r = s[s.length - 1];
1709
- if (!r || !r.cell) return !1;
1710
- const i = Ve(e, l.cell, r.cell);
1711
- return ne(i), !0;
1712
- }
1713
- function _o(n) {
1714
- return n.registerNodeTransform(he, (e) => {
1715
- if (e.getColSpan() > 1 || e.getRowSpan() > 1) {
1716
- const [, , t] = D(e), [o] = I(t, e, e), l = o.length, s = o[0].length;
1717
- let r = t.getFirstChild();
1718
- z(r) || b(175);
1719
- const i = [];
1720
- for (let u = 0; u < l; u++) {
1721
- u !== 0 && (r = r.getNextSibling(), z(r) || b(175));
1722
- let f = null;
1723
- for (let h = 0; h < s; h++) {
1724
- const p = o[u][h], m = p.cell;
1725
- if (p.startRow === u && p.startColumn === h) f = m, i.push(m);
1726
- else if (m.getColSpan() > 1 || m.getRowSpan() > 1) {
1727
- y(m) || b(176);
1728
- const a = V(m.__headerState);
1729
- f !== null ? f.insertAfter(a) : Vt(r, a);
1730
- }
1731
- }
1732
- }
1733
- for (const u of i) u.setColSpan(1), u.setRowSpan(1);
1734
- }
1735
- });
1736
- }
1737
- function So(n, e = !0) {
1738
- const t = /* @__PURE__ */ new Map(), o = (s, r, i) => {
1739
- const u = ce(s, i), f = Vn(s, u, n, e);
1740
- t.set(r, [f, u]);
1741
- }, l = n.registerMutationListener(ue, (s) => {
1742
- n.getEditorState().read(() => {
1743
- for (const [r, i] of s) {
1744
- const u = t.get(r);
1745
- if (i === "created" || i === "updated") {
1746
- const { tableNode: f, tableElement: h } = Mt(r);
1747
- u === void 0 ? o(f, r, h) : h !== u[1] && (u[0].removeListeners(), t.delete(r), o(f, r, h));
1748
- } else i === "destroyed" && u !== void 0 && (u[0].removeListeners(), t.delete(r));
1749
- }
1750
- }, { editor: n });
1751
- }, { skipInitialization: !1 });
1752
- return () => {
1753
- l();
1754
- for (const [, [s]] of t) s.removeListeners();
1755
- };
1756
- }
1757
- function wo(n, e) {
1758
- n.hasNodes([ue]) || b(255);
1759
- const { hasNestedTables: t = _t(!1), hasFitNestedTables: o = _t(!1) } = e ?? {};
1760
- return nn(n.registerCommand(zn, (l) => (function({ rows: s, columns: r, includeHeaders: i }, u) {
1761
- const f = L() || De();
1762
- if (!f || !P(f) || !u && _e(f.anchor.getNode())) return !1;
1763
- const h = Ln(Number(s), Number(r), i);
1764
- qt(h);
1765
- const p = h.getFirstDescendant();
1766
- return Se(p) && p.select(), !0;
1767
- })(l, t.peek()), He), n.registerCommand(sn, (l, s) => n === s && (function(r, i, u) {
1768
- const { nodes: f, selection: h } = r;
1769
- if (!f.some((a) => M(a) || Xt(a).some((c) => M(c.node)))) return !1;
1770
- const p = K(h), m = P(h);
1771
- return m && T(h.anchor.getNode(), (a) => y(a)) !== null && T(h.focus.getNode(), (a) => y(a)) !== null || p ? f.length === 1 && M(f[0]) ? (function(a, c) {
1772
- const g = c.getStartEndPoints(), d = K(c);
1773
- if (g === null) return !1;
1774
- const [C, _] = g, [S, N, w] = D(C), x = T(_.getNode(), (E) => y(E));
1775
- if (!(y(S) && y(x) && z(N) && M(w))) return !1;
1776
- const [v, O, R] = I(w, S, x), [$] = oe(a, null, null), F = v.length, A = F > 0 ? v[0].length : 0;
1777
- let k = O.startRow, W = O.startColumn, U = $.length, j = U > 0 ? $[0].length : 0;
1778
- if (d) {
1779
- const E = Ee(v, O, R), Y = E.maxRow - E.minRow + 1, Z = E.maxColumn - E.minColumn + 1;
1780
- k = E.minRow, W = E.minColumn, U = Math.min(U, Y), j = Math.min(j, Z);
1781
- }
1782
- let le = !1;
1783
- const q = Math.min(F, k + U) - 1, Ht = Math.min(A, W + j) - 1, ut = /* @__PURE__ */ new Set();
1784
- for (let E = k; E <= q; E++) for (let Y = W; Y <= Ht; Y++) {
1785
- const Z = v[E][Y];
1786
- ut.has(Z.cell.getKey()) || Z.cell.__rowSpan === 1 && Z.cell.__colSpan === 1 || (Dn(Z.cell), ut.add(Z.cell.getKey()), le = !0);
1787
- }
1788
- let [we] = oe(w.getWritable(), null, null);
1789
- const Bt = U - F + k;
1790
- for (let E = 0; E < Bt; E++)
1791
- Ue(we[F - 1][0].cell);
1792
- const Dt = j - A + W;
1793
- for (let E = 0; E < Dt; E++)
1794
- Ye(we[0][A - 1].cell, !0, !1);
1795
- [we] = oe(w.getWritable(), null, null);
1796
- for (let E = k; E < k + U; E++) for (let Y = W; Y < W + j; Y++) {
1797
- const Z = E - k, ht = Y - W, We = $[Z][ht];
1798
- if (We.startRow !== Z || We.startColumn !== ht) continue;
1799
- const fe = We.cell;
1800
- if (fe.__rowSpan !== 1 || fe.__colSpan !== 1) {
1801
- const Q = [], Jt = Math.min(E + fe.__rowSpan, k + U) - 1, Ut = Math.min(Y + fe.__colSpan, W + j) - 1;
1802
- for (let Pe = E; Pe <= Jt; Pe++) for (let Le = Y; Le <= Ut; Le++) {
1803
- const Yt = we[Pe][Le];
1804
- Q.push(Yt.cell);
1805
- }
1806
- Hn(Q), le = !0;
1807
- }
1808
- const { cell: Te } = we[E][Y], ft = fe.getBackgroundColor();
1809
- ft != null && Te.setBackgroundColor(ft);
1810
- const It = Te.getChildren();
1811
- fe.getChildren().forEach((Q) => {
1812
- Se(Q) && J().append(Q), Te.append(Q);
1813
- }), It.forEach((Q) => Q.remove());
1814
- }
1815
- if (d && le) {
1816
- const [E] = oe(w.getWritable(), null, null);
1817
- E[O.startRow][O.startColumn].cell.selectEnd();
1818
- }
1819
- return !0;
1820
- })(f[0], h) : m && i.peek() ? (function(a, c, g) {
1821
- const d = K(c) && !c.focus.getNode().is(c.anchor.getNode()), C = P(c) && y(c.anchor.getNode()) && !c.anchor.getNode().is(c.focus.getNode());
1822
- if (d || C) return !0;
1823
- if (!g) return !1;
1824
- const _ = c.focus.getNode(), S = T(_, y);
1825
- if (!S) return !1;
1826
- const N = Pt(S);
1827
- if (N === void 0) return !1;
1828
- const w = (function(v) {
1829
- const O = ot().getElementByKey(v.getKey());
1830
- if (O === null) return 0;
1831
- const R = window.getComputedStyle(O), $ = R.getPropertyValue("padding-left") || "0px", F = R.getPropertyValue("padding-right") || "0px", A = R.getPropertyValue("border-left-width") || "0px", k = R.getPropertyValue("padding-right-width") || "0px";
1832
- if (!(ie.test($) && ie.test(F) && ie.test(A) && ie.test(k))) return 0;
1833
- const W = parseFloat($), U = parseFloat(F), j = parseFloat(A), le = parseFloat(k);
1834
- return W + U + j + le;
1835
- })(S), x = a.filter(M);
1836
- for (const v of x) Lt(v, N, w);
1837
- return !1;
1838
- })(f, h, u.peek()) : !0 : !1;
1839
- })(l, t, o), He), n.registerCommand(rn, lo, ln), n.registerCommand(on, ro, He), n.registerNodeTransform(ue, oo), n.registerNodeTransform(Fe, no), n.registerNodeTransform(he, to));
1840
- }
1841
- function Pt(n) {
1842
- const e = st(n), t = qe(n), o = e.getColWidths();
1843
- if (!t || !o) return;
1844
- const { columnIndex: l, colSpan: s } = t;
1845
- let r = 0;
1846
- for (let i = l; i < l + s; i++) r += o[i];
1847
- return r;
1848
- }
1849
- function Lt(n, e, t) {
1850
- const o = n.getColWidths();
1851
- if (!o) return n;
1852
- const l = e - t, s = o.reduce((u, f) => u + f, 0);
1853
- if (s <= l) return n;
1854
- const r = l / s;
1855
- n.setColWidths(o.map((u) => u * r));
1856
- const i = n.getChildren().filter(z);
1857
- for (const u of i) {
1858
- const f = u.getChildren().filter(y);
1859
- for (const h of f) {
1860
- const p = Pt(h);
1861
- if (p !== void 0) for (const m of h.getChildren().filter(M)) Lt(m, p, t);
1862
- }
1863
- }
1864
- }
1865
- export {
1866
- ce as $,
1867
- So as A,
1868
- z as B,
1869
- Co as C,
1870
- V as E,
1871
- _o as F,
1872
- Me as I,
1873
- uo as J,
1874
- he as K,
1875
- ve as L,
1876
- y as M,
1877
- oe as S,
1878
- Ln as U,
1879
- fo as V,
1880
- st as X,
1881
- kt as Y,
1882
- ue as _,
1883
- wo as a,
1884
- go as e,
1885
- _e as l,
1886
- Qe as m,
1887
- ho as q,
1888
- po as r,
1889
- mo as u,
1890
- Fe as z
1891
- };
1892
- //# sourceMappingURL=LexicalTable.prod-upbwOtcE.js.map