@okta/odyssey-react-mui 1.41.1 → 1.43.0

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 (354) hide show
  1. package/dist/cjs/DataTable/DataTable.cjs +67 -42
  2. package/dist/cjs/DataTable/DataTable.cjs.map +1 -1
  3. package/dist/cjs/Drawer.cjs +16 -14
  4. package/dist/cjs/Drawer.cjs.map +1 -1
  5. package/dist/cjs/PasswordField.cjs +1 -1
  6. package/dist/cjs/PasswordField.cjs.map +1 -1
  7. package/dist/cjs/Select.cjs +35 -44
  8. package/dist/cjs/Select.cjs.map +1 -1
  9. package/dist/cjs/Status.cjs +2 -0
  10. package/dist/cjs/Status.cjs.map +1 -1
  11. package/dist/cjs/Typography.cjs +32 -8
  12. package/dist/cjs/Typography.cjs.map +1 -1
  13. package/dist/cjs/createContrastColors.cjs +6 -2
  14. package/dist/cjs/createContrastColors.cjs.map +1 -1
  15. package/dist/cjs/getLogicalBoundaries.cjs +33 -0
  16. package/dist/cjs/getLogicalBoundaries.cjs.map +1 -0
  17. package/dist/cjs/labs/DataFilters.cjs +1 -0
  18. package/dist/cjs/labs/DataFilters.cjs.map +1 -1
  19. package/dist/cjs/labs/DataView/BulkActionsMenu.cjs.map +1 -1
  20. package/dist/cjs/labs/DataView/CardLayoutContent.cjs.map +1 -1
  21. package/dist/cjs/labs/DataView/DataView.cjs +10 -1
  22. package/dist/cjs/labs/DataView/DataView.cjs.map +1 -1
  23. package/dist/cjs/labs/DataView/RowActions.cjs +3 -4
  24. package/dist/cjs/labs/DataView/RowActions.cjs.map +1 -1
  25. package/dist/cjs/labs/DataView/TableLayoutContent.cjs +2 -4
  26. package/dist/cjs/labs/DataView/TableLayoutContent.cjs.map +1 -1
  27. package/dist/cjs/labs/DataView/useFilterConversion.cjs.map +1 -1
  28. package/dist/cjs/labs/OdysseyPickers/ComposablePicker.cjs.map +1 -1
  29. package/dist/cjs/labs/OdysseyPickers/Picker.cjs +17 -11
  30. package/dist/cjs/labs/OdysseyPickers/Picker.cjs.map +1 -1
  31. package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs +2 -1
  32. package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs.map +1 -1
  33. package/dist/cjs/labs/OdysseyPickers/SearchDropdown.cjs +2 -3
  34. package/dist/cjs/labs/OdysseyPickers/SearchDropdown.cjs.map +1 -1
  35. package/dist/cjs/labs/PageTemplate/PageTemplate.cjs +15 -4
  36. package/dist/cjs/labs/PageTemplate/PageTemplate.cjs.map +1 -1
  37. package/dist/cjs/properties/ts/odyssey-react-mui.cjs +0 -1
  38. package/dist/cjs/properties/ts/odyssey-react-mui.cjs.map +1 -1
  39. package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs +0 -1
  40. package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs.map +1 -1
  41. package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs +0 -1
  42. package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs.map +1 -1
  43. package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs +0 -1
  44. package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs.map +1 -1
  45. package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs +0 -1
  46. package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs.map +1 -1
  47. package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs +0 -1
  48. package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs.map +1 -1
  49. package/dist/cjs/properties/ts/odyssey-react-mui_eu.cjs +136 -0
  50. package/dist/cjs/properties/ts/odyssey-react-mui_eu.cjs.map +1 -0
  51. package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs +0 -1
  52. package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs.map +1 -1
  53. package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs +0 -1
  54. package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs.map +1 -1
  55. package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs +0 -1
  56. package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs.map +1 -1
  57. package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs +0 -1
  58. package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs.map +1 -1
  59. package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs +0 -1
  60. package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs.map +1 -1
  61. package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs +0 -1
  62. package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs.map +1 -1
  63. package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs +0 -1
  64. package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs.map +1 -1
  65. package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs +0 -1
  66. package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs.map +1 -1
  67. package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs +0 -1
  68. package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs.map +1 -1
  69. package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs +0 -1
  70. package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs.map +1 -1
  71. package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs +0 -1
  72. package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs.map +1 -1
  73. package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs +4 -2
  74. package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs.map +1 -1
  75. package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs +129 -126
  76. package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs.map +1 -1
  77. package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs +0 -1
  78. package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs.map +1 -1
  79. package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs +0 -1
  80. package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs.map +1 -1
  81. package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs +0 -1
  82. package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs.map +1 -1
  83. package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs +0 -1
  84. package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs.map +1 -1
  85. package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs +0 -1
  86. package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs.map +1 -1
  87. package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs +0 -1
  88. package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs.map +1 -1
  89. package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs +0 -1
  90. package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs.map +1 -1
  91. package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs +0 -1
  92. package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs.map +1 -1
  93. package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs +0 -1
  94. package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs.map +1 -1
  95. package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs +0 -1
  96. package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs.map +1 -1
  97. package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs +0 -1
  98. package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs.map +1 -1
  99. package/dist/cjs/theme/components.cjs +7 -1
  100. package/dist/cjs/theme/components.cjs.map +1 -1
  101. package/dist/cjs/ui-shell/NarrowUiShellContent.cjs +0 -1
  102. package/dist/cjs/ui-shell/NarrowUiShellContent.cjs.map +1 -1
  103. package/dist/cjs/ui-shell/SideNav/SideNav.cjs +24 -18
  104. package/dist/cjs/ui-shell/SideNav/SideNav.cjs.map +1 -1
  105. package/dist/cjs/ui-shell/SideNav/SideNavItemLinkContent.cjs +4 -3
  106. package/dist/cjs/ui-shell/SideNav/SideNavItemLinkContent.cjs.map +1 -1
  107. package/dist/cjs/ui-shell/UiShell.cjs +2 -0
  108. package/dist/cjs/ui-shell/UiShell.cjs.map +1 -1
  109. package/dist/cjs/ui-shell/UiShellProvider.cjs +6 -1
  110. package/dist/cjs/ui-shell/UiShellProvider.cjs.map +1 -1
  111. package/dist/cjs/ui-shell/renderUiShell.cjs +2 -0
  112. package/dist/cjs/ui-shell/renderUiShell.cjs.map +1 -1
  113. package/dist/cjs/ui-shell/useElementAtContainerEdge.cjs +74 -0
  114. package/dist/cjs/ui-shell/useElementAtContainerEdge.cjs.map +1 -0
  115. package/dist/cjs/useMountLifecycleEffect.cjs +3 -3
  116. package/dist/cjs/useMountLifecycleEffect.cjs.map +1 -1
  117. package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs +1 -1
  118. package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs.map +1 -1
  119. package/dist/esm/DataTable/DataTable.js +67 -40
  120. package/dist/esm/DataTable/DataTable.js.map +1 -1
  121. package/dist/esm/Drawer.js +16 -14
  122. package/dist/esm/Drawer.js.map +1 -1
  123. package/dist/esm/PasswordField.js +1 -1
  124. package/dist/esm/PasswordField.js.map +1 -1
  125. package/dist/esm/Select.js +35 -44
  126. package/dist/esm/Select.js.map +1 -1
  127. package/dist/esm/Status.js +2 -0
  128. package/dist/esm/Status.js.map +1 -1
  129. package/dist/esm/Typography.js +32 -8
  130. package/dist/esm/Typography.js.map +1 -1
  131. package/dist/esm/createContrastColors.js +6 -2
  132. package/dist/esm/createContrastColors.js.map +1 -1
  133. package/dist/esm/getLogicalBoundaries.js +26 -0
  134. package/dist/esm/getLogicalBoundaries.js.map +1 -0
  135. package/dist/esm/labs/DataFilters.js +1 -0
  136. package/dist/esm/labs/DataFilters.js.map +1 -1
  137. package/dist/esm/labs/DataView/BulkActionsMenu.js.map +1 -1
  138. package/dist/esm/labs/DataView/CardLayoutContent.js.map +1 -1
  139. package/dist/esm/labs/DataView/DataView.js +10 -1
  140. package/dist/esm/labs/DataView/DataView.js.map +1 -1
  141. package/dist/esm/labs/DataView/RowActions.js +2 -1
  142. package/dist/esm/labs/DataView/RowActions.js.map +1 -1
  143. package/dist/esm/labs/DataView/TableLayoutContent.js +2 -4
  144. package/dist/esm/labs/DataView/TableLayoutContent.js.map +1 -1
  145. package/dist/esm/labs/DataView/useFilterConversion.js.map +1 -1
  146. package/dist/esm/labs/OdysseyPickers/ComposablePicker.js.map +1 -1
  147. package/dist/esm/labs/OdysseyPickers/Picker.js +19 -13
  148. package/dist/esm/labs/OdysseyPickers/Picker.js.map +1 -1
  149. package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js +2 -1
  150. package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js.map +1 -1
  151. package/dist/esm/labs/OdysseyPickers/SearchDropdown.js +2 -3
  152. package/dist/esm/labs/OdysseyPickers/SearchDropdown.js.map +1 -1
  153. package/dist/esm/labs/PageTemplate/PageTemplate.js +16 -5
  154. package/dist/esm/labs/PageTemplate/PageTemplate.js.map +1 -1
  155. package/dist/esm/properties/ts/odyssey-react-mui.js +0 -1
  156. package/dist/esm/properties/ts/odyssey-react-mui.js.map +1 -1
  157. package/dist/esm/properties/ts/odyssey-react-mui_cs.js +0 -1
  158. package/dist/esm/properties/ts/odyssey-react-mui_cs.js.map +1 -1
  159. package/dist/esm/properties/ts/odyssey-react-mui_da.js +0 -1
  160. package/dist/esm/properties/ts/odyssey-react-mui_da.js.map +1 -1
  161. package/dist/esm/properties/ts/odyssey-react-mui_de.js +0 -1
  162. package/dist/esm/properties/ts/odyssey-react-mui_de.js.map +1 -1
  163. package/dist/esm/properties/ts/odyssey-react-mui_el.js +0 -1
  164. package/dist/esm/properties/ts/odyssey-react-mui_el.js.map +1 -1
  165. package/dist/esm/properties/ts/odyssey-react-mui_es.js +0 -1
  166. package/dist/esm/properties/ts/odyssey-react-mui_es.js.map +1 -1
  167. package/dist/esm/properties/ts/odyssey-react-mui_eu.js +130 -0
  168. package/dist/esm/properties/ts/odyssey-react-mui_eu.js.map +1 -0
  169. package/dist/esm/properties/ts/odyssey-react-mui_fi.js +0 -1
  170. package/dist/esm/properties/ts/odyssey-react-mui_fi.js.map +1 -1
  171. package/dist/esm/properties/ts/odyssey-react-mui_fr.js +0 -1
  172. package/dist/esm/properties/ts/odyssey-react-mui_fr.js.map +1 -1
  173. package/dist/esm/properties/ts/odyssey-react-mui_ht.js +0 -1
  174. package/dist/esm/properties/ts/odyssey-react-mui_ht.js.map +1 -1
  175. package/dist/esm/properties/ts/odyssey-react-mui_hu.js +0 -1
  176. package/dist/esm/properties/ts/odyssey-react-mui_hu.js.map +1 -1
  177. package/dist/esm/properties/ts/odyssey-react-mui_id.js +0 -1
  178. package/dist/esm/properties/ts/odyssey-react-mui_id.js.map +1 -1
  179. package/dist/esm/properties/ts/odyssey-react-mui_it.js +0 -1
  180. package/dist/esm/properties/ts/odyssey-react-mui_it.js.map +1 -1
  181. package/dist/esm/properties/ts/odyssey-react-mui_ja.js +0 -1
  182. package/dist/esm/properties/ts/odyssey-react-mui_ja.js.map +1 -1
  183. package/dist/esm/properties/ts/odyssey-react-mui_ko.js +0 -1
  184. package/dist/esm/properties/ts/odyssey-react-mui_ko.js.map +1 -1
  185. package/dist/esm/properties/ts/odyssey-react-mui_ms.js +0 -1
  186. package/dist/esm/properties/ts/odyssey-react-mui_ms.js.map +1 -1
  187. package/dist/esm/properties/ts/odyssey-react-mui_nb.js +0 -1
  188. package/dist/esm/properties/ts/odyssey-react-mui_nb.js.map +1 -1
  189. package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js +0 -1
  190. package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
  191. package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js +4 -2
  192. package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js.map +1 -1
  193. package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js +129 -126
  194. package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js.map +1 -1
  195. package/dist/esm/properties/ts/odyssey-react-mui_pl.js +0 -1
  196. package/dist/esm/properties/ts/odyssey-react-mui_pl.js.map +1 -1
  197. package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js +0 -1
  198. package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
  199. package/dist/esm/properties/ts/odyssey-react-mui_ro.js +0 -1
  200. package/dist/esm/properties/ts/odyssey-react-mui_ro.js.map +1 -1
  201. package/dist/esm/properties/ts/odyssey-react-mui_ru.js +0 -1
  202. package/dist/esm/properties/ts/odyssey-react-mui_ru.js.map +1 -1
  203. package/dist/esm/properties/ts/odyssey-react-mui_sv.js +0 -1
  204. package/dist/esm/properties/ts/odyssey-react-mui_sv.js.map +1 -1
  205. package/dist/esm/properties/ts/odyssey-react-mui_th.js +0 -1
  206. package/dist/esm/properties/ts/odyssey-react-mui_th.js.map +1 -1
  207. package/dist/esm/properties/ts/odyssey-react-mui_tr.js +0 -1
  208. package/dist/esm/properties/ts/odyssey-react-mui_tr.js.map +1 -1
  209. package/dist/esm/properties/ts/odyssey-react-mui_uk.js +0 -1
  210. package/dist/esm/properties/ts/odyssey-react-mui_uk.js.map +1 -1
  211. package/dist/esm/properties/ts/odyssey-react-mui_vi.js +0 -1
  212. package/dist/esm/properties/ts/odyssey-react-mui_vi.js.map +1 -1
  213. package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js +0 -1
  214. package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
  215. package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js +0 -1
  216. package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
  217. package/dist/esm/theme/components.js +7 -1
  218. package/dist/esm/theme/components.js.map +1 -1
  219. package/dist/esm/ui-shell/NarrowUiShellContent.js +0 -1
  220. package/dist/esm/ui-shell/NarrowUiShellContent.js.map +1 -1
  221. package/dist/esm/ui-shell/SideNav/SideNav.js +24 -18
  222. package/dist/esm/ui-shell/SideNav/SideNav.js.map +1 -1
  223. package/dist/esm/ui-shell/SideNav/SideNavItemLinkContent.js +4 -3
  224. package/dist/esm/ui-shell/SideNav/SideNavItemLinkContent.js.map +1 -1
  225. package/dist/esm/ui-shell/UiShell.js +2 -0
  226. package/dist/esm/ui-shell/UiShell.js.map +1 -1
  227. package/dist/esm/ui-shell/UiShellProvider.js +6 -1
  228. package/dist/esm/ui-shell/UiShellProvider.js.map +1 -1
  229. package/dist/esm/ui-shell/renderUiShell.js +2 -0
  230. package/dist/esm/ui-shell/renderUiShell.js.map +1 -1
  231. package/dist/esm/ui-shell/useElementAtContainerEdge.js +68 -0
  232. package/dist/esm/ui-shell/useElementAtContainerEdge.js.map +1 -0
  233. package/dist/esm/useMountLifecycleEffect.js +3 -3
  234. package/dist/esm/useMountLifecycleEffect.js.map +1 -1
  235. package/dist/esm/web-component/odysseyWebComponentVersion.generated.js +1 -1
  236. package/dist/esm/web-component/odysseyWebComponentVersion.generated.js.map +1 -1
  237. package/dist/index.cjs +1 -1
  238. package/dist/index.d.ts +1 -1
  239. package/dist/index.d.ts.map +1 -0
  240. package/dist/index.js +25 -0
  241. package/dist/index.mjs +1 -1
  242. package/dist/index.scss +1 -1
  243. package/dist/tsconfig.production.tsbuildinfo +1 -1
  244. package/dist/tsconfig.tsbuildinfo +1 -0
  245. package/dist/types/DataTable/DataTable.d.ts +2 -2
  246. package/dist/types/DataTable/DataTable.d.ts.map +1 -1
  247. package/dist/types/Drawer.d.ts +24 -6
  248. package/dist/types/Drawer.d.ts.map +1 -1
  249. package/dist/types/OdysseyTranslationProvider.d.ts +1 -1
  250. package/dist/types/OdysseyTranslationProvider.d.ts.map +1 -1
  251. package/dist/types/PasswordField.d.ts.map +1 -1
  252. package/dist/types/Select.d.ts.map +1 -1
  253. package/dist/types/Status.d.ts +2 -2
  254. package/dist/types/Status.d.ts.map +1 -1
  255. package/dist/types/Typography.d.ts +16 -12
  256. package/dist/types/Typography.d.ts.map +1 -1
  257. package/dist/types/createContrastColors.d.ts +5 -1
  258. package/dist/types/createContrastColors.d.ts.map +1 -1
  259. package/dist/types/getLogicalBoundaries.d.ts +24 -0
  260. package/dist/types/getLogicalBoundaries.d.ts.map +1 -0
  261. package/dist/types/i18n.d.ts +6 -29
  262. package/dist/types/i18n.d.ts.map +1 -1
  263. package/dist/types/labs/DataFilters.d.ts.map +1 -1
  264. package/dist/types/labs/DataView/BulkActionsMenu.d.ts +1 -1
  265. package/dist/types/labs/DataView/BulkActionsMenu.d.ts.map +1 -1
  266. package/dist/types/labs/DataView/CardLayoutContent.d.ts.map +1 -1
  267. package/dist/types/labs/DataView/DataView.d.ts.map +1 -1
  268. package/dist/types/labs/DataView/RowActions.d.ts +5 -4
  269. package/dist/types/labs/DataView/RowActions.d.ts.map +1 -1
  270. package/dist/types/labs/DataView/TableLayoutContent.d.ts +1 -1
  271. package/dist/types/labs/DataView/TableLayoutContent.d.ts.map +1 -1
  272. package/dist/types/labs/OdysseyPickers/ComposablePicker.d.ts +4 -1
  273. package/dist/types/labs/OdysseyPickers/ComposablePicker.d.ts.map +1 -1
  274. package/dist/types/labs/OdysseyPickers/Picker.d.ts +7 -7
  275. package/dist/types/labs/OdysseyPickers/Picker.d.ts.map +1 -1
  276. package/dist/types/labs/OdysseyPickers/PickerWithOptionAdornment.d.ts.map +1 -1
  277. package/dist/types/labs/OdysseyPickers/SearchDropdown.d.ts.map +1 -1
  278. package/dist/types/labs/PageTemplate/PageTemplate.d.ts.map +1 -1
  279. package/dist/types/properties/ts/odyssey-react-mui.d.ts +0 -1
  280. package/dist/types/properties/ts/odyssey-react-mui.d.ts.map +1 -1
  281. package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts +0 -1
  282. package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
  283. package/dist/types/properties/ts/odyssey-react-mui_da.d.ts +0 -1
  284. package/dist/types/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
  285. package/dist/types/properties/ts/odyssey-react-mui_de.d.ts +0 -1
  286. package/dist/types/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
  287. package/dist/types/properties/ts/odyssey-react-mui_el.d.ts +0 -1
  288. package/dist/types/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
  289. package/dist/types/properties/ts/odyssey-react-mui_es.d.ts +0 -1
  290. package/dist/types/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
  291. package/dist/types/properties/ts/odyssey-react-mui_eu.d.ts +130 -0
  292. package/dist/types/properties/ts/odyssey-react-mui_eu.d.ts.map +1 -0
  293. package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts +0 -1
  294. package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
  295. package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts +0 -1
  296. package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
  297. package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts +0 -1
  298. package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts.map +1 -1
  299. package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts +0 -1
  300. package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
  301. package/dist/types/properties/ts/odyssey-react-mui_id.d.ts +0 -1
  302. package/dist/types/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
  303. package/dist/types/properties/ts/odyssey-react-mui_it.d.ts +0 -1
  304. package/dist/types/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
  305. package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts +0 -1
  306. package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
  307. package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts +0 -1
  308. package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
  309. package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts +0 -1
  310. package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
  311. package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts +0 -1
  312. package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
  313. package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts +0 -1
  314. package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
  315. package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts +3 -1
  316. package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts.map +1 -1
  317. package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts +3 -0
  318. package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts.map +1 -1
  319. package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts +0 -1
  320. package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
  321. package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts +0 -1
  322. package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
  323. package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts +0 -1
  324. package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
  325. package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts +0 -1
  326. package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
  327. package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts +0 -1
  328. package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
  329. package/dist/types/properties/ts/odyssey-react-mui_th.d.ts +0 -1
  330. package/dist/types/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
  331. package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts +0 -1
  332. package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
  333. package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts +0 -1
  334. package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
  335. package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts +0 -1
  336. package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
  337. package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts +0 -1
  338. package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
  339. package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts +0 -1
  340. package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
  341. package/dist/types/theme/components.d.ts.map +1 -1
  342. package/dist/types/ui-shell/NarrowUiShellContent.d.ts.map +1 -1
  343. package/dist/types/ui-shell/SideNav/SideNav.d.ts.map +1 -1
  344. package/dist/types/ui-shell/SideNav/SideNavItemLinkContent.d.ts.map +1 -1
  345. package/dist/types/ui-shell/UiShell.d.ts +1 -1
  346. package/dist/types/ui-shell/UiShell.d.ts.map +1 -1
  347. package/dist/types/ui-shell/UiShellProvider.d.ts +10 -4
  348. package/dist/types/ui-shell/UiShellProvider.d.ts.map +1 -1
  349. package/dist/types/ui-shell/renderUiShell.d.ts +2 -2
  350. package/dist/types/ui-shell/renderUiShell.d.ts.map +1 -1
  351. package/dist/types/ui-shell/useElementAtContainerEdge.d.ts +43 -0
  352. package/dist/types/ui-shell/useElementAtContainerEdge.d.ts.map +1 -0
  353. package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
  354. package/package.json +9 -7
@@ -1 +1 @@
1
- {"version":3,"file":"renderUiShell.cjs","names":["_reactErrorBoundary","require","_bufferLatest","_createMessageBus","_UiShell","_useHasUiShell","_renderReactInWebComponent","_jsxRuntime","optionalComponentSlotNames","exports","banners","rightSideMenu","sideNavFooter","topNavLeftSide","topNavRightSide","renderUiShell","appBackgroundColor","appBackgroundContrastMode","appElement","providedAppElement","appElementScrollingMode","breakpointConfig","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","onRender","parentElement","sideNavBackgroundColor","topNavBackgroundColor","document","createElement","setAttribute","uiShellDataAttribute","publish","publishPropChanges","subscribe","subscribeToPropChanges","createMessageBus","publishSubscriptionCreated","subscribeToReactAppSubscribed","publishAfterReactAppReadyForProps","bufferLatest","closeRightSideMenu","subscribeToCloseRightSideMenu","closeSideNavMenu","subscribeToCloseSideNavMenu","slottedElements","Object","fromEntries","entries","map","optionalComponentKey","slotName","element","webComponentChildren","values","uiShellElement","renderReactInWebComponent","getReactComponent","reactRootElements","jsx","ErrorBoundary","fallback","children","UiShell","onSubscriptionCreated","optionalComponents","name","uiShellAppElement","appRootElement","uiShellStylesElement","stylesRootElement","webComponentParentElement","unsubscribeFromUnifiedUiShellRendered","setComponentProps","appendChild"],"sources":["../../../src/ui-shell/renderUiShell.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { type SetStateAction } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { bufferLatest } from \"./bufferLatest.js\";\nimport { createMessageBus, PublishMessage } from \"./createMessageBus.js\";\nimport { UiShell, UiShellProps } from \"./UiShell.js\";\nimport { UiShellNavComponentProps } from \"./uiShellContentTypes.js\";\nimport { uiShellDataAttribute } from \"./useHasUiShell.js\";\nimport { renderReactInWebComponent } from \"../web-component/renderReactInWebComponent.js\";\n\nexport const optionalComponentSlotNames: Record<\n keyof Required<UiShellProps>[\"optionalComponents\"],\n string\n> = {\n banners: \"banners\",\n rightSideMenu: \"right-side-menu\",\n sideNavFooter: \"side-nav-footer\",\n topNavLeftSide: \"top-nav-left-side\",\n topNavRightSide: \"top-nav-right-side\",\n};\n\nexport type SlottedElements = Record<\n keyof Required<UiShellProps>[\"optionalComponents\"],\n HTMLDivElement\n>;\n\nexport type RenderedUiShell = {\n closeRightSideMenu: PublishMessage<void>;\n closeSideNavMenu: PublishMessage<void>;\n setComponentProps: ReturnType<\n typeof bufferLatest<SetStateAction<UiShellNavComponentProps>>\n >;\n slottedElements: SlottedElements;\n uiShellElement: ReturnType<typeof renderReactInWebComponent>;\n} & Partial<Pick<UiShellProps, \"appElement\">>;\n\n/**\n * This function renders UI Shell in a web component.\n * This function is agnostic to the UI framework for your app is using. Your application can be another web component, a React app, or even vanilla HTML.\n *\n * **All styles are self-contained.** Even though your application visually renders as children of the web component, its within the global `document` scope, not the web component's `ShadowRoot`. That means any global styles will not affect UI Shell but will affect your application.\n *\n * It places your app's root element in a web component <slot> and ensures it remains rendered in the event of a UI Shell error.\n * It also provides you with other elements fitted to slots in the web component. **In React, you can portal to these components.**\n */\nexport const renderUiShell = ({\n appBackgroundColor,\n appBackgroundContrastMode,\n appElement: providedAppElement,\n appElementScrollingMode,\n breakpointConfig,\n hasStandardAppContentPadding,\n initialVisibleSections,\n onError = console.error,\n onRender,\n parentElement,\n sideNavBackgroundColor,\n topNavBackgroundColor,\n}: {\n /**\n * Notifies when a React rendering error occurs. This could be useful for logging, reporting priority 0 issues, and recovering UI Shell when errors occur.\n */\n onError?: () => void;\n /**\n * Notify once when React has rendered UI Shell the first time.\n */\n onRender?: (renderedUiShell: RenderedUiShell) => void;\n /**\n * HTML element used as the container for UI Shell and the App. They're siblings inside this element.\n */\n parentElement: HTMLElement;\n} & Pick<\n UiShellProps,\n | \"appBackgroundColor\"\n | \"appBackgroundContrastMode\"\n | \"appElementScrollingMode\"\n | \"breakpointConfig\"\n | \"hasStandardAppContentPadding\"\n | \"initialVisibleSections\"\n | \"sideNavBackgroundColor\"\n | \"topNavBackgroundColor\"\n> &\n Partial<Pick<UiShellProps, \"appElement\">>) => {\n const appElement = providedAppElement || document.createElement(\"div\");\n\n // Add this attribute so `PageTemplate` and potentially other components will know if they're in UI Shell with special padding already available.\n parentElement.setAttribute(uiShellDataAttribute, \"\");\n\n const { publish: publishPropChanges, subscribe: subscribeToPropChanges } =\n createMessageBus<SetStateAction<UiShellNavComponentProps>>();\n\n const {\n publish: publishSubscriptionCreated,\n subscribe: subscribeToReactAppSubscribed,\n } = createMessageBus();\n\n const publishAfterReactAppReadyForProps = bufferLatest({\n publish: publishPropChanges,\n subscribe: subscribeToReactAppSubscribed,\n });\n\n const {\n publish: closeRightSideMenu,\n subscribe: subscribeToCloseRightSideMenu,\n } = createMessageBus();\n\n const { publish: closeSideNavMenu, subscribe: subscribeToCloseSideNavMenu } =\n createMessageBus();\n\n const slottedElements = Object.fromEntries(\n Object.entries(optionalComponentSlotNames).map(\n ([optionalComponentKey, slotName]) => {\n const element = document.createElement(\"div\");\n\n element.setAttribute(\"slot\", slotName);\n\n return [optionalComponentKey, element];\n },\n ),\n ) as SlottedElements;\n\n const webComponentChildren = Object.values(slottedElements);\n\n const uiShellElement = renderReactInWebComponent({\n getReactComponent: (reactRootElements) => (\n <ErrorBoundary fallback={<div data-error />} onError={onError}>\n <UiShell\n breakpointConfig={breakpointConfig}\n appBackgroundColor={appBackgroundColor}\n appBackgroundContrastMode={appBackgroundContrastMode}\n appElement={appElement}\n appElementScrollingMode={appElementScrollingMode}\n closeSideNavMenu={closeSideNavMenu}\n hasStandardAppContentPadding={hasStandardAppContentPadding}\n initialVisibleSections={initialVisibleSections}\n onError={onError}\n onSubscriptionCreated={publishSubscriptionCreated}\n // `optionalComponents` doesn't need to be memoized because gets passed in once, and this isn't a React component.\n optionalComponents={Object.fromEntries(\n Object.entries(optionalComponentSlotNames).map(\n ([optionalComponentKey, slotName]) => [\n optionalComponentKey,\n <slot name={slotName} />,\n ],\n ),\n )}\n sideNavBackgroundColor={sideNavBackgroundColor}\n subscribeToCloseRightSideMenu={subscribeToCloseRightSideMenu}\n subscribeToCloseSideNavMenu={subscribeToCloseSideNavMenu}\n subscribeToPropChanges={subscribeToPropChanges}\n topNavBackgroundColor={topNavBackgroundColor}\n uiShellAppElement={reactRootElements.appRootElement}\n uiShellStylesElement={reactRootElements.stylesRootElement}\n />\n </ErrorBoundary>\n ),\n webComponentChildren,\n webComponentParentElement: parentElement,\n });\n\n const unsubscribeFromUnifiedUiShellRendered = subscribeToReactAppSubscribed(\n () => {\n unsubscribeFromUnifiedUiShellRendered();\n\n onRender?.({\n appElement,\n closeRightSideMenu,\n closeSideNavMenu,\n setComponentProps: publishAfterReactAppReadyForProps,\n slottedElements,\n uiShellElement,\n });\n },\n );\n\n parentElement.appendChild(appElement);\n\n return {\n appElement,\n closeRightSideMenu,\n closeSideNavMenu,\n setComponentProps: publishAfterReactAppReadyForProps,\n slottedElements,\n uiShellElement,\n };\n};\n"],"mappings":";;;;;;AAaA,IAAAA,mBAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAEA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,0BAAA,GAAAL,OAAA;AAA0F,IAAAM,WAAA,GAAAN,OAAA;AApB1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYO,MAAMO,0BAGZ,GAAAC,OAAA,CAAAD,0BAAA,GAAG;EACFE,OAAO,EAAE,SAAS;EAClBC,aAAa,EAAE,iBAAiB;EAChCC,aAAa,EAAE,iBAAiB;EAChCC,cAAc,EAAE,mBAAmB;EACnCC,eAAe,EAAE;AACnB,CAAC;AA0BM,MAAMC,aAAa,GAAGA,CAAC;EAC5BC,kBAAkB;EAClBC,yBAAyB;EACzBC,UAAU,EAAEC,kBAAkB;EAC9BC,uBAAuB;EACvBC,gBAAgB;EAChBC,4BAA4B;EAC5BC,sBAAsB;EACtBC,OAAO,GAAGC,OAAO,CAACC,KAAK;EACvBC,QAAQ;EACRC,aAAa;EACbC,sBAAsB;EACt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vChD,QAAQ,GAAG;MACTT,UAAU;MACV0B,kBAAkB;MAClBE,gBAAgB;MAChB8B,iBAAiB,EAAElC,iCAAiC;MACpDM,eAAe;MACfU;IACF,CAAC,CAAC;EACJ,CACF,CAAC;EAED9B,aAAa,CAACiD,WAAW,CAAC3D,UAAU,CAAC;EAErC,OAAO;IACLA,UAAU;IACV0B,kBAAkB;IAClBE,gBAAgB;IAChB8B,iBAAiB,EAAElC,iCAAiC;IACpDM,eAAe;IACfU;EACF,CAAC;AACH,CAAC;AAACjD,OAAA,CAAAM,aAAA,GAAAA,aAAA","ignoreList":[]}
1
+ {"version":3,"file":"renderUiShell.cjs","names":["_reactErrorBoundary","require","_bufferLatest","_createMessageBus","_UiShell","_useHasUiShell","_renderReactInWebComponent","_jsxRuntime","optionalComponentSlotNames","exports","banners","rightSideMenu","sideNavFooter","topNavLeftSide","topNavRightSide","renderUiShell","appBackgroundColor","appBackgroundContrastMode","appElement","providedAppElement","appElementScrollingMode","breakpointConfig","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","onRender","parentElement","sideNavBackgroundColor","sideNavBackgroundContrastColor","topNavBackgroundColor","document","createElement","setAttribute","uiShellDataAttribute","publish","publishPropChanges","subscribe","subscribeToPropChanges","createMessageBus","publishSubscriptionCreated","subscribeToReactAppSubscribed","publishAfterReactAppReadyForProps","bufferLatest","closeRightSideMenu","subscribeToCloseRightSideMenu","closeSideNavMenu","subscribeToCloseSideNavMenu","slottedElements","Object","fromEntries","entries","map","optionalComponentKey","slotName","element","webComponentChildren","values","uiShellElement","renderReactInWebComponent","getReactComponent","reactRootElements","jsx","ErrorBoundary","fallback","children","UiShell","onSubscriptionCreated","optionalComponents","name","uiShellAppElement","appRootElement","uiShellStylesElement","stylesRootElement","webComponentParentElement","unsubscribeFromUnifiedUiShellRendered","setComponentProps","appendChild"],"sources":["../../../src/ui-shell/renderUiShell.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { type SetStateAction } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { bufferLatest } from \"./bufferLatest.js\";\nimport { createMessageBus, PublishMessage } from \"./createMessageBus.js\";\nimport { UiShell, UiShellProps } from \"./UiShell.js\";\nimport { UiShellNavComponentProps } from \"./uiShellContentTypes.js\";\nimport { uiShellDataAttribute } from \"./useHasUiShell.js\";\nimport { renderReactInWebComponent } from \"../web-component/renderReactInWebComponent.js\";\n\nexport const optionalComponentSlotNames: Record<\n keyof Required<UiShellProps>[\"optionalComponents\"],\n string\n> = {\n banners: \"banners\",\n rightSideMenu: \"right-side-menu\",\n sideNavFooter: \"side-nav-footer\",\n topNavLeftSide: \"top-nav-left-side\",\n topNavRightSide: \"top-nav-right-side\",\n};\n\nexport type SlottedElements = Record<\n keyof Required<UiShellProps>[\"optionalComponents\"],\n HTMLDivElement\n>;\n\nexport type RenderedUiShell = {\n closeRightSideMenu: PublishMessage<void>;\n closeSideNavMenu: PublishMessage<void>;\n setComponentProps: ReturnType<\n typeof bufferLatest<SetStateAction<UiShellNavComponentProps>>\n >;\n slottedElements: SlottedElements;\n uiShellElement: ReturnType<typeof renderReactInWebComponent>;\n} & Partial<Pick<UiShellProps, \"appElement\">>;\n\n/**\n * This function renders UI Shell in a web component.\n * This function is agnostic to the UI framework for your app is using. Your application can be another web component, a React app, or even vanilla HTML.\n *\n * **All styles are self-contained.** Even though your application visually renders as children of the web component, its within the global `document` scope, not the web component's `ShadowRoot`. That means any global styles will not affect UI Shell but will affect your application.\n *\n * It places your app's root element in a web component <slot> and ensures it remains rendered in the event of a UI Shell error.\n * It also provides you with other elements fitted to slots in the web component. **In React, you can portal to these components.**\n */\nexport const renderUiShell = ({\n appBackgroundColor,\n appBackgroundContrastMode,\n appElement: providedAppElement,\n appElementScrollingMode,\n breakpointConfig,\n hasStandardAppContentPadding,\n initialVisibleSections,\n onError = console.error,\n onRender,\n parentElement,\n sideNavBackgroundColor,\n sideNavBackgroundContrastColor,\n topNavBackgroundColor,\n}: {\n /**\n * Notifies when a React rendering error occurs. This could be useful for logging, reporting priority 0 issues, and recovering UI Shell when errors occur.\n */\n onError?: () => void;\n /**\n * Notify once when React has rendered UI Shell the first time.\n */\n onRender?: (renderedUiShell: RenderedUiShell) => void;\n /**\n * HTML element used as the container for UI Shell and the App. They're siblings inside this element.\n */\n parentElement: HTMLElement;\n} & Pick<\n UiShellProps,\n | \"appBackgroundColor\"\n | \"appBackgroundContrastMode\"\n | \"appElementScrollingMode\"\n | \"breakpointConfig\"\n | \"hasStandardAppContentPadding\"\n | \"initialVisibleSections\"\n | \"sideNavBackgroundColor\"\n | \"sideNavBackgroundContrastColor\"\n | \"topNavBackgroundColor\"\n> &\n Partial<Pick<UiShellProps, \"appElement\">>) => {\n const appElement = providedAppElement || document.createElement(\"div\");\n\n // Add this attribute so `PageTemplate` and potentially other components will know if they're in UI Shell with special padding already available.\n parentElement.setAttribute(uiShellDataAttribute, \"\");\n\n const { publish: publishPropChanges, subscribe: subscribeToPropChanges } =\n createMessageBus<SetStateAction<UiShellNavComponentProps>>();\n\n const {\n publish: publishSubscriptionCreated,\n subscribe: subscribeToReactAppSubscribed,\n } = createMessageBus();\n\n const publishAfterReactAppReadyForProps = bufferLatest({\n publish: publishPropChanges,\n subscribe: subscribeToReactAppSubscribed,\n });\n\n const {\n publish: closeRightSideMenu,\n subscribe: subscribeToCloseRightSideMenu,\n } = createMessageBus();\n\n const { publish: closeSideNavMenu, subscribe: subscribeToCloseSideNavMenu } =\n createMessageBus();\n\n const slottedElements = Object.fromEntries(\n Object.entries(optionalComponentSlotNames).map(\n ([optionalComponentKey, slotName]) => {\n const element = document.createElement(\"div\");\n\n element.setAttribute(\"slot\", slotName);\n\n return [optionalComponentKey, element];\n },\n ),\n ) as SlottedElements;\n\n const webComponentChildren = Object.values(slottedElements);\n\n const uiShellElement = renderReactInWebComponent({\n getReactComponent: (reactRootElements) => (\n <ErrorBoundary fallback={<div data-error />} onError={onError}>\n <UiShell\n breakpointConfig={breakpointConfig}\n appBackgroundColor={appBackgroundColor}\n appBackgroundContrastMode={appBackgroundContrastMode}\n appElement={appElement}\n appElementScrollingMode={appElementScrollingMode}\n closeSideNavMenu={closeSideNavMenu}\n hasStandardAppContentPadding={hasStandardAppContentPadding}\n initialVisibleSections={initialVisibleSections}\n onError={onError}\n onSubscriptionCreated={publishSubscriptionCreated}\n // `optionalComponents` doesn't need to be memoized because gets passed in once, and this isn't a React component.\n optionalComponents={Object.fromEntries(\n Object.entries(optionalComponentSlotNames).map(\n ([optionalComponentKey, slotName]) => [\n optionalComponentKey,\n <slot name={slotName} />,\n ],\n ),\n )}\n sideNavBackgroundColor={sideNavBackgroundColor}\n sideNavBackgroundContrastColor={sideNavBackgroundContrastColor}\n subscribeToCloseRightSideMenu={subscribeToCloseRightSideMenu}\n subscribeToCloseSideNavMenu={subscribeToCloseSideNavMenu}\n subscribeToPropChanges={subscribeToPropChanges}\n topNavBackgroundColor={topNavBackgroundColor}\n uiShellAppElement={reactRootElements.appRootElement}\n uiShellStylesElement={reactRootElements.stylesRootElement}\n />\n </ErrorBoundary>\n ),\n webComponentChildren,\n webComponentParentElement: parentElement,\n });\n\n const unsubscribeFromUnifiedUiShellRendered = subscribeToReactAppSubscribed(\n () => {\n unsubscribeFromUnifiedUiShellRendered();\n\n onRender?.({\n appElement,\n closeRightSideMenu,\n closeSideNavMenu,\n setComponentProps: publishAfterReactAppReadyForProps,\n slottedElements,\n uiShellElement,\n });\n },\n );\n\n parentElement.appendChild(appElement);\n\n return {\n appElement,\n closeRightSideMenu,\n closeSideNavMen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 +1,74 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useElementAtContainerEdge = useElementAtContainerEdge;
7
+ var _react = require("react");
8
+ var _getLogicalBoundaries = require("../getLogicalBoundaries.cjs");
9
+ /*!
10
+ * Copyright (c) 2025-present, Okta, Inc. and/or its affiliates. All rights reserved.
11
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
12
+ *
13
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ *
18
+ * See the License for the specific language governing permissions and limitations under the License.
19
+ */
20
+
21
+ const defaultEdgeState = {
22
+ isAtContainerInlineStart: null,
23
+ isAtContainerInlineEnd: null,
24
+ isAtContainerBlockStart: null,
25
+ isAtContainerBlockEnd: null
26
+ };
27
+ function useElementAtContainerEdge({
28
+ containerElement,
29
+ element,
30
+ monitoringElement
31
+ }) {
32
+ const [edgeState, setEdgeState] = (0, _react.useState)(defaultEdgeState);
33
+ const requestedAnimationFrameIdRef = (0, _react.useRef)(0);
34
+ const resolvedMonitoringElement = monitoringElement ?? element?.parentElement;
35
+ const updateEdgeState = (0, _react.useCallback)(() => {
36
+ cancelAnimationFrame(requestedAnimationFrameIdRef.current);
37
+ requestedAnimationFrameIdRef.current = requestAnimationFrame(() => {
38
+ if (element) {
39
+ const elementBoundaries = (0, _getLogicalBoundaries.getLogicalBoundaries)(element);
40
+ const containerBoundaries = (0, _getLogicalBoundaries.getLogicalBoundaries)(containerElement ?? document.body);
41
+ setEdgeState({
42
+ isAtContainerInlineStart: elementBoundaries.left === containerBoundaries.left,
43
+ isAtContainerInlineEnd: elementBoundaries.right === containerBoundaries.right,
44
+ isAtContainerBlockStart: elementBoundaries.top === containerBoundaries.top,
45
+ isAtContainerBlockEnd: elementBoundaries.bottom === containerBoundaries.bottom
46
+ });
47
+ } else {
48
+ setEdgeState(defaultEdgeState);
49
+ }
50
+ });
51
+ }, [containerElement, element]);
52
+ (0, _react.useEffect)(() => {
53
+ const mutationObserver = new MutationObserver(() => {
54
+ updateEdgeState();
55
+ });
56
+ if (resolvedMonitoringElement) {
57
+ mutationObserver.observe(resolvedMonitoringElement, {
58
+ attributes: true,
59
+ attributeFilter: ["style"],
60
+ childList: true,
61
+ subtree: true
62
+ });
63
+ }
64
+ window.addEventListener("resize", updateEdgeState);
65
+ updateEdgeState();
66
+ return () => {
67
+ cancelAnimationFrame(requestedAnimationFrameIdRef.current);
68
+ mutationObserver.disconnect();
69
+ window.removeEventListener("resize", updateEdgeState);
70
+ };
71
+ }, [resolvedMonitoringElement, updateEdgeState]);
72
+ return edgeState;
73
+ }
74
+ //# sourceMappingURL=useElementAtContainerEdge.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useElementAtContainerEdge.cjs","names":["_react","require","_getLogicalBoundaries","defaultEdgeState","isAtContainerInlineStart","isAtContainerInlineEnd","isAtContainerBlockStart","isAtContainerBlockEnd","useElementAtContainerEdge","containerElement","element","monitoringElement","edgeState","setEdgeState","useState","requestedAnimationFrameIdRef","useRef","resolvedMonitoringElement","parentElement","updateEdgeState","useCallback","cancelAnimationFrame","current","requestAnimationFrame","elementBoundaries","getLogicalBoundaries","containerBoundaries","document","body","left","right","top","bottom","useEffect","mutationObserver","MutationObserver","observe","attributes","attributeFilter","childList","subtree","window","addEventListener","disconnect","removeEventListener"],"sources":["../../../src/ui-shell/useElementAtContainerEdge.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { useEffect, useState, useRef, useCallback } from \"react\";\nimport { getLogicalBoundaries } from \"../getLogicalBoundaries.js\";\n\nconst defaultEdgeState = {\n isAtContainerInlineStart: null,\n isAtContainerInlineEnd: null,\n isAtContainerBlockStart: null,\n isAtContainerBlockEnd: null,\n};\n\ntype EdgeState =\n | {\n isAtContainerInlineStart: null;\n isAtContainerInlineEnd: null;\n isAtContainerBlockStart: null;\n isAtContainerBlockEnd: null;\n }\n | {\n isAtContainerInlineStart: boolean;\n isAtContainerInlineEnd: boolean;\n isAtContainerBlockStart: boolean;\n isAtContainerBlockEnd: boolean;\n };\n\n/**\n * Determines if an element is at the edge of its container.\n *\n * If `element` is `null`, all returned edge state values will be `null`.\n */\nexport function useElementAtContainerEdge({\n containerElement,\n element,\n monitoringElement,\n}: {\n /**\n * The container element against which the edges are checked. If not provided, it defaults to the document body.\n */\n containerElement?: HTMLElement | null;\n /**\n * The element whose edges you want to track.\n */\n element?: HTMLElement | null;\n /**\n * The element whose mutations you want to track. If not provided, it defaults to the parent element of the `element`.\n */\n monitoringElement?: HTMLElement | null;\n}) {\n const [edgeState, setEdgeState] = useState<EdgeState>(defaultEdgeState);\n\n const requestedAnimationFrameIdRef = useRef(0);\n\n const resolvedMonitoringElement = monitoringElement ?? element?.parentElement;\n\n // will check the position of the element and update state accordingly\n const updateEdgeState = useCallback(() => {\n cancelAnimationFrame(requestedAnimationFrameIdRef.current);\n\n requestedAnimationFrameIdRef.current = requestAnimationFrame(() => {\n if (element) {\n const elementBoundaries = getLogicalBoundaries(element);\n const containerBoundaries = getLogicalBoundaries(\n containerElement ?? document.body,\n );\n\n setEdgeState({\n isAtContainerInlineStart:\n elementBoundaries.left === containerBoundaries.left,\n isAtContainerInlineEnd:\n elementBoundaries.right === containerBoundaries.right,\n isAtContainerBlockStart:\n elementBoundaries.top === containerBoundaries.top,\n isAtContainerBlockEnd:\n elementBoundaries.bottom === containerBoundaries.bottom,\n });\n } else {\n setEdgeState(defaultEdgeState);\n }\n });\n }, [containerElement, element]);\n\n useEffect(() => {\n // Listen for mutations that might affect position\n const mutationObserver = new MutationObserver(() => {\n updateEdgeState();\n });\n\n if (resolvedMonitoringElement) {\n mutationObserver.observe(resolvedMonitoringElement, {\n attributes: true,\n attributeFilter: [\"style\"],\n childList: true,\n subtree: true,\n });\n }\n\n // Listen for window resize, which can affect position\n window.addEventListener(\"resize\", updateEdgeState);\n\n // Initial check\n updateEdgeState();\n\n // cleanup function to remove listeners and observer\n return () => {\n cancelAnimationFrame(requestedAnimationFrameIdRef.current);\n mutationObserver.disconnect();\n window.removeEventListener(\"resize\", updateEdgeState);\n };\n }, [resolvedMonitoringElement, updateEdgeState]);\n\n return edgeState;\n}\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAD,OAAA;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,MAAME,gBAAgB,GAAG;EACvBC,wBAAwB,EAAE,IAAI;EAC9BC,sBAAsB,EAAE,IAAI;EAC5BC,uBAAuB,EAAE,IAAI;EAC7BC,qBAAqB,EAAE;AACzB,CAAC;AAqBM,SAASC,yBAAyBA,CAAC;EACxCC,gBAAgB;EAChBC,OAAO;EACPC;AAcF,CAAC,EAAE;EACD,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAG,IAAAC,eAAQ,EAAYX,gBAAgB,CAAC;EAEvE,MAAMY,4BAA4B,GAAG,IAAAC,aAAM,EAAC,CAAC,CAAC;EAE9C,MAAMC,yBAAyB,GAAGN,iBAAiB,IAAID,OAAO,EAAEQ,aAAa;EAG7E,MAAMC,eAAe,GAAG,IAAAC,kBAAW,EAAC,MAAM;IACxCC,oBAAoB,CAACN,4BAA4B,CAACO,OAAO,CAAC;IAE1DP,4BAA4B,CAACO,OAAO,G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mB,CAAC,QAAQ,EAAEzB,eAAe,CAAC;IACvD,CAAC;EACH,CAAC,EAAE,CAACF,yBAAyB,EAAEE,eAAe,CAAC,CAAC;EAEhD,OAAOP,SAAS;AAClB","ignoreList":[]}
@@ -21,13 +21,13 @@ const useMountLifecycleEffect = ({
21
21
  onMount,
22
22
  onUpdate
23
23
  }) => {
24
- const hasSetSessionStorageRef = (0, _react.useRef)(false);
24
+ const isMounted = (0, _react.useRef)(false);
25
25
  const onMountRef = (0, _react.useRef)(onMount);
26
26
  (0, _react.useEffect)(() => {
27
- if (hasSetSessionStorageRef.current) {
27
+ if (isMounted.current) {
28
28
  onUpdate?.();
29
29
  } else {
30
- hasSetSessionStorageRef.current = true;
30
+ isMounted.current = true;
31
31
  onMountRef.current?.();
32
32
  }
33
33
  }, [onUpdate]);
@@ -1 +1 @@
1
- {"version":3,"file":"useMountLifecycleEffect.cjs","names":["_react","require","useMountLifecycleEffect","onMount","onUpdate","hasSetSessionStorageRef","useRef","onMountRef","useEffect","current","exports"],"sources":["../../src/useMountLifecycleEffect.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { useEffect, useRef } from \"react\";\n\nexport const useMountLifecycleEffect = ({\n onMount,\n onUpdate,\n}: {\n onMount?: () => void;\n onUpdate?: () => void;\n}) => {\n const hasSetSessionStorageRef = useRef(false);\n const onMountRef = useRef(onMount);\n\n useEffect(() => {\n if (hasSetSessionStorageRef.current) {\n onUpdate?.();\n } else {\n hasSetSessionStorageRef.current = true;\n onMountRef.current?.();\n }\n }, [onUpdate]);\n};\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIO,MAAMC,uBAAuB,GAAGA,CAAC;EACtCC,OAAO;EACPC;AAIF,CAAC,KAAK;EACJ,MAAMC,uBAAuB,GAAG,IAAAC,aAAM,EAAC,KAAK,CAAC;EAC7C,MAAMC,UAAU,GAAG,IAAAD,aAAM,EAACH,OAAO,CAAC;EAElC,IAAAK,gBAAS,EAAC,MAAM;IACd,IAAIH,uBAAuB,CAACI,OAAO,EAAE;MACnCL,QAAQ,GAAG,CAAC;IACd,CAAC,MAAM;MACLC,uBAAuB,CAACI,OAAO,GAAG,IAAI;MACtCF,UAAU,CAACE,OAAO,GAAG,CAAC;IACxB;EACF,CAAC,EAAE,CAACL,QAAQ,CAAC,CAAC;AAChB,CAAC;AAACM,OAAA,CAAAR,uBAAA,GAAAA,uBAAA","ignoreList":[]}
1
+ {"version":3,"file":"useMountLifecycleEffect.cjs","names":["_react","require","useMountLifecycleEffect","onMount","onUpdate","isMounted","useRef","onMountRef","useEffect","current","exports"],"sources":["../../src/useMountLifecycleEffect.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { useEffect, useRef } from \"react\";\n\nexport const useMountLifecycleEffect = ({\n onMount,\n onUpdate,\n}: {\n onMount?: () => void;\n onUpdate?: () => void;\n}) => {\n const isMounted = useRef(false);\n const onMountRef = useRef(onMount);\n\n useEffect(() => {\n if (isMounted.current) {\n onUpdate?.();\n } else {\n isMounted.current = true;\n onMountRef.current?.();\n }\n }, [onUpdate]);\n};\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIO,MAAMC,uBAAuB,GAAGA,CAAC;EACtCC,OAAO;EACPC;AAIF,CAAC,KAAK;EACJ,MAAMC,SAAS,GAAG,IAAAC,aAAM,EAAC,KAAK,CAAC;EAC/B,MAAMC,UAAU,GAAG,IAAAD,aAAM,EAACH,OAAO,CAAC;EAElC,IAAAK,gBAAS,EAAC,MAAM;IACd,IAAIH,SAAS,CAACI,OAAO,EAAE;MACrBL,QAAQ,GAAG,CAAC;IACd,CAAC,MAAM;MACLC,SAAS,CAACI,OAAO,GAAG,IAAI;MACxBF,UAAU,CAACE,OAAO,GAAG,CAAC;IACxB;EACF,CAAC,EAAE,CAACL,QAAQ,CAAC,CAAC;AAChB,CAAC;AAACM,OAAA,CAAAR,uBAAA,GAAAA,uBAAA","ignoreList":[]}
@@ -15,5 +15,5 @@ exports.default = void 0;
15
15
  *
16
16
  * See the License for the specific language governing permissions and limitations under the License.
17
17
  */
18
- var _default = exports.default = "1-41-1";
18
+ var _default = exports.default = "1-43-0";
19
19
  //# sourceMappingURL=odysseyWebComponentVersion.generated.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"odysseyWebComponentVersion.generated.cjs","names":["_default","exports","default"],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\n\nexport default \"1-41-1\";\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,IAAAA,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAkBe,QAAQ","ignoreList":[]}
1
+ {"version":3,"file":"odysseyWebComponentVersion.generated.cjs","names":["_default","exports","default"],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\n\nexport default \"1-43-0\";\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,IAAAA,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAkBe,QAAQ","ignoreList":[]}
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
14
- import { useMaterialReactTable, MRT_TableContainer } from "material-react-table";
14
+ import { MRT_TableContainer, useMaterialReactTable } from "material-react-table";
15
15
  import { useTranslation } from "react-i18next";
16
16
  import { ArrowDownIcon, ArrowUnsortedIcon, ChevronDownIcon, DragIndicatorIcon, MoreIcon } from "../icons.generated/index.js";
17
17
  import { densityValues } from "./constants.js";
@@ -244,6 +244,65 @@ const DataTable = ({
244
244
  }, [columns]);
245
245
  const columnOrder = useMemo(() => ["mrt-row-drag", "mrt-row-select", "mrt-row-expand", ...columnIds, "mrt-row-actions"], [columnIds]);
246
246
  const shouldDisplayRowActions = useMemo(() => hasRowReordering === true && onReorderRows || rowActionButtons || rowActionMenuItems ? true : false, [hasRowReordering, onReorderRows, rowActionButtons, rowActionMenuItems]);
247
+ const muiTableBodyProps = useCallback(() => ({
248
+ className: rowDensityClassName
249
+ }), [rowDensityClassName]);
250
+ const muiTableBodyCellProps = useCallback(({
251
+ column
252
+ }) => ({
253
+ className: column.getIsResizing() ? "isResizing" : "",
254
+ sx: {
255
+ overflowWrap: "anywhere"
256
+ }
257
+ }), []);
258
+ const muiDetailPanelProps = useCallback(({
259
+ row
260
+ }) => ({
261
+ sx: {
262
+ paddingBlock: row.getIsExpanded() ? `${odysseyDesignTokens.Spacing3} !important` : undefined
263
+ }
264
+ }), [odysseyDesignTokens.Spacing3]);
265
+ const muiTableBodyRowProps = useCallback(({
266
+ table,
267
+ row,
268
+ isDetailPanel
269
+ }) => ({
270
+ className: draggableTableBodyRowClassName({
271
+ currentRowId: row.id,
272
+ draggingRowId: draggingRow?.id,
273
+ hoveredRowId: table.getState().hoveredRow?.id
274
+ }),
275
+ sx: {
276
+ ...(isDetailPanel && {
277
+ paddingBlock: "0 !important",
278
+ border: 0,
279
+ ["&:hover"]: {
280
+ backgroundColor: `transparent !important`
281
+ }
282
+ })
283
+ }
284
+ }), [draggableTableBodyRowClassName, draggingRow?.id]);
285
+ const muiRowDragHandleProps = useCallback(({
286
+ table,
287
+ row
288
+ }) => ({
289
+ onKeyDown: event => handleDragHandleKeyDown({
290
+ table,
291
+ row,
292
+ event
293
+ }),
294
+ onBlur: () => resetDraggingAndHoveredRow(table),
295
+ onDragEnd: () => handleDragHandleOnDragEnd(table),
296
+ onDragCapture: () => handleDragHandleOnDragCapture(table),
297
+ sx: dragHandleStyles,
298
+ ...dragHandleText
299
+ }), [dragHandleStyles, dragHandleText, handleDragHandleKeyDown, resetDraggingAndHoveredRow, handleDragHandleOnDragEnd, handleDragHandleOnDragCapture]);
300
+ const muiTableHeadCellProps = useCallback(({
301
+ column: currentColumn
302
+ }) => ({
303
+ className: columnSorting.find(sortedColumn => sortedColumn.id === currentColumn.id) ? "isSorted" : "isUnsorted"
304
+ }), [columnSorting]);
305
+ const hasColumnWithGrow = useMemo(() => columns.some(column => column.grow === true), [columns]);
247
306
  const dataTable = useMaterialReactTable({
248
307
  columns: columns,
249
308
  data: data,
@@ -356,44 +415,16 @@ const DataTable = ({
356
415
  header: ""
357
416
  }
358
417
  },
359
- muiTableBodyProps: () => ({
360
- className: rowDensityClassName
361
- }),
418
+ muiTableBodyProps,
362
419
  defaultColumn: {
363
420
  Cell: defaultCell
364
421
  },
365
- muiTableBodyCellProps: ({
366
- column
367
- }) => ({
368
- className: column.getIsResizing() ? "isResizing" : ""
369
- }),
422
+ muiTableBodyCellProps,
370
423
  enableRowOrdering: hasRowReordering && Boolean(onReorderRows),
371
424
  enableRowDragging: hasRowReordering && Boolean(onReorderRows),
372
- muiTableBodyRowProps: ({
373
- table,
374
- row
375
- }) => ({
376
- className: draggableTableBodyRowClassName({
377
- currentRowId: row.id,
378
- draggingRowId: draggingRow?.id,
379
- hoveredRowId: table.getState().hoveredRow?.id
380
- })
381
- }),
382
- muiRowDragHandleProps: ({
383
- table,
384
- row
385
- }) => ({
386
- onKeyDown: event => handleDragHandleKeyDown({
387
- table,
388
- row,
389
- event
390
- }),
391
- onBlur: () => resetDraggingAndHoveredRow(table),
392
- onDragEnd: () => handleDragHandleOnDragEnd(table),
393
- onDragCapture: () => handleDragHandleOnDragCapture(table),
394
- sx: dragHandleStyles,
395
- ...dragHandleText
396
- }),
425
+ muiDetailPanelProps,
426
+ muiTableBodyRowProps,
427
+ muiRowDragHandleProps,
397
428
  enableRowActions: shouldDisplayRowActions,
398
429
  positionActionsColumn: "last",
399
430
  renderRowActions: ({
@@ -405,11 +436,7 @@ const DataTable = ({
405
436
  onRowSelectionChange: setRowSelection,
406
437
  enableSorting: hasSorting,
407
438
  onSortingChange: setColumnSorting,
408
- muiTableHeadCellProps: ({
409
- column: currentColumn
410
- }) => ({
411
- className: columnSorting.find(sortedColumn => sortedColumn.id === currentColumn.id) ? "isSorted" : "isUnsorted"
412
- }),
439
+ muiTableHeadCellProps,
413
440
  enableRowVirtualization: paginationType !== "loadMore" && pagination.pageSize > 50,
414
441
  rowVirtualizerInstanceRef: useRef(null),
415
442
  rowVirtualizerOptions: {
@@ -418,7 +445,7 @@ const DataTable = ({
418
445
  renderEmptyRowsFallback: emptyState,
419
446
  muiTableProps: {
420
447
  ref: tableContentRef,
421
- className: !shouldDisplayRowActions && hasColumnResizing ? "ods-hide-spacer-column" : ""
448
+ className: !shouldDisplayRowActions && hasColumnResizing ? hasColumnWithGrow ? "ods-hide-spacer-column" : "ods-hide-spacer-column ods-column-grow" : ""
422
449
  },
423
450
  muiTableContainerProps: {
424
451
  ref: tableInnerContainerRef