@flipdish/portal-library 1.0.77 → 2.0.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 (310) hide show
  1. package/dist/Icons/AccessTimeIcon/index.d.ts +2 -0
  2. package/dist/Icons/AccessTimeIcon/index.js +2 -0
  3. package/dist/Icons/CalenderTodayIcon/index.d.ts +2 -0
  4. package/dist/Icons/CalenderTodayIcon/index.js +2 -0
  5. package/dist/Icons/CalenderTodayIcon/index.js.map +1 -0
  6. package/dist/Icons/DoneIcon/index.d.ts +2 -0
  7. package/dist/Icons/DoneIcon/index.js +2 -0
  8. package/dist/Icons/DoneIcon/index.js.map +1 -0
  9. package/dist/Icons/SearchIcon/index.d.ts +2 -0
  10. package/dist/Icons/SearchIcon/index.js +2 -0
  11. package/dist/Icons/SearchIcon/index.js.map +1 -0
  12. package/dist/Icons/logo/Deliveroo/index.d.ts +8 -0
  13. package/dist/Icons/logo/Deliveroo/index.js +2 -0
  14. package/dist/Icons/logo/Deliveroo/index.js.map +1 -0
  15. package/dist/components/Chip/index.js +2 -0
  16. package/dist/components/Chip/index.js.map +1 -0
  17. package/dist/components/FDErrorBoundary/index.d.ts +9 -0
  18. package/dist/components/FDErrorBoundary/index.js +2 -0
  19. package/dist/components/FDErrorBoundary/index.js.map +1 -0
  20. package/dist/components/FlipdishLogoLoader/index.js +2 -0
  21. package/dist/components/FlipdishLogoLoader/index.js.map +1 -0
  22. package/dist/components/FlipdishStaffContainer/index.js +2 -0
  23. package/dist/components/FlipdishStaffContainer/index.js.map +1 -0
  24. package/dist/components/Form/FormItemLayout/index.d.ts +16 -0
  25. package/dist/components/{ui/Form/FormItemLayout.js → Form/FormItemLayout/index.js} +1 -1
  26. package/dist/components/Form/FormItemLayout/index.js.map +1 -0
  27. package/dist/components/Form/GenericAutocompleteField/index.js +2 -0
  28. package/dist/components/Form/GenericAutocompleteField/index.js.map +1 -0
  29. package/dist/components/{ui/Form/GenericFormContainer.js → Form/GenericFormContainer/index.js} +1 -1
  30. package/dist/components/Form/GenericFormContainer/index.js.map +1 -0
  31. package/dist/components/Form/GenericTextField/index.js +2 -0
  32. package/dist/components/Form/GenericTextField/index.js.map +1 -0
  33. package/dist/components/{components/ui/Form/PaginatedAutocompleteField.d.ts → Form/PaginatedAutocompleteField/index.d.ts} +1 -1
  34. package/dist/components/Form/PaginatedAutocompleteField/index.js +2 -0
  35. package/dist/components/Form/PaginatedAutocompleteField/index.js.map +1 -0
  36. package/dist/components/{components/ui/GenericDatePickerField → GenericDatePickerField}/GenericDateFieldBase.d.ts +3 -1
  37. package/dist/components/GenericDatePickerField/GenericDateFieldBase.js +2 -0
  38. package/dist/components/GenericDatePickerField/GenericDateFieldBase.js.map +1 -0
  39. package/dist/components/{ui/GenericDatePickerField/GenericDatePickerField.js → GenericDatePickerField/index.js} +1 -1
  40. package/dist/components/GenericDatePickerField/index.js.map +1 -0
  41. package/dist/components/{ui/GenericDateTimePickerField/GenericDateTimePickerField.js → GenericDateTimePickerField/index.js} +1 -1
  42. package/dist/components/GenericDateTimePickerField/index.js.map +1 -0
  43. package/dist/components/GenericRadioButtons/index.js +2 -0
  44. package/dist/components/GenericRadioButtons/index.js.map +1 -0
  45. package/dist/components/GenericTable/HighlightScrollbar.d.ts +11 -0
  46. package/dist/components/GenericTable/HighlightScrollbar.js.map +1 -0
  47. package/dist/components/{components/ui/GenericTable/GenericTable.d.ts → GenericTable/index.d.ts} +1 -1
  48. package/dist/components/{ui/GenericTable/GenericTable.js → GenericTable/index.js} +3 -3
  49. package/dist/components/GenericTable/index.js.map +1 -0
  50. package/dist/components/GenericTableBody/index.d.ts +37 -0
  51. package/dist/components/GenericTableBody/index.js +2 -0
  52. package/dist/components/GenericTableBody/index.js.map +1 -0
  53. package/dist/components/{ui/GenericTableBodyRow/GenericTableBodyRow.js → GenericTableBodyRow/index.js} +1 -1
  54. package/dist/components/GenericTableBodyRow/index.js.map +1 -0
  55. package/dist/components/{ui/GenericTableTitle/GenericTableTitle.js → GenericTableTitle/index.js} +1 -1
  56. package/dist/components/GenericTableTitle/index.js.map +1 -0
  57. package/dist/components/{ui/LazyComponent/LazyComponent.js → LazyComponent/index.js} +1 -1
  58. package/dist/components/LazyComponent/index.js.map +1 -0
  59. package/dist/components/{ui/ListItemLink/ListItemLink.js → ListItemLink/index.js} +1 -1
  60. package/dist/components/ListItemLink/index.js.map +1 -0
  61. package/dist/components/ListItemLinkButton/index.js +2 -0
  62. package/dist/components/ListItemLinkButton/index.js.map +1 -0
  63. package/dist/components/{ui/NoResults/NoResults.js → NoResults/index.js} +1 -1
  64. package/dist/components/NoResults/index.js.map +1 -0
  65. package/dist/components/NotFoundPage/index.js +2 -0
  66. package/dist/components/NotFoundPage/index.js.map +1 -0
  67. package/dist/components/PageLayout/DocumentTitle.d.ts +6 -0
  68. package/dist/components/PageLayout/DocumentTitle.js +2 -0
  69. package/dist/components/PageLayout/DocumentTitle.js.map +1 -0
  70. package/dist/components/PageLayout/FullWidthContainer.d.ts +13 -0
  71. package/dist/components/PageLayout/FullWidthContainer.js.map +1 -0
  72. package/dist/components/PageLayout/GlobalSpacingStyles.d.ts +5 -0
  73. package/dist/components/PageLayout/GlobalSpacingStyles.js +2 -0
  74. package/dist/components/PageLayout/GlobalSpacingStyles.js.map +1 -0
  75. package/dist/components/{components/ui/PageLayout/PageLayout.d.ts → PageLayout/index.d.ts} +9 -1
  76. package/dist/components/PageLayout/index.js +2 -0
  77. package/dist/components/PageLayout/index.js.map +1 -0
  78. package/dist/components/{ui/PortalMock/PortalMock.js → PortalMock/index.js} +1 -1
  79. package/dist/components/PortalMock/index.js.map +1 -0
  80. package/dist/components/{ui/Spacer/Spacer.js → Spacer/index.js} +1 -1
  81. package/dist/components/Spacer/index.js.map +1 -0
  82. package/dist/components/{ui/Switch/Switch.js → Switch/index.js} +1 -1
  83. package/dist/components/Switch/index.js.map +1 -0
  84. package/dist/components/Tooltip/index.js +2 -0
  85. package/dist/components/Tooltip/index.js.map +1 -0
  86. package/dist/custom-hooks/useMicroFrontendAttributes.js.map +1 -0
  87. package/dist/custom-hooks/useRenderValidText.js +2 -0
  88. package/dist/custom-hooks/useRenderValidText.js.map +1 -0
  89. package/dist/custom-hooks/useToasts.js.map +1 -0
  90. package/dist/localization/de.json.js +2 -0
  91. package/dist/localization/de.json.js.map +1 -0
  92. package/dist/localization/dev-lang.json.js +2 -0
  93. package/dist/localization/dev-lang.json.js.map +1 -0
  94. package/dist/localization/en-US.json.js +2 -0
  95. package/dist/localization/en-US.json.js.map +1 -0
  96. package/dist/localization/en.json.d.ts +63 -0
  97. package/dist/localization/es-MX.json.js +2 -0
  98. package/dist/localization/es-MX.json.js.map +1 -0
  99. package/dist/localization/es.json.js +2 -0
  100. package/dist/localization/es.json.js.map +1 -0
  101. package/dist/localization/fr.json.js +2 -0
  102. package/dist/localization/fr.json.js.map +1 -0
  103. package/dist/localization/it.json.js +2 -0
  104. package/dist/localization/it.json.js.map +1 -0
  105. package/dist/localization/nl.json.js +2 -0
  106. package/dist/localization/nl.json.js.map +1 -0
  107. package/dist/localization/pt.json.js +2 -0
  108. package/dist/localization/pt.json.js.map +1 -0
  109. package/dist/providers/DateTimeLocalizationProvider.js.map +1 -0
  110. package/dist/providers/TranslationProvider.d.ts +25 -0
  111. package/dist/providers/TranslationProvider.js +1 -1
  112. package/dist/providers/TranslationProvider.js.map +1 -1
  113. package/dist/stories/utilities/MockPageContent.d.ts +5 -0
  114. package/dist/stories/utilities/MockPageContent.js +2 -0
  115. package/dist/stories/utilities/MockPageContent.js.map +1 -0
  116. package/dist/themes/flipdishPublicTheme.d.ts +5 -0
  117. package/dist/themes/flipdishPublicTheme.js +2 -0
  118. package/dist/themes/flipdishPublicTheme.js.map +1 -0
  119. package/dist/utilities/formValidation.d.ts +6 -0
  120. package/dist/utilities/formValidation.js.map +1 -0
  121. package/dist/{components/genericUtilities/index.js → utilities/genericUtilities.js} +1 -1
  122. package/dist/utilities/genericUtilities.js.map +1 -0
  123. package/dist/{components/components/renderUtilities → utilities}/renderUtilities.d.ts +4 -4
  124. package/dist/utilities/renderUtilities.js +2 -0
  125. package/dist/utilities/renderUtilities.js.map +1 -0
  126. package/dist/utilities/validation.d.ts +3 -0
  127. package/package.json +30 -1
  128. package/dist/assets/images/fd-loader.gif.cjs.js +0 -2
  129. package/dist/assets/images/fd-loader.gif.cjs.js.map +0 -1
  130. package/dist/components/components/index.d.ts +0 -38
  131. package/dist/components/components/themes/flipdishPublicTheme.d.ts +0 -28
  132. package/dist/components/components/ui/Form/utilities/formValidation.d.ts +0 -6
  133. package/dist/components/components/ui/GenericTable/types.d.ts +0 -13
  134. package/dist/components/components/ui/GenericTableBody/GenericTableBody.d.ts +0 -16
  135. package/dist/components/custom-hooks/useMicroFrontendAttributes.cjs.js +0 -2
  136. package/dist/components/custom-hooks/useMicroFrontendAttributes.cjs.js.map +0 -1
  137. package/dist/components/custom-hooks/useMicroFrontendAttributes.js.map +0 -1
  138. package/dist/components/custom-hooks/useRenderValidText.cjs.js +0 -2
  139. package/dist/components/custom-hooks/useRenderValidText.cjs.js.map +0 -1
  140. package/dist/components/custom-hooks/useRenderValidText.js +0 -2
  141. package/dist/components/custom-hooks/useRenderValidText.js.map +0 -1
  142. package/dist/components/custom-hooks/useToasts.cjs.js +0 -2
  143. package/dist/components/custom-hooks/useToasts.cjs.js.map +0 -1
  144. package/dist/components/custom-hooks/useToasts.js.map +0 -1
  145. package/dist/components/genericUtilities/index.cjs.js +0 -2
  146. package/dist/components/genericUtilities/index.cjs.js.map +0 -1
  147. package/dist/components/genericUtilities/index.js.map +0 -1
  148. package/dist/components/index.cjs.js +0 -2
  149. package/dist/components/index.cjs.js.map +0 -1
  150. package/dist/components/index.js +0 -2
  151. package/dist/components/renderUtilities/renderUtilities.cjs.js +0 -2
  152. package/dist/components/renderUtilities/renderUtilities.cjs.js.map +0 -1
  153. package/dist/components/renderUtilities/renderUtilities.js +0 -2
  154. package/dist/components/renderUtilities/renderUtilities.js.map +0 -1
  155. package/dist/components/themes/flipdishPublicTheme.cjs.js +0 -2
  156. package/dist/components/themes/flipdishPublicTheme.cjs.js.map +0 -1
  157. package/dist/components/themes/flipdishPublicTheme.js +0 -2
  158. package/dist/components/themes/flipdishPublicTheme.js.map +0 -1
  159. package/dist/components/ui/Chip/Chip.cjs.js +0 -2
  160. package/dist/components/ui/Chip/Chip.cjs.js.map +0 -1
  161. package/dist/components/ui/Chip/Chip.js +0 -2
  162. package/dist/components/ui/Chip/Chip.js.map +0 -1
  163. package/dist/components/ui/DateTimeLocalizationProvider/DateTimeLocalizationProvider.cjs.js +0 -2
  164. package/dist/components/ui/DateTimeLocalizationProvider/DateTimeLocalizationProvider.cjs.js.map +0 -1
  165. package/dist/components/ui/DateTimeLocalizationProvider/DateTimeLocalizationProvider.js.map +0 -1
  166. package/dist/components/ui/FDErrorBoundary/FDErrorBoundary.cjs.js +0 -2
  167. package/dist/components/ui/FDErrorBoundary/FDErrorBoundary.cjs.js.map +0 -1
  168. package/dist/components/ui/FDErrorBoundary/FDErrorBoundary.js +0 -2
  169. package/dist/components/ui/FDErrorBoundary/FDErrorBoundary.js.map +0 -1
  170. package/dist/components/ui/FlipdishLogoLoader/FlipdishLogoLoader.cjs.js +0 -2
  171. package/dist/components/ui/FlipdishLogoLoader/FlipdishLogoLoader.cjs.js.map +0 -1
  172. package/dist/components/ui/FlipdishLogoLoader/FlipdishLogoLoader.js +0 -2
  173. package/dist/components/ui/FlipdishLogoLoader/FlipdishLogoLoader.js.map +0 -1
  174. package/dist/components/ui/FlipdishStaffContainer/FlipdishStaffContainer.cjs.js +0 -2
  175. package/dist/components/ui/FlipdishStaffContainer/FlipdishStaffContainer.cjs.js.map +0 -1
  176. package/dist/components/ui/FlipdishStaffContainer/FlipdishStaffContainer.js +0 -2
  177. package/dist/components/ui/FlipdishStaffContainer/FlipdishStaffContainer.js.map +0 -1
  178. package/dist/components/ui/Form/FormItemLayout.cjs.js +0 -2
  179. package/dist/components/ui/Form/FormItemLayout.cjs.js.map +0 -1
  180. package/dist/components/ui/Form/FormItemLayout.js.map +0 -1
  181. package/dist/components/ui/Form/GenericAutocompleteField.cjs.js +0 -2
  182. package/dist/components/ui/Form/GenericAutocompleteField.cjs.js.map +0 -1
  183. package/dist/components/ui/Form/GenericAutocompleteField.js +0 -2
  184. package/dist/components/ui/Form/GenericAutocompleteField.js.map +0 -1
  185. package/dist/components/ui/Form/GenericFormContainer.cjs.js +0 -2
  186. package/dist/components/ui/Form/GenericFormContainer.cjs.js.map +0 -1
  187. package/dist/components/ui/Form/GenericFormContainer.js.map +0 -1
  188. package/dist/components/ui/Form/GenericTextField.cjs.js +0 -2
  189. package/dist/components/ui/Form/GenericTextField.cjs.js.map +0 -1
  190. package/dist/components/ui/Form/GenericTextField.js +0 -2
  191. package/dist/components/ui/Form/GenericTextField.js.map +0 -1
  192. package/dist/components/ui/Form/PaginatedAutocompleteField.cjs.js +0 -2
  193. package/dist/components/ui/Form/PaginatedAutocompleteField.cjs.js.map +0 -1
  194. package/dist/components/ui/Form/PaginatedAutocompleteField.js +0 -2
  195. package/dist/components/ui/Form/PaginatedAutocompleteField.js.map +0 -1
  196. package/dist/components/ui/Form/utilities/formValidation.cjs.js +0 -2
  197. package/dist/components/ui/Form/utilities/formValidation.cjs.js.map +0 -1
  198. package/dist/components/ui/Form/utilities/formValidation.js.map +0 -1
  199. package/dist/components/ui/GenericDatePickerField/GenericDateFieldBase.cjs.js +0 -2
  200. package/dist/components/ui/GenericDatePickerField/GenericDateFieldBase.cjs.js.map +0 -1
  201. package/dist/components/ui/GenericDatePickerField/GenericDateFieldBase.js +0 -2
  202. package/dist/components/ui/GenericDatePickerField/GenericDateFieldBase.js.map +0 -1
  203. package/dist/components/ui/GenericDatePickerField/GenericDatePickerField.cjs.js +0 -2
  204. package/dist/components/ui/GenericDatePickerField/GenericDatePickerField.cjs.js.map +0 -1
  205. package/dist/components/ui/GenericDatePickerField/GenericDatePickerField.js.map +0 -1
  206. package/dist/components/ui/GenericDateTimePickerField/GenericDateTimePickerField.cjs.js +0 -2
  207. package/dist/components/ui/GenericDateTimePickerField/GenericDateTimePickerField.cjs.js.map +0 -1
  208. package/dist/components/ui/GenericDateTimePickerField/GenericDateTimePickerField.js.map +0 -1
  209. package/dist/components/ui/GenericRadioButtons/GenericRadioButtons.cjs.js +0 -2
  210. package/dist/components/ui/GenericRadioButtons/GenericRadioButtons.cjs.js.map +0 -1
  211. package/dist/components/ui/GenericRadioButtons/GenericRadioButtons.js +0 -2
  212. package/dist/components/ui/GenericRadioButtons/GenericRadioButtons.js.map +0 -1
  213. package/dist/components/ui/GenericTable/GenericTable.cjs.js +0 -18
  214. package/dist/components/ui/GenericTable/GenericTable.cjs.js.map +0 -1
  215. package/dist/components/ui/GenericTable/GenericTable.js.map +0 -1
  216. package/dist/components/ui/GenericTable/HighlightScrollbar.cjs.js +0 -2
  217. package/dist/components/ui/GenericTable/HighlightScrollbar.cjs.js.map +0 -1
  218. package/dist/components/ui/GenericTable/HighlightScrollbar.js.map +0 -1
  219. package/dist/components/ui/GenericTableBody/GenericTableBody.cjs.js +0 -2
  220. package/dist/components/ui/GenericTableBody/GenericTableBody.cjs.js.map +0 -1
  221. package/dist/components/ui/GenericTableBody/GenericTableBody.js +0 -2
  222. package/dist/components/ui/GenericTableBody/GenericTableBody.js.map +0 -1
  223. package/dist/components/ui/GenericTableBodyRow/GenericTableBodyRow.cjs.js +0 -2
  224. package/dist/components/ui/GenericTableBodyRow/GenericTableBodyRow.cjs.js.map +0 -1
  225. package/dist/components/ui/GenericTableBodyRow/GenericTableBodyRow.js.map +0 -1
  226. package/dist/components/ui/GenericTableTitle/GenericTableTitle.cjs.js +0 -2
  227. package/dist/components/ui/GenericTableTitle/GenericTableTitle.cjs.js.map +0 -1
  228. package/dist/components/ui/GenericTableTitle/GenericTableTitle.js.map +0 -1
  229. package/dist/components/ui/LazyComponent/LazyComponent.cjs.js +0 -2
  230. package/dist/components/ui/LazyComponent/LazyComponent.cjs.js.map +0 -1
  231. package/dist/components/ui/LazyComponent/LazyComponent.js.map +0 -1
  232. package/dist/components/ui/ListItemLink/ListItemLink.cjs.js +0 -2
  233. package/dist/components/ui/ListItemLink/ListItemLink.cjs.js.map +0 -1
  234. package/dist/components/ui/ListItemLink/ListItemLink.js.map +0 -1
  235. package/dist/components/ui/ListItemLinkButton/ListItemLinkButton.cjs.js +0 -2
  236. package/dist/components/ui/ListItemLinkButton/ListItemLinkButton.cjs.js.map +0 -1
  237. package/dist/components/ui/ListItemLinkButton/ListItemLinkButton.js +0 -2
  238. package/dist/components/ui/ListItemLinkButton/ListItemLinkButton.js.map +0 -1
  239. package/dist/components/ui/NoResults/NoResults.cjs.js +0 -2
  240. package/dist/components/ui/NoResults/NoResults.cjs.js.map +0 -1
  241. package/dist/components/ui/NoResults/NoResults.js.map +0 -1
  242. package/dist/components/ui/NotFoundPage/NotFoundPage.cjs.js +0 -2
  243. package/dist/components/ui/NotFoundPage/NotFoundPage.cjs.js.map +0 -1
  244. package/dist/components/ui/NotFoundPage/NotFoundPage.js +0 -2
  245. package/dist/components/ui/NotFoundPage/NotFoundPage.js.map +0 -1
  246. package/dist/components/ui/PageLayout/DocumentTitle.cjs.js +0 -2
  247. package/dist/components/ui/PageLayout/DocumentTitle.cjs.js.map +0 -1
  248. package/dist/components/ui/PageLayout/DocumentTitle.js +0 -2
  249. package/dist/components/ui/PageLayout/DocumentTitle.js.map +0 -1
  250. package/dist/components/ui/PageLayout/FullWidthContainer.cjs.js +0 -2
  251. package/dist/components/ui/PageLayout/FullWidthContainer.cjs.js.map +0 -1
  252. package/dist/components/ui/PageLayout/FullWidthContainer.js.map +0 -1
  253. package/dist/components/ui/PageLayout/PageLayout.cjs.js +0 -2
  254. package/dist/components/ui/PageLayout/PageLayout.cjs.js.map +0 -1
  255. package/dist/components/ui/PageLayout/PageLayout.js +0 -2
  256. package/dist/components/ui/PageLayout/PageLayout.js.map +0 -1
  257. package/dist/components/ui/PortalMock/PortalMock.cjs.js +0 -2
  258. package/dist/components/ui/PortalMock/PortalMock.cjs.js.map +0 -1
  259. package/dist/components/ui/PortalMock/PortalMock.js.map +0 -1
  260. package/dist/components/ui/Spacer/Spacer.cjs.js +0 -2
  261. package/dist/components/ui/Spacer/Spacer.cjs.js.map +0 -1
  262. package/dist/components/ui/Spacer/Spacer.js.map +0 -1
  263. package/dist/components/ui/Switch/Switch.cjs.js +0 -2
  264. package/dist/components/ui/Switch/Switch.cjs.js.map +0 -1
  265. package/dist/components/ui/Switch/Switch.js.map +0 -1
  266. package/dist/components/ui/Tooltip/Tooltip.cjs.js +0 -2
  267. package/dist/components/ui/Tooltip/Tooltip.cjs.js.map +0 -1
  268. package/dist/components/ui/Tooltip/Tooltip.js +0 -2
  269. package/dist/components/ui/Tooltip/Tooltip.js.map +0 -1
  270. package/dist/localization/en.json.cjs.js +0 -2
  271. package/dist/localization/en.json.cjs.js.map +0 -1
  272. package/dist/providers/ToastProvider.cjs.js +0 -2
  273. package/dist/providers/ToastProvider.cjs.js.map +0 -1
  274. package/dist/providers/TranslationProvider.cjs.js +0 -2
  275. package/dist/providers/TranslationProvider.cjs.js.map +0 -1
  276. package/dist/utilities/validation.cjs.js +0 -2
  277. package/dist/utilities/validation.cjs.js.map +0 -1
  278. /package/dist/{components → Icons/AccessTimeIcon}/index.js.map +0 -0
  279. /package/dist/components/{components/ui/Chip/Chip.d.ts → Chip/index.d.ts} +0 -0
  280. /package/dist/components/{components/ui/FlipdishLogoLoader/FlipdishLogoLoader.d.ts → FlipdishLogoLoader/index.d.ts} +0 -0
  281. /package/dist/components/{components/ui/FlipdishStaffContainer/FlipdishStaffContainer.d.ts → FlipdishStaffContainer/index.d.ts} +0 -0
  282. /package/dist/components/{components/ui/Form/GenericAutocompleteField.d.ts → Form/GenericAutocompleteField/index.d.ts} +0 -0
  283. /package/dist/components/{components/ui/Form/GenericFormContainer.d.ts → Form/GenericFormContainer/index.d.ts} +0 -0
  284. /package/dist/components/{components/ui/Form/GenericTextField.d.ts → Form/GenericTextField/index.d.ts} +0 -0
  285. /package/dist/components/{components/ui/GenericDatePickerField/GenericDatePickerField.d.ts → GenericDatePickerField/index.d.ts} +0 -0
  286. /package/dist/components/{components/ui/GenericDateTimePickerField/GenericDateTimePickerField.d.ts → GenericDateTimePickerField/index.d.ts} +0 -0
  287. /package/dist/components/{components/ui/GenericRadioButtons/GenericRadioButtons.d.ts → GenericRadioButtons/index.d.ts} +0 -0
  288. /package/dist/components/{ui/GenericTable → GenericTable}/HighlightScrollbar.js +0 -0
  289. /package/dist/components/{components/ui/GenericTableBodyRow/GenericTableBodyRow.d.ts → GenericTableBodyRow/index.d.ts} +0 -0
  290. /package/dist/components/{components/ui/GenericTableTitle/GenericTableTitle.d.ts → GenericTableTitle/index.d.ts} +0 -0
  291. /package/dist/components/{components/ui/LazyComponent/LazyComponent.d.ts → LazyComponent/index.d.ts} +0 -0
  292. /package/dist/components/{components/ui/ListItemLink/ListItemLink.d.ts → ListItemLink/index.d.ts} +0 -0
  293. /package/dist/components/{components/ui/ListItemLinkButton/ListItemLinkButton.d.ts → ListItemLinkButton/index.d.ts} +0 -0
  294. /package/dist/components/{components/ui/NoResults/NoResults.d.ts → NoResults/index.d.ts} +0 -0
  295. /package/dist/components/{components/ui/NotFoundPage/NotFoundPage.d.ts → NotFoundPage/index.d.ts} +0 -0
  296. /package/dist/components/{ui/PageLayout → PageLayout}/FullWidthContainer.js +0 -0
  297. /package/dist/components/{components/ui/PortalMock/PortalMock.d.ts → PortalMock/index.d.ts} +0 -0
  298. /package/dist/components/{components/ui/Spacer/Spacer.d.ts → Spacer/index.d.ts} +0 -0
  299. /package/dist/components/{components/ui/Switch/Switch.d.ts → Switch/index.d.ts} +0 -0
  300. /package/dist/components/{components/ui/Tooltip/Tooltip.d.ts → Tooltip/index.d.ts} +0 -0
  301. /package/dist/{components/components/custom-hooks → custom-hooks}/useMicroFrontendAttributes.d.ts +0 -0
  302. /package/dist/{components/custom-hooks → custom-hooks}/useMicroFrontendAttributes.js +0 -0
  303. /package/dist/{components/components/custom-hooks → custom-hooks}/useRenderValidText.d.ts +0 -0
  304. /package/dist/{components/components/custom-hooks → custom-hooks}/useToasts.d.ts +0 -0
  305. /package/dist/{components/custom-hooks → custom-hooks}/useToasts.js +0 -0
  306. /package/dist/{components/components/ui/DateTimeLocalizationProvider → providers}/DateTimeLocalizationProvider.d.ts +0 -0
  307. /package/dist/{components/ui/DateTimeLocalizationProvider → providers}/DateTimeLocalizationProvider.js +0 -0
  308. /package/dist/{components/providers → providers}/ToastProvider.d.ts +0 -0
  309. /package/dist/{components/ui/Form/utilities → utilities}/formValidation.js +0 -0
  310. /package/dist/{components/components/genericUtilities/index.d.ts → utilities/genericUtilities.d.ts} +0 -0
@@ -1,2 +1,2 @@
1
1
  import{jsxs as i,jsx as t}from"react/jsx-runtime";import"react";import r from"@mui/material/Grid";import e from"@mui/material/Typography";import{styled as a}from"@mui/material/styles";const d=a(r,{shouldForwardProp:i=>"titlePadding"!==i})((({theme:i,titlePadding:t})=>{switch(t){case"small":return{padding:i.spacing(3,0,1.5),[i.breakpoints.down("md")]:{padding:i.spacing(3,2,1.5)}};case"medium":return{padding:i.spacing(4,0,2),[i.breakpoints.down("md")]:{padding:i.spacing(4,2,2)}};default:return{padding:0}}})),n=a(e)({width:191,height:16,fontSize:12,fontWeight:"normal",lineHeight:1.33,letterSpacing:.4,color:"rgba(0, 0, 0, 0.38)"}),m=({maxGridWidth:a=12,subTitle:m,title:o,children:l,titlePadding:p="medium"})=>i(d,{container:!0,titlePadding:p,children:[i(r,{item:!0,xs:a,sm:a,children:[o&&t(e,{variant:"h5",children:o}),m&&t("div",{children:t(n,{variant:"caption",children:m})})]}),l]});export{m as default};
2
- //# sourceMappingURL=GenericTableTitle.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/GenericTableTitle/index.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\nimport Grid from '@mui/material/Grid';\nimport Typography from '@mui/material/Typography';\nimport { styled } from '@mui/material/styles';\n\ntype OuterProps = {\n maxGridWidth?: boolean | 'auto' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n subTitle?: string;\n title?: string;\n children?: ReactNode;\n titlePadding?: 'small' | 'medium';\n};\n\nconst HeaderContainer = styled(Grid, {\n shouldForwardProp: (prop) => prop !== 'titlePadding',\n})<{ titlePadding: OuterProps['titlePadding'] }>(({ theme, titlePadding }) => {\n switch (titlePadding) {\n case 'small':\n return {\n padding: theme.spacing(3, 0, 1.5),\n [theme.breakpoints.down('md')]: {\n padding: theme.spacing(3, 2, 1.5),\n },\n };\n case 'medium':\n return {\n padding: theme.spacing(4, 0, 2),\n [theme.breakpoints.down('md')]: {\n padding: theme.spacing(4, 2, 2),\n },\n };\n default:\n return { padding: 0 };\n }\n});\n\nconst SubTitle = styled(Typography)({\n width: 191,\n height: 16,\n fontSize: 12,\n fontWeight: 'normal',\n lineHeight: 1.33,\n letterSpacing: 0.4,\n color: 'rgba(0, 0, 0, 0.38)',\n});\n\nconst GenericTableTitle = ({ maxGridWidth = 12, subTitle, title, children, titlePadding = 'medium' }: OuterProps) => {\n return (\n <HeaderContainer container titlePadding={titlePadding}>\n <Grid item xs={maxGridWidth} sm={maxGridWidth}>\n {title && <Typography variant=\"h5\">{title}</Typography>}\n {subTitle && (\n <div>\n <SubTitle variant=\"caption\">{subTitle}</SubTitle>\n </div>\n )}\n </Grid>\n\n {children}\n </HeaderContainer>\n );\n};\n\nexport default GenericTableTitle;\n"],"names":["HeaderContainer","styled","Grid","shouldForwardProp","prop","theme","titlePadding","padding","spacing","breakpoints","down","SubTitle","Typography","width","height","fontSize","fontWeight","lineHeight","letterSpacing","color","GenericTableTitle","maxGridWidth","subTitle","title","children","_jsxs","container","item","xs","sm","_jsx","variant"],"mappings":"wLAaA,MAAMA,EAAkBC,EAAOC,EAAM,CACjCC,kBAAoBC,GAAkB,iBAATA,GADTH,EAEyB,EAAGI,QAAOC,mBACvD,OAAQA,GACJ,IAAK,QACD,MAAO,CACHC,QAASF,EAAMG,QAAQ,EAAG,EAAG,KAC7B,CAACH,EAAMI,YAAYC,KAAK,OAAQ,CAC5BH,QAASF,EAAMG,QAAQ,EAAG,EAAG,OAGzC,IAAK,SACD,MAAO,CACHD,QAASF,EAAMG,QAAQ,EAAG,EAAG,GAC7B,CAACH,EAAMI,YAAYC,KAAK,OAAQ,CAC5BH,QAASF,EAAMG,QAAQ,EAAG,EAAG,KAGzC,QACI,MAAO,CAAED,QAAS,GACzB,IAGCI,EAAWV,EAAOW,EAAPX,CAAmB,CAChCY,MAAO,IACPC,OAAQ,GACRC,SAAU,GACVC,WAAY,SACZC,WAAY,KACZC,cAAe,GACfC,MAAO,wBAGLC,EAAoB,EAAGC,eAAe,GAAIC,WAAUC,QAAOC,WAAUlB,eAAe,YAElFmB,EAACzB,EAAgB,CAAA0B,aAAUpB,aAAcA,EAAYkB,SAAA,CACjDC,EAACvB,GAAKyB,MAAI,EAACC,GAAIP,EAAcQ,GAAIR,EAAYG,SAAA,CACxCD,GAASO,EAAClB,GAAWmB,QAAQ,KAAIP,SAAED,IACnCD,GACGQ,EACI,MAAA,CAAAN,SAAAM,EAACnB,EAAQ,CAACoB,QAAQ,UAAWP,SAAAF,SAKxCE"}
@@ -1,2 +1,2 @@
1
1
  import{jsx as r}from"react/jsx-runtime";import{Suspense as e}from"react";import t from"@mui/material/CircularProgress";import{styled as i}from"@mui/material/styles";const m=i("div")({display:"flex",justifyContent:"center",alignItems:"center"}),a=({children:i})=>r(e,{fallback:r(m,{children:r(t,{size:56})}),children:i});export{a as default};
2
- //# sourceMappingURL=LazyComponent.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/LazyComponent/index.tsx"],"sourcesContent":["import { Suspense, type ReactNode } from 'react';\n\nimport CircularProgress from '@mui/material/CircularProgress';\nimport { styled } from '@mui/material/styles';\n\ntype LazyComponentProps = {\n children: ReactNode;\n};\n\nconst StyledLoadingContainer = styled('div')({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n});\n\nconst LazyComponent = ({ children }: LazyComponentProps) => (\n <Suspense\n fallback={\n <StyledLoadingContainer>\n <CircularProgress size={56} />\n </StyledLoadingContainer>\n }\n >\n {children}\n </Suspense>\n);\n\nexport default LazyComponent;\n"],"names":["StyledLoadingContainer","styled","display","justifyContent","alignItems","LazyComponent","children","_jsx","Suspense","fallback","CircularProgress","size"],"mappings":"qKASA,MAAMA,EAAyBC,EAAO,MAAPA,CAAc,CACzCC,QAAS,OACTC,eAAgB,SAChBC,WAAY,WAGVC,EAAgB,EAAGC,cACrBC,EAACC,GACGC,SACIF,EAACP,EACG,CAAAM,SAAAC,EAACG,EAAgB,CAACC,KAAM,OACHL,SAG5BA"}
@@ -1,2 +1,2 @@
1
1
  import{jsx as t}from"react/jsx-runtime";import o from"@mui/material/ListItem";import{Link as r}from"react-router-dom";const m=o,e=({fdKey:o,...e})=>t(m,{...e,"data-fd":o,...e.to?{component:r}:{}});export{e as default};
2
- //# sourceMappingURL=ListItemLink.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/ListItemLink/index.tsx"],"sourcesContent":["import MuiListItem, { type ListItemProps } from '@mui/material/ListItem';\nimport { type LinkProps, Link } from 'react-router-dom';\n\ntype ListItemLinkProps = ListItemProps & LinkProps & { fdKey: string } & { button?: boolean } & { children?: React.ReactNode };\n\nconst ListItem = MuiListItem as React.ComponentType<ListItemProps & LinkProps>;\n\nconst ListItemLink = ({ fdKey, ...rest }: ListItemLinkProps) => {\n // no Link for external URL\n return <ListItem {...rest} data-fd={fdKey} {...(rest.to ? { component: Link } : {})} />;\n};\n\nexport default ListItemLink;\n"],"names":["ListItem","MuiListItem","ListItemLink","fdKey","rest","_jsx","to","component","Link"],"mappings":"sHAKA,MAAMA,EAAWC,EAEXC,EAAe,EAAGC,WAAUC,KAEvBC,EAACL,EAAQ,IAAKI,EAAI,UAAWD,KAAYC,EAAKE,GAAK,CAAEC,UAAWC,GAAS,CAAE"}
@@ -0,0 +1,2 @@
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import"react";import{KeyboardArrowRight as i}from"@mui/icons-material";import o from"@mui/material/IconButton";import r from"@mui/material/ListItemIcon";import n from"@mui/material/ListItemText";import a from"@mui/material/styles/useTheme";import m from"@mui/material/useMediaQuery";import d from"@mui/material/styles/styled";import l from"../ListItemLink/index.js";const c=d(l,{shouldForwardProp:t=>!["borderBottom"].includes(t)&&!["disabled"].includes(t)&&!["selected"].includes(t)})((({theme:t,borderBottom:e,selected:i})=>({borderBottom:e??"1px solid #cecece",paddingLeft:t.spacing(4),paddingRight:t.spacing(4),"&:hover":{backgroundColor:"#eaf2ff"},"&:focus":{backgroundColor:"#eaf2ff"},color:t.palette.text.primary,textDecoration:"none",backgroundColor:i?"#eaf2ff":"inherit"}))),s=d(r,{shouldForwardProp:t=>!["iconMargin"].includes(t)})((({iconMargin:t})=>({margin:t||"16px",marginLeft:"0",padding:"0px",minWidth:"0"}))),u=d(n)((({theme:t})=>({"& .MuiListItemText-primary":{color:t.palette.text.primary},"& .MuiListItemText-secondary":{color:t.palette.text.secondary}}))),p=({borderBottom:r,customTitle:n,customSubtitle:d,disabled:l=!1,onClick:p,title:f,subtitle:b,icon:g,iconMargin:x,hideIcon:h=!1,link:y,isLast:k,customButton:L,iconComponent:I,dataFd:M="",isSelected:B=!1})=>{const C=a(),T=m(C.breakpoints.down("md")),w=!k||T,F=n||f,j=d||b;return t(c,{borderBottom:w?r:"none",divider:w,button:!0,fdKey:M||`link-button-${f}`,to:y,onClick:p,disabled:l,selected:B,children:[g&&e(s,{iconMargin:x,children:e("img",{src:g,alt:""})}),I&&e(s,{iconMargin:x,children:I}),e(u,{primary:F,secondary:j,sx:{pr:"60px"}}),!h&&(L||e(o,{"aria-label":`link-button-${f}`,children:e(i,{})}))]})};export{p as ListItemLinkButton,p as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/ListItemLinkButton/index.tsx"],"sourcesContent":["import React from 'react';\nimport { KeyboardArrowRight } from '@mui/icons-material';\nimport IconButton from '@mui/material/IconButton';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport useTheme from '@mui/material/styles/useTheme';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport styled from '@mui/material/styles/styled';\nimport ListItemLink from '../ListItemLink';\n\ntype MarginType = string | number;\n\n// Styled components\nconst StyledListItemLink = styled(ListItemLink, {\n shouldForwardProp: (prop) =>\n !['borderBottom'].includes(prop as string) && !['disabled'].includes(prop as string) && !['selected'].includes(prop as string),\n})<{ borderBottom?: string; disabled?: boolean; selected: boolean }>(({ theme, borderBottom, selected }) => ({\n borderBottom: borderBottom ?? '1px solid #cecece',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:focus': {\n backgroundColor: '#eaf2ff',\n },\n // Override link color inheritance\n color: theme.palette.text.primary,\n textDecoration: 'none',\n backgroundColor: selected ? '#eaf2ff' : 'inherit',\n}));\n\nconst StyledListItemIcon = styled(ListItemIcon, {\n shouldForwardProp: (prop) => !['iconMargin'].includes(prop as string),\n})<{ iconMargin?: MarginType }>(({ iconMargin }) => ({\n margin: iconMargin || '16px',\n marginLeft: '0',\n padding: '0px',\n minWidth: '0',\n}));\n\nconst StyledListItemText = styled(ListItemText)(({ theme }) => ({\n '& .MuiListItemText-primary': {\n color: theme.palette.text.primary,\n },\n '& .MuiListItemText-secondary': {\n color: theme.palette.text.secondary,\n },\n}));\n\ninterface ListItemLinkButtonProps {\n customTitle?: string;\n customSubtitle?: React.ReactNode;\n disabled?: boolean;\n title?: string;\n subtitle?: string;\n icon?: string;\n hideIcon?: boolean;\n link?: string;\n isLast?: boolean;\n onClick?: () => void;\n borderBottom?: string;\n customButton?: JSX.Element;\n iconComponent?: JSX.Element;\n iconMargin?: MarginType;\n dataFd?: string;\n isSelected?: boolean;\n}\n\nexport const ListItemLinkButton = ({\n borderBottom,\n customTitle,\n customSubtitle,\n disabled = false,\n onClick,\n title,\n subtitle,\n icon,\n iconMargin,\n hideIcon = false,\n link,\n isLast,\n customButton,\n iconComponent,\n dataFd = '',\n isSelected = false,\n}: ListItemLinkButtonProps) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n const hasDivider = !isLast || isMobile;\n\n const titleText = customTitle || title;\n const subtitleText = customSubtitle || subtitle;\n\n return (\n <StyledListItemLink\n borderBottom={hasDivider ? borderBottom : 'none'}\n divider={hasDivider}\n button\n fdKey={dataFd || `link-button-${title}`}\n to={link}\n onClick={onClick}\n disabled={disabled}\n selected={isSelected}\n >\n {icon && (\n <StyledListItemIcon iconMargin={iconMargin}>\n <img src={icon} alt=\"\" />\n </StyledListItemIcon>\n )}\n\n {iconComponent && <StyledListItemIcon iconMargin={iconMargin}>{iconComponent}</StyledListItemIcon>}\n\n <StyledListItemText primary={titleText} secondary={subtitleText} sx={{ pr: '60px' }} />\n\n {!hideIcon &&\n (customButton || (\n <IconButton aria-label={`link-button-${title}`}>\n <KeyboardArrowRight />\n </IconButton>\n ))}\n </StyledListItemLink>\n );\n};\n\nexport default ListItemLinkButton;\n"],"names":["StyledListItemLink","styled","ListItemLink","shouldForwardProp","prop","includes","theme","borderBottom","selected","paddingLeft","spacing","paddingRight","backgroundColor","color","palette","text","primary","textDecoration","StyledListItemIcon","ListItemIcon","iconMargin","margin","marginLeft","padding","minWidth","StyledListItemText","ListItemText","secondary","ListItemLinkButton","customTitle","customSubtitle","disabled","onClick","title","subtitle","icon","hideIcon","link","isLast","customButton","iconComponent","dataFd","isSelected","useTheme","isMobile","useMediaQuery","breakpoints","down","hasDivider","titleText","subtitleText","_jsxs","divider","button","fdKey","to","children","_jsx","src","alt","sx","pr","IconButton","KeyboardArrowRight"],"mappings":"gaAaA,MAAMA,EAAqBC,EAAOC,EAAc,CAC5CC,kBAAoBC,IACf,CAAC,gBAAgBC,SAASD,KAAoB,CAAC,YAAYC,SAASD,KAAoB,CAAC,YAAYC,SAASD,IAF5FH,EAG0C,EAAGK,QAAOC,eAAcC,eAAgB,CACzGD,aAAcA,GAAgB,oBAC9BE,YAAaH,EAAMI,QAAQ,GAC3BC,aAAcL,EAAMI,QAAQ,GAC5B,UAAW,CACPE,gBAAiB,WAErB,UAAW,CACPA,gBAAiB,WAGrBC,MAAOP,EAAMQ,QAAQC,KAAKC,QAC1BC,eAAgB,OAChBL,gBAAiBJ,EAAW,UAAY,cAGtCU,EAAqBjB,EAAOkB,EAAc,CAC5ChB,kBAAoBC,IAAU,CAAC,cAAcC,SAASD,IAD/BH,EAEK,EAAGmB,iBAAkB,CACjDC,OAAQD,GAAc,OACtBE,WAAY,IACZC,QAAS,MACTC,SAAU,QAGRC,EAAqBxB,EAAOyB,EAAPzB,EAAqB,EAAGK,YAAa,CAC5D,6BAA8B,CAC1BO,MAAOP,EAAMQ,QAAQC,KAAKC,SAE9B,+BAAgC,CAC5BH,MAAOP,EAAMQ,QAAQC,KAAKY,eAuBrBC,EAAqB,EAC9BrB,eACAsB,cACAC,iBACAC,YAAW,EACXC,UACAC,QACAC,WACAC,OACAf,aACAgB,YAAW,EACXC,OACAC,SACAC,eACAC,gBACAC,SAAS,GACTC,cAAa,MAEb,MAAMpC,EAAQqC,IACRC,EAAWC,EAAcvC,EAAMwC,YAAYC,KAAK,OAChDC,GAAcV,GAAUM,EAExBK,EAAYpB,GAAeI,EAC3BiB,EAAepB,GAAkBI,EAEvC,OACIiB,EAACnD,EAAkB,CACfO,aAAcyC,EAAazC,EAAe,OAC1C6C,QAASJ,EACTK,QAAM,EACNC,MAAOb,GAAU,eAAeR,IAChCsB,GAAIlB,EACJL,QAASA,EACTD,SAAUA,EACVvB,SAAUkC,EAAUc,SAAA,CAEnBrB,GACGsB,EAACvC,EAAmB,CAAAE,WAAYA,EAAUoC,SACtCC,SAAKC,IAAKvB,EAAMwB,IAAI,OAI3BnB,GAAiBiB,EAACvC,EAAmB,CAAAE,WAAYA,WAAaoB,IAE/DiB,EAAChC,GAAmBT,QAASiC,EAAWtB,UAAWuB,EAAcU,GAAI,CAAEC,GAAI,WAEzEzB,IACGG,GACGkB,EAACK,EAAU,CAAA,aAAa,eAAe7B,IACnCuB,SAAAC,EAACM,EAAqB,CAAA,QAIxC"}
@@ -1,2 +1,2 @@
1
1
  import{jsx as t,jsxs as r}from"react/jsx-runtime";import e from"@mui/material/Card";import{styled as i}from"@mui/material/styles";import a from"@mui/material/Typography";const n=i("div")((({theme:t})=>({margin:t.spacing(8,"auto"),display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center"}))),m=i(e)((({theme:t})=>({padding:t.spacing(2,8)}))),o=({title:e,caption:i,hasCardBackground:o=!1})=>{const c=()=>r(n,{children:[t(a,{variant:"h6",gutterBottom:!0,children:e}),i&&t(a,{variant:"body2",children:i})]});return o?t(m,{children:c()}):c()};export{o as default};
2
- //# sourceMappingURL=NoResults.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/NoResults/index.tsx"],"sourcesContent":["import Card from '@mui/material/Card';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nconst StyledTextContainer = styled('div')(({ theme }) => ({\n margin: theme.spacing(8, 'auto'),\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n textAlign: 'center',\n}));\n\nconst StyledCard = styled(Card)(({ theme }) => ({\n padding: theme.spacing(2, 8),\n}));\n\ntype Props = {\n title: string;\n caption?: string;\n hasCardBackground?: boolean;\n};\n\nconst NoResults = ({ title, caption, hasCardBackground = false }: Props) => {\n const renderContent = () => {\n return (\n <StyledTextContainer>\n <Typography variant=\"h6\" gutterBottom>\n {title}\n </Typography>\n {caption && <Typography variant=\"body2\">{caption}</Typography>}\n </StyledTextContainer>\n );\n };\n\n if (!hasCardBackground) {\n return renderContent();\n }\n\n return <StyledCard>{renderContent()}</StyledCard>;\n};\n\nexport default NoResults;\n"],"names":["StyledTextContainer","styled","theme","margin","spacing","display","flexDirection","justifyContent","alignItems","textAlign","StyledCard","Card","padding","NoResults","title","caption","hasCardBackground","renderContent","_jsxs","children","_jsx","Typography","variant","gutterBottom"],"mappings":"0KAIA,MAAMA,EAAsBC,EAAO,MAAPA,EAAc,EAAGC,YAAa,CACtDC,OAAQD,EAAME,QAAQ,EAAG,QACzBC,QAAS,OACTC,cAAe,SACfC,eAAgB,SAChBC,WAAY,SACZC,UAAW,aAGTC,EAAaT,EAAOU,EAAPV,EAAa,EAAGC,YAAa,CAC5CU,QAASV,EAAME,QAAQ,EAAG,OASxBS,EAAY,EAAGC,QAAOC,UAASC,qBAAoB,MACrD,MAAMC,EAAgB,IAEdC,EAAClB,EAAmB,CAAAmB,SAAA,CAChBC,EAACC,EAAW,CAAAC,QAAQ,KAAKC,cACpB,EAAAJ,SAAAL,IAEJC,GAAWK,EAACC,EAAW,CAAAC,QAAQ,QAASH,SAAAJ,OAKrD,OAAKC,EAIEI,EAACV,EAAU,CAAAS,SAAEF,MAHTA,GAGsC"}
@@ -0,0 +1,2 @@
1
+ import{jsx as r}from"react/jsx-runtime";import{styled as t}from"@mui/material/styles";import e from"@mui/material/Typography";import i from"@mui/material/Box";import{useTranslation as o}from"../../providers/TranslationProvider.js";const m=t(i)((({theme:r})=>({marginTop:r.spacing(2),display:"flex",justifyContent:"center",alignItems:"center"}))),a=()=>{const{translate:t}=o();return r(m,{children:r(e,{children:t("Page_Not_Found")})})};export{a as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/NotFoundPage/index.tsx"],"sourcesContent":["import { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\nimport { useTranslation } from '../../providers/TranslationProvider';\n\nconst StyledTextContainer = styled(Box)(({ theme }) => ({\n marginTop: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n}));\n\nconst NotFoundPage = () => {\n const { translate } = useTranslation();\n return (\n <StyledTextContainer>\n <Typography>{translate('Page_Not_Found')}</Typography>\n </StyledTextContainer>\n );\n};\n\nexport default NotFoundPage;\n"],"names":["StyledTextContainer","styled","Box","theme","marginTop","spacing","display","justifyContent","alignItems","NotFoundPage","translate","useTranslation","_jsx","children","Typography"],"mappings":"uOAKA,MAAMA,EAAsBC,EAAOC,EAAPD,EAAY,EAAGE,YAAa,CACpDC,UAAWD,EAAME,QAAQ,GACzBC,QAAS,OACTC,eAAgB,SAChBC,WAAY,aAGVC,EAAe,KACjB,MAAMC,UAAEA,GAAcC,IACtB,OACIC,EAACZ,EAAmB,CAAAa,SAChBD,EAACE,EAAU,CAAAD,SAAEH,EAAU,qBAE7B"}
@@ -0,0 +1,6 @@
1
+ type Props = {
2
+ children: string;
3
+ };
4
+ declare const DocumentTitle: ({ children }: Props) => any;
5
+
6
+ export { DocumentTitle as default };
@@ -0,0 +1,2 @@
1
+ import{useEffect as t}from"react";import{useTranslation as r}from"../../providers/TranslationProvider.js";const o=({children:o})=>{const{translate:e}=r();return t((()=>(document.title=`${e(o)} | Flipdish`,()=>{document.title="Flipdish Portal"})),[o]),null};export{o as default};
2
+ //# sourceMappingURL=DocumentTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentTitle.js","sources":["../../../src/components/PageLayout/DocumentTitle.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport { useTranslation, type TranslationId } from '../../providers/TranslationProvider';\n\ntype Props = {\n children: string;\n};\n\nconst DEFAULT_TITLE = 'Flipdish Portal';\n\nconst DocumentTitle = ({ children }: Props) => {\n const { translate } = useTranslation();\n\n useEffect(() => {\n document.title = `${translate(children as TranslationId)} | Flipdish`;\n return () => {\n document.title = DEFAULT_TITLE;\n };\n }, [children]);\n\n return null;\n};\n\nexport default DocumentTitle;\n"],"names":["DocumentTitle","children","translate","useTranslation","useEffect","document","title"],"mappings":"0GAOA,MAEMA,EAAgB,EAAGC,eACrB,MAAMC,UAAEA,GAAcC,IAStB,OAPAC,GAAU,KACNC,SAASC,MAAQ,GAAGJ,EAAUD,gBACvB,KACHI,SAASC,MARC,iBAQoB,IAEnC,CAACL,IAEG,IAAI"}
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ type Props = {
5
+ className?: string;
6
+ children: ReactNode;
7
+ fullWidth?: boolean;
8
+ fullSize?: boolean;
9
+ noTopSpace?: boolean;
10
+ };
11
+ declare const FullWidthContainer: ({ children, className, fullWidth, fullSize, noTopSpace }: Props) => react_jsx_runtime.JSX.Element;
12
+
13
+ export { FullWidthContainer as default };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FullWidthContainer.js","sources":["../../../src/components/PageLayout/FullWidthContainer.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\nimport { styled, useTheme, type Theme } from '@mui/material/styles';\n\ntype Props = {\n className?: string;\n children: ReactNode;\n fullWidth?: boolean;\n fullSize?: boolean;\n noTopSpace?: boolean;\n};\n\nconst FullWidthContainer = ({ children, className = '', fullWidth, fullSize, noTopSpace }: Props) => {\n const theme = useTheme<Theme>();\n\n const FullWidthDiv = styled('div')(() => ({\n // Base styles\n ...(fullWidth && {\n marginLeft: -20,\n marginRight: -20,\n }),\n ...(fullSize && {\n [theme.breakpoints.up('sm')]: {\n marginLeft: theme.spacing(-3),\n marginRight: theme.spacing(-3),\n },\n }),\n ...(noTopSpace && {\n marginTop: `${theme.spacing(-3)} !important`,\n [theme.breakpoints.only('xs')]: {\n marginTop: `${theme.spacing(-2)} !important`,\n },\n }),\n [theme.breakpoints.only('sm')]: {\n marginLeft: theme.spacing(-3),\n marginRight: theme.spacing(-3),\n },\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(-2),\n marginRight: theme.spacing(-2),\n },\n }));\n\n return <FullWidthDiv className={className}>{children}</FullWidthDiv>;\n};\n\nexport default FullWidthContainer;\n"],"names":["FullWidthContainer","children","className","fullWidth","fullSize","noTopSpace","theme","useTheme","FullWidthDiv","styled","marginLeft","marginRight","breakpoints","up","spacing","marginTop","only","_jsx"],"mappings":"kHAWA,MAAMA,EAAqB,EAAGC,WAAUC,YAAY,GAAIC,YAAWC,WAAUC,iBACzE,MAAMC,EAAQC,IAERC,EAAeC,EAAO,MAAPA,EAAc,KAAO,IAElCN,GAAa,CACbO,YAAa,GACbC,aAAc,OAEdP,GAAY,CACZ,CAACE,EAAMM,YAAYC,GAAG,OAAQ,CAC1BH,WAAYJ,EAAMQ,SAAS,GAC3BH,YAAaL,EAAMQ,SAAS,QAGhCT,GAAc,CACdU,UAAW,GAAGT,EAAMQ,SAAS,gBAC7B,CAACR,EAAMM,YAAYI,KAAK,OAAQ,CAC5BD,UAAW,GAAGT,EAAMQ,SAAS,kBAGrC,CAACR,EAAMM,YAAYI,KAAK,OAAQ,CAC5BN,WAAYJ,EAAMQ,SAAS,GAC3BH,YAAaL,EAAMQ,SAAS,IAEhC,CAACR,EAAMM,YAAYI,KAAK,OAAQ,CAC5BN,WAAYJ,EAAMQ,SAAS,GAC3BH,YAAaL,EAAMQ,SAAS,QAIpC,OAAOG,EAACT,EAAa,CAAAN,UAAWA,EAASD,SAAGA,GAAwB"}
@@ -0,0 +1,5 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare const GlobalSpacingStyles: () => react_jsx_runtime.JSX.Element;
4
+
5
+ export { GlobalSpacingStyles as default };
@@ -0,0 +1,2 @@
1
+ import{jsx as t}from"react/jsx-runtime";import i from"@mui/material/GlobalStyles";import n from"@mui/material/styles/useTheme";import{HORIZONTAL_SPACE_CLASSNAME as a,LEFT_HORIZONTAL_SPACE_CLASSNAME as p,RIGHT_HORIZONTAL_SPACE_CLASSNAME as o,VERTICAL_SPACE_CLASSNAME as r}from"./index.js";const s=()=>{const s=n();return t(i,{styles:{[`.${a}`]:{paddingLeft:`${s.spacing(3)} !important`,paddingRight:`${s.spacing(3)} !important`,[s.breakpoints.only("xs")]:{paddingLeft:`${s.spacing(2)} !important`,paddingRight:`${s.spacing(2)} !important`}},[`.${p}`]:{paddingLeft:`${s.spacing(3)} !important`,[s.breakpoints.only("xs")]:{paddingLeft:`${s.spacing(2)} !important`}},[`.${o}`]:{paddingRight:`${s.spacing(3)} !important`,[s.breakpoints.only("xs")]:{paddingRight:`${s.spacing(2)} !important`}},[`.${r}`]:{paddingTop:`${s.spacing(3)} !important`,paddingBottom:`${s.spacing(3)} !important`,[s.breakpoints.only("xs")]:{paddingTop:`${s.spacing(2)} !important`,paddingBottom:`${s.spacing(2)} !important`}}}})};export{s as default};
2
+ //# sourceMappingURL=GlobalSpacingStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GlobalSpacingStyles.js","sources":["../../../src/components/PageLayout/GlobalSpacingStyles.tsx"],"sourcesContent":["import GlobalStyles from '@mui/material/GlobalStyles';\nimport useTheme from '@mui/material/styles/useTheme';\nimport { HORIZONTAL_SPACE_CLASSNAME, LEFT_HORIZONTAL_SPACE_CLASSNAME, RIGHT_HORIZONTAL_SPACE_CLASSNAME, VERTICAL_SPACE_CLASSNAME } from '.';\n\nconst GlobalSpacingStyles = () => {\n const theme = useTheme();\n\n return (\n <GlobalStyles\n styles={{\n [`.${HORIZONTAL_SPACE_CLASSNAME}`]: {\n paddingLeft: `${theme.spacing(3)} !important`,\n paddingRight: `${theme.spacing(3)} !important`,\n [theme.breakpoints.only('xs')]: {\n paddingLeft: `${theme.spacing(2)} !important`,\n paddingRight: `${theme.spacing(2)} !important`,\n },\n },\n [`.${LEFT_HORIZONTAL_SPACE_CLASSNAME}`]: {\n paddingLeft: `${theme.spacing(3)} !important`,\n [theme.breakpoints.only('xs')]: {\n paddingLeft: `${theme.spacing(2)} !important`,\n },\n },\n [`.${RIGHT_HORIZONTAL_SPACE_CLASSNAME}`]: {\n paddingRight: `${theme.spacing(3)} !important`,\n [theme.breakpoints.only('xs')]: {\n paddingRight: `${theme.spacing(2)} !important`,\n },\n },\n [`.${VERTICAL_SPACE_CLASSNAME}`]: {\n paddingTop: `${theme.spacing(3)} !important`,\n paddingBottom: `${theme.spacing(3)} !important`,\n [theme.breakpoints.only('xs')]: {\n paddingTop: `${theme.spacing(2)} !important`,\n paddingBottom: `${theme.spacing(2)} !important`,\n },\n },\n }}\n />\n );\n};\n\nexport default GlobalSpacingStyles;\n"],"names":["GlobalSpacingStyles","theme","useTheme","_jsx","GlobalStyles","styles","HORIZONTAL_SPACE_CLASSNAME","paddingLeft","spacing","paddingRight","breakpoints","only","LEFT_HORIZONTAL_SPACE_CLASSNAME","RIGHT_HORIZONTAL_SPACE_CLASSNAME","VERTICAL_SPACE_CLASSNAME","paddingTop","paddingBottom"],"mappings":"gSAIM,MAAAA,EAAsB,KACxB,MAAMC,EAAQC,IAEd,OACIC,EAACC,EAAY,CACTC,OAAQ,CACJ,CAAC,IAAIC,KAA+B,CAChCC,YAAa,GAAGN,EAAMO,QAAQ,gBAC9BC,aAAc,GAAGR,EAAMO,QAAQ,gBAC/B,CAACP,EAAMS,YAAYC,KAAK,OAAQ,CAC5BJ,YAAa,GAAGN,EAAMO,QAAQ,gBAC9BC,aAAc,GAAGR,EAAMO,QAAQ,kBAGvC,CAAC,IAAII,KAAoC,CACrCL,YAAa,GAAGN,EAAMO,QAAQ,gBAC9B,CAACP,EAAMS,YAAYC,KAAK,OAAQ,CAC5BJ,YAAa,GAAGN,EAAMO,QAAQ,kBAGtC,CAAC,IAAIK,KAAqC,CACtCJ,aAAc,GAAGR,EAAMO,QAAQ,gBAC/B,CAACP,EAAMS,YAAYC,KAAK,OAAQ,CAC5BF,aAAc,GAAGR,EAAMO,QAAQ,kBAGvC,CAAC,IAAIM,KAA6B,CAC9BC,WAAY,GAAGd,EAAMO,QAAQ,gBAC7BQ,cAAe,GAAGf,EAAMO,QAAQ,gBAChC,CAACP,EAAMS,YAAYC,KAAK,OAAQ,CAC5BI,WAAY,GAAGd,EAAMO,QAAQ,gBAC7BQ,cAAe,GAAGf,EAAMO,QAAQ,oBAKlD"}
@@ -1,6 +1,14 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React__default, { ReactNode, ComponentType } from 'react';
3
3
 
4
+ declare const HORIZONTAL_SPACE_CLASSNAME = "horizontal-content-space";
5
+ declare const LEFT_HORIZONTAL_SPACE_CLASSNAME = "left-horizontal-content-space";
6
+ declare const RIGHT_HORIZONTAL_SPACE_CLASSNAME = "right-horizontal-content-space";
7
+ declare const VERTICAL_SPACE_CLASSNAME = "vertical-content-space";
8
+ declare const maxWidth = 1112;
9
+ declare const PageTitle: ({ title }: {
10
+ title: string | ReactNode;
11
+ }) => react_jsx_runtime.JSX.Element;
4
12
  type Props = {
5
13
  actionBtnTitle?: string;
6
14
  caption?: ReactNode;
@@ -29,4 +37,4 @@ type Props = {
29
37
  };
30
38
  declare const PageLayout: (props: Props) => react_jsx_runtime.JSX.Element;
31
39
 
32
- export { type Props, PageLayout as default };
40
+ export { HORIZONTAL_SPACE_CLASSNAME, LEFT_HORIZONTAL_SPACE_CLASSNAME, PageTitle, type Props, RIGHT_HORIZONTAL_SPACE_CLASSNAME, VERTICAL_SPACE_CLASSNAME, PageLayout as default, maxWidth };
@@ -0,0 +1,2 @@
1
+ import{jsx as i,jsxs as t,Fragment as n}from"react/jsx-runtime";import e from"react";import a from"@mui/icons-material/Add";import o from"@mui/icons-material/ArrowBack";import r from"@mui/material/Grid";import d from"@mui/material/IconButton";import{styled as m,useTheme as l}from"@mui/material/styles";import c from"@mui/material/Typography";import p from"@mui/material/useMediaQuery";import s from"./DocumentTitle.js";import h from"./FullWidthContainer.js";import g from"../FDErrorBoundary/index.js";import u from"@mui/material/Button";import{getMicroFrontendAttribute as f}from"../../utilities/renderUtilities.js";import{joinUrlPaths as v}from"../../utilities/validation.js";import b from"../Spacer/index.js";import k from"@mui/material/Box";import x from"@mui/material/Divider";const B="horizontal-content-space",w="left-horizontal-content-space",y="right-horizontal-content-space",T="vertical-content-space",W=1112,C=m("div")((({theme:i,fluid:t})=>({maxWidth:t?"none":W,[i.breakpoints.down("md")]:{maxWidth:"none"},padding:i.spacing(2,4),position:"relative",minHeight:"100vh"}))),A=m(r)((({theme:i})=>({[i.breakpoints.down("sm")]:{width:"100%",paddingTop:i.spacing(2)}}))),L=m(r)((({theme:i})=>({flexWrap:"nowrap",alignItems:"flex-start",paddingTop:i.spacing(3),paddingBottom:i.spacing(3),[i.breakpoints.down("md")]:{paddingTop:i.spacing(2),paddingBottom:i.spacing(3)}}))),j=m(r)((({theme:i})=>({paddingTop:i.spacing(2)}))),z=m(r)((()=>({flexGrow:1}))),I=m("div")((({theme:i})=>({maxWidth:W,paddingBottom:i.spacing(3),[i.breakpoints.down("md")]:{paddingBottom:i.spacing(2),paddingLeft:i.spacing(2),paddingRight:i.spacing(2)}}))),R=m(d,{shouldForwardProp:i=>"hasTitleComponent"!==i})((({theme:i,hasTitleComponent:t})=>({margin:t?i.spacing(-.75,2,-1.5,-1.5):i.spacing(-1.5,2,-1.5,-1.5),[i.breakpoints.only("sm")]:{marginLeft:i.spacing(-2)},[i.breakpoints.only("xs")]:{marginLeft:i.spacing(-2)}}))),D=m("div")((({theme:i})=>({maxWidth:W,marginLeft:i.spacing(6),marginRight:i.spacing(4),paddingBottom:i.spacing(2),[i.breakpoints.only("md")]:{marginLeft:12,marginRight:i.spacing(3)},[i.breakpoints.only("sm")]:{marginLeft:i.spacing(3),marginRight:i.spacing(3),maxWidth:"none"},[i.breakpoints.only("xs")]:{marginLeft:i.spacing(2),marginRight:i.spacing(2),maxWidth:"none"}}))),H=m(r)((()=>({display:"flex",flexGrow:1,justifyContent:"flex-end"}))),P=m(c)((()=>({lineHeight:"26px"}))),E=m(c)((()=>({fontWeight:"bold"}))),F=m(x)((({theme:i})=>({marginBottom:i.spacing(4)}))),G=({title:t})=>i(E,{variant:"h5",component:"h2",children:t}),$=m("div")((({useAlternateBackground:i,theme:t})=>({backgroundColor:i?t.palette.alternateBackground.main:t.palette.white.main,width:"100%",height:"100%"}))),V=d=>{const{actionBtnTitle:m,caption:c,children:x,contextButtons:B,documentTitle:w,fluid:y=!1,fullWidth:T,header:W,hideHeader:E,actionButtonLink:V,openLinkInNewTab:_=!1,pageHeader:M,showActionButton:N,showAddIcon:Q,title:S,titleComponent:U,toPrevious:q,toParent:J,strictToParent:K,navigate:O,hideDivider:X=!1,customActionButtons:Y,useAlternateBackground:Z=!1,titleComponentAfter:ii}=d,ti=l(),ni=p(ti.breakpoints.down("md")),ei=f("data-portal-base-url")||"/",ai=V?.startsWith("https://"),oi=ai?V:void 0!==V?v(ei,V):"";return i($,{useAlternateBackground:Z,children:t(C,{fluid:y,children:[w&&i(s,{children:w}),M||null,t(D,{children:[M&&i(b,{size:16,variant:"vertical"}),!E&&t(n,{children:[t(L,{container:!0,alignItems:"center",direction:"column",children:[i(r,{item:!0,container:!0,direction:"row",alignContent:"space-between",children:i(H,{item:!0,children:B?.map((t=>i("div",{children:t},`context-button-${e.isValidElement(t)?t.props?.["data-testid"]||t.props?.children:"fallback"}`)))})}),t(j,{item:!0,container:!0,children:[(J||q)&&i(k,{children:i(R,{"aria-label":"Back","data-testid":"back_button",hasTitleComponent:!!U,component:"button",onClick:()=>{q?O(-1):J&&K||J&&history.length<3?O(J):O(-1)},children:i(o,{})})}),t(z,{item:!0,children:[U?i(U,{}):t(k,{display:"flex",alignItems:"center",gap:2,children:[i(G,{title:S}),ii]}),c&&i(P,{variant:"caption",component:"h3",children:c})]}),N&&t(n,{children:[ni&&i(b,{size:56,variant:"vertical"}),i(A,{item:!0,children:t(u,{variant:"contained",fullWidth:!0,"data-testid":`Action-button-${m}`,href:_||ai?oi:"",target:_?"_blank":void 0,rel:_?"noopener noreferrer":void 0,onClick:_||ai?()=>{}:()=>O(V),children:[Q&&i(a,{}),m]})})]}),Y?.map((n=>t("div",{children:[ni&&i(b,{size:56,variant:"vertical"}),!ni&&i(b,{size:16,variant:"vertical"}),i(A,{item:!0,children:n})]},`custom-action-button-${e.isValidElement(n)?n.props?.["data-testid"]||n.props?.children:"fallback"}`)))]})]}),!X&&i(F,{})]}),t(h,{fullWidth:T,children:[W?i(I,{children:W}):null,i(g,{identifier:w,children:i(n,{children:x})})]})]})]})})};export{B as HORIZONTAL_SPACE_CLASSNAME,w as LEFT_HORIZONTAL_SPACE_CLASSNAME,G as PageTitle,y as RIGHT_HORIZONTAL_SPACE_CLASSNAME,T as VERTICAL_SPACE_CLASSNAME,V as default,W as maxWidth};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/PageLayout/index.tsx"],"sourcesContent":["import React, { type ComponentType, type ReactNode } from 'react';\n\nimport Add from '@mui/icons-material/Add';\nimport ArrowBackIcon from '@mui/icons-material/ArrowBack';\nimport Grid from '@mui/material/Grid';\nimport IconButton from '@mui/material/IconButton';\nimport { styled, useTheme } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport useMediaQuery from '@mui/material/useMediaQuery';\n\nimport DocumentTitle from './DocumentTitle';\nimport FullWidthContainer from './FullWidthContainer';\nimport FDErrorBoundary from '../FDErrorBoundary';\nimport Button from '@mui/material/Button';\nimport { getMicroFrontendAttribute } from '../../utilities/renderUtilities';\nimport { joinUrlPaths } from '../../utilities/validation';\nimport Spacer from '../Spacer';\nimport Box from '@mui/material/Box';\nimport Divider from '@mui/material/Divider';\n\nexport const HORIZONTAL_SPACE_CLASSNAME = 'horizontal-content-space';\nexport const LEFT_HORIZONTAL_SPACE_CLASSNAME = 'left-horizontal-content-space';\nexport const RIGHT_HORIZONTAL_SPACE_CLASSNAME = 'right-horizontal-content-space';\nexport const VERTICAL_SPACE_CLASSNAME = 'vertical-content-space';\nexport const maxWidth = 1112;\nconst historyMinLength = 3;\n\nconst StyledWrapper = styled('div')<{ fluid: boolean }>(({ theme, fluid }) => ({\n maxWidth: fluid ? 'none' : maxWidth,\n [theme.breakpoints.down('md')]: {\n maxWidth: 'none',\n },\n padding: theme.spacing(2, 4),\n position: 'relative',\n minHeight: '100vh',\n}));\n\nconst StyledActionButtonGrid = styled(Grid)(({ theme }) => ({\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n paddingTop: theme.spacing(2),\n },\n}));\n\nconst StyledHeader = styled(Grid)(({ theme }) => ({\n flexWrap: 'nowrap',\n alignItems: 'flex-start',\n paddingTop: theme.spacing(3),\n paddingBottom: theme.spacing(3),\n\n [theme.breakpoints.down('md')]: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(3),\n },\n}));\n\nconst StyledTitleContainer = styled(Grid)(({ theme }) => ({\n paddingTop: theme.spacing(2),\n}));\n\nconst StyledTitleSection = styled(Grid)(() => ({\n flexGrow: 1,\n}));\n\nconst StyledTopSection = styled('div')(({ theme }) => ({\n maxWidth,\n paddingBottom: theme.spacing(3),\n\n [theme.breakpoints.down('md')]: {\n paddingBottom: theme.spacing(2),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n}));\n\nconst StyledBackButton = styled(IconButton, {\n shouldForwardProp: (prop) => prop !== 'hasTitleComponent',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n})<{ hasTitleComponent: boolean; component: any }>(({ theme, hasTitleComponent }) => ({\n margin: hasTitleComponent ? theme.spacing(-0.75, 2, -1.5, -1.5) : theme.spacing(-1.5, 2, -1.5, -1.5),\n\n [theme.breakpoints.only('sm')]: {\n marginLeft: theme.spacing(-2),\n },\n\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(-2),\n },\n}));\n\nconst StyledInnerWrapper = styled('div')(({ theme }) => ({\n maxWidth,\n marginLeft: theme.spacing(6),\n marginRight: theme.spacing(4),\n paddingBottom: theme.spacing(2),\n\n [theme.breakpoints.only('md')]: {\n marginLeft: 12,\n marginRight: theme.spacing(3),\n },\n\n [theme.breakpoints.only('sm')]: {\n marginLeft: theme.spacing(3),\n marginRight: theme.spacing(3),\n maxWidth: 'none',\n },\n\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n maxWidth: 'none',\n },\n}));\n\nconst StyledHeaderContainer = styled(Grid)(() => ({\n display: 'flex',\n flexGrow: 1,\n justifyContent: 'flex-end',\n}));\nconst StyledCaption = styled(Typography)<{ component: string }>(() => ({\n lineHeight: '26px',\n}));\n\nconst StyledPageTitle = styled(Typography)<{ component: string }>(() => ({\n fontWeight: 'bold',\n}));\n\nconst StyledPageDivider = styled(Divider)(({ theme }) => ({\n marginBottom: theme.spacing(4),\n}));\n\nexport const PageTitle = ({ title }: { title: string | ReactNode }) => (\n <StyledPageTitle variant=\"h5\" component=\"h2\">\n {title}\n </StyledPageTitle>\n);\n\nconst StyledPageContainer = styled('div')<{ useAlternateBackground: boolean }>(({ useAlternateBackground, theme }) => ({\n backgroundColor: useAlternateBackground ? theme.palette.alternateBackground.main : theme.palette.white.main,\n width: '100%',\n height: '100%',\n}));\n\nexport type Props = {\n actionBtnTitle?: string;\n caption?: ReactNode;\n children: ReactNode;\n contextButtons?: ReactNode[];\n documentTitle: string;\n fluid?: boolean;\n fullWidth?: boolean;\n header?: ReactNode;\n hideHeader?: boolean;\n actionButtonLink?: string;\n pageHeader?: ReactNode;\n showActionButton?: boolean;\n showAddIcon?: boolean;\n title: ReactNode;\n titleComponent?: ComponentType<React.PropsWithChildren<unknown>>;\n titleComponentAfter?: ReactNode;\n toPrevious?: boolean;\n toParent?: string;\n strictToParent?: boolean;\n openLinkInNewTab?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n navigate: (to: any) => void;\n hideDivider?: boolean;\n customActionButtons?: ReactNode[];\n useAlternateBackground?: boolean;\n};\n\nconst PageLayout = (props: Props) => {\n const {\n actionBtnTitle,\n caption,\n children,\n contextButtons,\n documentTitle,\n fluid = false,\n fullWidth,\n header,\n hideHeader,\n actionButtonLink,\n openLinkInNewTab = false,\n pageHeader,\n showActionButton,\n showAddIcon,\n title,\n titleComponent: TitleComponent,\n toPrevious,\n toParent,\n strictToParent,\n navigate,\n hideDivider = false,\n customActionButtons,\n useAlternateBackground = false,\n titleComponentAfter,\n } = props;\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n\n const baseUrl = getMicroFrontendAttribute('data-portal-base-url') || '/';\n const actionButtonWithHttps = actionButtonLink?.startsWith('https://');\n const getActionButtonLink = () => {\n if (actionButtonWithHttps) {\n return actionButtonLink;\n }\n if (actionButtonLink !== undefined) {\n return joinUrlPaths(baseUrl, actionButtonLink);\n }\n return '';\n };\n const actionButtonLinkFinal = getActionButtonLink();\n\n return (\n <StyledPageContainer useAlternateBackground={useAlternateBackground}>\n <StyledWrapper fluid={fluid}>\n {documentTitle && <DocumentTitle>{documentTitle}</DocumentTitle>}\n\n {pageHeader || null}\n <StyledInnerWrapper>\n {pageHeader && <Spacer size={16} variant=\"vertical\" />}\n {!hideHeader && (\n <>\n <StyledHeader container alignItems=\"center\" direction=\"column\">\n <Grid item container direction=\"row\" alignContent=\"space-between\">\n <StyledHeaderContainer item>\n {contextButtons?.map((button) => (\n <div\n key={`context-button-${React.isValidElement(button) ? button.props?.['data-testid'] || button.props?.children : 'fallback'}`}\n >\n {button}\n </div>\n ))}\n </StyledHeaderContainer>\n </Grid>\n <StyledTitleContainer item container>\n {(toParent || toPrevious) && (\n <Box>\n <StyledBackButton\n aria-label=\"Back\"\n data-testid=\"back_button\"\n hasTitleComponent={!!TitleComponent}\n component={'button'}\n onClick={() => {\n if (toPrevious) {\n navigate(-1);\n } else if (toParent && strictToParent) {\n navigate(toParent);\n } else if (toParent && history.length < historyMinLength) {\n navigate(toParent);\n } else {\n navigate(-1);\n }\n }}\n >\n <ArrowBackIcon />\n </StyledBackButton>\n </Box>\n )}\n\n <StyledTitleSection item>\n {TitleComponent ? (\n <TitleComponent />\n ) : (\n <Box display=\"flex\" alignItems=\"center\" gap={2}>\n <PageTitle title={title} />\n {titleComponentAfter}\n </Box>\n )}\n {caption && (\n <StyledCaption variant=\"caption\" component=\"h3\">\n {caption}\n </StyledCaption>\n )}\n </StyledTitleSection>\n\n {showActionButton && (\n <>\n {isMobile && <Spacer size={56} variant=\"vertical\" />}\n <StyledActionButtonGrid item>\n <Button\n variant=\"contained\"\n fullWidth={true}\n data-testid={`Action-button-${actionBtnTitle}`}\n href={openLinkInNewTab || actionButtonWithHttps ? actionButtonLinkFinal : ''}\n target={openLinkInNewTab ? '_blank' : undefined}\n rel={openLinkInNewTab ? 'noopener noreferrer' : undefined}\n onClick={\n !openLinkInNewTab && !actionButtonWithHttps ? () => navigate(actionButtonLink) : () => {}\n }\n >\n {showAddIcon && <Add />}\n {actionBtnTitle}\n </Button>\n </StyledActionButtonGrid>\n </>\n )}\n {customActionButtons?.map((button) => (\n <div\n key={`custom-action-button-${React.isValidElement(button) ? button.props?.['data-testid'] || button.props?.children : 'fallback'}`}\n >\n {isMobile && <Spacer size={56} variant=\"vertical\" />}\n {!isMobile && <Spacer size={16} variant=\"vertical\" />}\n <StyledActionButtonGrid item>{button}</StyledActionButtonGrid>\n </div>\n ))}\n </StyledTitleContainer>\n </StyledHeader>\n {!hideDivider && <StyledPageDivider />}\n </>\n )}\n <FullWidthContainer fullWidth={fullWidth}>\n {header ? <StyledTopSection>{header}</StyledTopSection> : null}\n <FDErrorBoundary identifier={documentTitle}>\n <>{children}</>\n </FDErrorBoundary>\n </FullWidthContainer>\n </StyledInnerWrapper>\n </StyledWrapper>\n </StyledPageContainer>\n );\n};\n\nexport default PageLayout;\n"],"names":["HORIZONTAL_SPACE_CLASSNAME","LEFT_HORIZONTAL_SPACE_CLASSNAME","RIGHT_HORIZONTAL_SPACE_CLASSNAME","VERTICAL_SPACE_CLASSNAME","maxWidth","StyledWrapper","styled","theme","fluid","breakpoints","down","padding","spacing","position","minHeight","StyledActionButtonGrid","Grid","width","paddingTop","StyledHeader","flexWrap","alignItems","paddingBottom","StyledTitleContainer","StyledTitleSection","flexGrow","StyledTopSection","paddingLeft","paddingRight","StyledBackButton","IconButton","shouldForwardProp","prop","hasTitleComponent","margin","only","marginLeft","StyledInnerWrapper","marginRight","StyledHeaderContainer","display","justifyContent","StyledCaption","Typography","lineHeight","StyledPageTitle","fontWeight","StyledPageDivider","Divider","marginBottom","PageTitle","title","_jsx","variant","component","children","StyledPageContainer","useAlternateBackground","backgroundColor","palette","alternateBackground","main","white","height","PageLayout","props","actionBtnTitle","caption","contextButtons","documentTitle","fullWidth","header","hideHeader","actionButtonLink","openLinkInNewTab","pageHeader","showActionButton","showAddIcon","titleComponent","TitleComponent","toPrevious","toParent","strictToParent","navigate","hideDivider","customActionButtons","titleComponentAfter","useTheme","isMobile","useMediaQuery","baseUrl","getMicroFrontendAttribute","actionButtonWithHttps","startsWith","actionButtonLinkFinal","undefined","joinUrlPaths","_jsxs","DocumentTitle","Spacer","size","_Fragment","container","direction","item","alignContent","map","button","React","isValidElement","Box","onClick","history","length","ArrowBackIcon","gap","Button","href","target","rel","Add","FullWidthContainer","FDErrorBoundary","identifier"],"mappings":"8wBAoBO,MAAMA,EAA6B,2BAC7BC,EAAkC,gCAClCC,EAAmC,iCACnCC,EAA2B,yBAC3BC,EAAW,KAGlBC,EAAgBC,EAAO,MAAPA,EAAkC,EAAGC,QAAOC,YAAa,CAC3EJ,SAAUI,EAAQ,OAASJ,EAC3B,CAACG,EAAME,YAAYC,KAAK,OAAQ,CAC5BN,SAAU,QAEdO,QAASJ,EAAMK,QAAQ,EAAG,GAC1BC,SAAU,WACVC,UAAW,YAGTC,EAAyBT,EAAOU,EAAPV,EAAa,EAAGC,YAAa,CACxD,CAACA,EAAME,YAAYC,KAAK,OAAQ,CAC5BO,MAAO,OACPC,WAAYX,EAAMK,QAAQ,QAI5BO,EAAeb,EAAOU,EAAPV,EAAa,EAAGC,YAAa,CAC9Ca,SAAU,SACVC,WAAY,aACZH,WAAYX,EAAMK,QAAQ,GAC1BU,cAAef,EAAMK,QAAQ,GAE7B,CAACL,EAAME,YAAYC,KAAK,OAAQ,CAC5BQ,WAAYX,EAAMK,QAAQ,GAC1BU,cAAef,EAAMK,QAAQ,QAI/BW,EAAuBjB,EAAOU,EAAPV,EAAa,EAAGC,YAAa,CACtDW,WAAYX,EAAMK,QAAQ,OAGxBY,EAAqBlB,EAAOU,EAAPV,EAAa,KAAO,CAC3CmB,SAAU,MAGRC,EAAmBpB,EAAO,MAAPA,EAAc,EAAGC,YAAa,CACnDH,WACAkB,cAAef,EAAMK,QAAQ,GAE7B,CAACL,EAAME,YAAYC,KAAK,OAAQ,CAC5BY,cAAef,EAAMK,QAAQ,GAC7Be,YAAapB,EAAMK,QAAQ,GAC3BgB,aAAcrB,EAAMK,QAAQ,QAI9BiB,EAAmBvB,EAAOwB,EAAY,CACxCC,kBAAoBC,GAAkB,sBAATA,GADR1B,EAG0B,EAAGC,QAAO0B,wBAAyB,CAClFC,OAAQD,EAAoB1B,EAAMK,SAAS,IAAM,GAAI,KAAM,KAAOL,EAAMK,SAAS,IAAK,GAAI,KAAM,KAEhG,CAACL,EAAME,YAAY0B,KAAK,OAAQ,CAC5BC,WAAY7B,EAAMK,SAAS,IAG/B,CAACL,EAAME,YAAY0B,KAAK,OAAQ,CAC5BC,WAAY7B,EAAMK,SAAS,QAI7ByB,EAAqB/B,EAAO,MAAPA,EAAc,EAAGC,YAAa,CACrDH,WACAgC,WAAY7B,EAAMK,QAAQ,GAC1B0B,YAAa/B,EAAMK,QAAQ,GAC3BU,cAAef,EAAMK,QAAQ,GAE7B,CAACL,EAAME,YAAY0B,KAAK,OAAQ,CAC5BC,WAAY,GACZE,YAAa/B,EAAMK,QAAQ,IAG/B,CAACL,EAAME,YAAY0B,KAAK,OAAQ,CAC5BC,WAAY7B,EAAMK,QAAQ,GAC1B0B,YAAa/B,EAAMK,QAAQ,GAC3BR,SAAU,QAGd,CAACG,EAAME,YAAY0B,KAAK,OAAQ,CAC5BC,WAAY7B,EAAMK,QAAQ,GAC1B0B,YAAa/B,EAAMK,QAAQ,GAC3BR,SAAU,YAIZmC,EAAwBjC,EAAOU,EAAPV,EAAa,KAAO,CAC9CkC,QAAS,OACTf,SAAU,EACVgB,eAAgB,eAEdC,EAAgBpC,EAAOqC,EAAPrC,EAA0C,KAAO,CACnEsC,WAAY,WAGVC,EAAkBvC,EAAOqC,EAAPrC,EAA0C,KAAO,CACrEwC,WAAY,WAGVC,EAAoBzC,EAAO0C,EAAP1C,EAAgB,EAAGC,YAAa,CACtD0C,aAAc1C,EAAMK,QAAQ,OAGnBsC,EAAY,EAAGC,WACxBC,EAACP,EAAgB,CAAAQ,QAAQ,KAAKC,UAAU,KACnCC,SAAAJ,IAIHK,EAAsBlD,EAAO,MAAPA,EAAmD,EAAGmD,yBAAwBlD,YAAa,CACnHmD,gBAAiBD,EAAyBlD,EAAMoD,QAAQC,oBAAoBC,KAAOtD,EAAMoD,QAAQG,MAAMD,KACvG5C,MAAO,OACP8C,OAAQ,WA+BNC,EAAcC,IAChB,MAAMC,eACFA,EAAcC,QACdA,EAAOZ,SACPA,EAAQa,eACRA,EAAcC,cACdA,EAAa7D,MACbA,GAAQ,EAAK8D,UACbA,EAASC,OACTA,EAAMC,WACNA,EAAUC,iBACVA,EAAgBC,iBAChBA,GAAmB,EAAKC,WACxBA,EAAUC,iBACVA,EAAgBC,YAChBA,EAAW1B,MACXA,EACA2B,eAAgBC,EAAcC,WAC9BA,EAAUC,SACVA,EAAQC,eACRA,EAAcC,SACdA,EAAQC,YACRA,GAAc,EAAKC,oBACnBA,EAAmB5B,uBACnBA,GAAyB,EAAK6B,oBAC9BA,IACArB,EACE1D,GAAQgF,IACRC,GAAWC,EAAclF,GAAME,YAAYC,KAAK,OAEhDgF,GAAUC,EAA0B,yBAA2B,IAC/DC,GAAwBnB,GAAkBoB,WAAW,YAUrDC,GAREF,GACOnB,OAEcsB,IAArBtB,EACOuB,EAAaN,GAASjB,GAE1B,GAIX,OACIrB,EAACI,EAAoB,CAAAC,uBAAwBA,EAAsBF,SAC/D0C,EAAC5F,GAAcG,MAAOA,EACjB+C,SAAA,CAAAc,GAAiBjB,EAAC8C,EAAe,CAAA3C,SAAAc,IAEjCM,GAAc,KACfsB,EAAC5D,EACI,CAAAkB,SAAA,CAAAoB,GAAcvB,EAAC+C,GAAOC,KAAM,GAAI/C,QAAQ,cACvCmB,GACEyB,EACII,EAAA,CAAA9C,SAAA,CAAA0C,EAAC9E,EAAY,CAACmF,WAAU,EAAAjF,WAAW,SAASkF,UAAU,SAClDhD,SAAA,CAAAH,EAACpC,EAAK,CAAAwF,QAAKF,WAAS,EAACC,UAAU,MAAME,aAAa,gBAAelD,SAC7DH,EAACb,EAAqB,CAACiE,MAClB,EAAAjD,SAAAa,GAAgBsC,KAAKC,GAClBvD,EAAA,MAAA,CAAAG,SAGKoD,GAFI,kBAAkBC,EAAMC,eAAeF,GAAUA,EAAO1C,QAAQ,gBAAkB0C,EAAO1C,OAAOV,SAAW,oBAOhI0C,EAAC1E,EAAoB,CAACiF,MAAK,EAAAF,WACtB,EAAA/C,SAAA,EAAC0B,GAAYD,IACV5B,EAAC0D,EAAG,CAAAvD,SACAH,EAACvB,gBACc,OAAM,cACL,cACZI,oBAAqB8C,EACrBzB,UAAW,SACXyD,QAAS,KACD/B,EACAG,GAAU,GACHF,GAAYC,GAEZD,GAAY+B,QAAQC,OAhO1D,EA+N+B9B,EAASF,GAITE,GAAU,EACb,EAGL5B,SAAAH,EAAC8D,EAAa,QAK1BjB,EAACzE,EAAmB,CAAAgF,MACf,EAAAjD,SAAA,CAAAwB,EACG3B,EAAC2B,EAAiB,CAAA,GAElBkB,EAACa,EAAG,CAACtE,QAAQ,OAAOnB,WAAW,SAAS8F,IAAK,EACzC5D,SAAA,CAAAH,EAACF,EAAS,CAACC,MAAOA,IACjBmC,MAGRnB,GACGf,EAACV,EAAa,CAACW,QAAQ,UAAUC,UAAU,KAAIC,SAC1CY,OAKZS,GACGqB,EACKI,EAAA,CAAA9C,SAAA,CAAAiC,IAAYpC,EAAC+C,EAAM,CAACC,KAAM,GAAI/C,QAAQ,aACvCD,EAACrC,EAAsB,CAACyF,MACpB,EAAAjD,SAAA0C,EAACmB,EAAM,CACH/D,QAAQ,YACRiB,WAAW,EAAI,cACF,iBAAiBJ,IAC9BmD,KAAM3C,GAAoBkB,GAAwBE,GAAwB,GAC1EwB,OAAQ5C,EAAmB,cAAWqB,EACtCwB,IAAK7C,EAAmB,2BAAwBqB,EAChDgB,QACKrC,GAAqBkB,GAA2D,OAAnC,IAAMT,EAASV,aAGhEI,GAAezB,EAACoE,MAChBtD,UAKhBmB,GAAqBqB,KAAKC,GACvBV,EAGK,MAAA,CAAA1C,SAAA,CAAAiC,IAAYpC,EAAC+C,EAAO,CAAAC,KAAM,GAAI/C,QAAQ,cACrCmC,IAAYpC,EAAC+C,EAAO,CAAAC,KAAM,GAAI/C,QAAQ,aACxCD,EAACrC,GAAuByF,MAAI,EAAAjD,SAAEoD,MAJzB,wBAAwBC,EAAMC,eAAeF,GAAUA,EAAO1C,QAAQ,gBAAkB0C,EAAO1C,OAAOV,SAAW,uBASpI6B,GAAehC,EAACL,SAG1BkD,EAACwB,EAAmB,CAAAnD,UAAWA,YAC1BC,EAASnB,EAAC1B,EAAgB,CAAA6B,SAAEgB,IAA6B,KAC1DnB,EAACsE,EAAe,CAACC,WAAYtD,EACzBd,SAAAH,EAAAiD,EAAA,CAAA9C,SAAGA,gBAMzB"}
@@ -1,2 +1,2 @@
1
1
  import{jsx as e,Fragment as r,jsxs as t}from"react/jsx-runtime";import{styled as i,useTheme as o}from"@mui/material/styles";import l from"@mui/material/AppBar";import a from"@mui/material/Box";import n from"@mui/material/CssBaseline";import m from"@mui/material/Drawer";import d from"@mui/material/Typography";const p=i("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.grey[300],height:"65px",color:e.palette.text.primary,borderBottom:`2px solid ${e.palette.grey[400]}`}))),s=i("div")((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.palette.grey[300],height:"100%",color:e.palette.text.primary}))),c=198,x=({children:i,loadedFromPortal:x})=>{const h=o();if(x)return e(r,{children:i});const f=e(s,{children:e(d,{sx:{fontWeight:"bold"},children:"Sidebar"})});return t(a,{sx:{display:"flex"},children:[e(n,{}),e(l,{position:"fixed",sx:{width:{sm:"calc(100% - 198px)"},ml:{sm:"198px"},boxShadow:"none"},children:e(p,{children:e(d,{sx:{fontWeight:"bold"},children:"Header"})})}),e(a,{component:"nav",sx:{width:{sm:c},flexShrink:{sm:0}},"aria-label":"mailbox folders",children:e(m,{variant:"permanent",sx:{display:{xs:"none",sm:"block"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:c,borderColor:h.palette.grey[400],borderWidth:"2px"}},open:!0,children:f})}),e(a,{component:"main",sx:{flexGrow:1,width:{sm:"calc(100% - 198px)",marginTop:"65px"}},children:i})]})};export{x as default};
2
- //# sourceMappingURL=PortalMock.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/PortalMock/index.tsx"],"sourcesContent":["import { styled, useTheme } from '@mui/material/styles';\nimport AppBar from '@mui/material/AppBar';\nimport Box from '@mui/material/Box';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport Drawer from '@mui/material/Drawer';\nimport Typography from '@mui/material/Typography';\n\nconst StyledHeader = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.grey[300],\n height: '65px',\n color: theme.palette.text.primary,\n borderBottom: `2px solid ${theme.palette.grey[400]}`,\n}));\n\nconst StyledSidebar = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.grey[300],\n height: '100%',\n color: theme.palette.text.primary,\n}));\n\ntype Props = {\n loadedFromPortal: boolean;\n children: React.ReactNode;\n};\nconst drawerWidth = 198;\n\nconst PortalMock = ({ children, loadedFromPortal }: Props) => {\n const theme = useTheme();\n\n if (loadedFromPortal) {\n return <>{children}</>;\n }\n\n const drawer = (\n <StyledSidebar>\n <Typography sx={{ fontWeight: 'bold' }}>Sidebar</Typography>\n </StyledSidebar>\n );\n\n return (\n <Box sx={{ display: 'flex' }}>\n <CssBaseline />\n <AppBar\n position=\"fixed\"\n sx={{\n width: { sm: `calc(100% - ${drawerWidth}px)` },\n ml: { sm: `${drawerWidth}px` },\n boxShadow: 'none',\n }}\n >\n <StyledHeader>\n <Typography sx={{ fontWeight: 'bold' }}>Header</Typography>\n </StyledHeader>\n </AppBar>\n <Box component=\"nav\" sx={{ width: { sm: drawerWidth }, flexShrink: { sm: 0 } }} aria-label=\"mailbox folders\">\n <Drawer\n variant=\"permanent\"\n sx={{\n display: { xs: 'none', sm: 'block' },\n '& .MuiDrawer-paper': {\n boxSizing: 'border-box',\n width: drawerWidth,\n borderColor: theme.palette.grey[400],\n borderWidth: '2px',\n },\n }}\n open\n >\n {drawer}\n </Drawer>\n </Box>\n <Box component=\"main\" sx={{ flexGrow: 1, width: { sm: `calc(100% - ${drawerWidth}px)`, marginTop: '65px' } }}>\n {children}\n </Box>\n </Box>\n );\n};\n\nexport default PortalMock;\n"],"names":["StyledHeader","styled","theme","display","justifyContent","alignItems","backgroundColor","palette","grey","height","color","text","primary","borderBottom","StyledSidebar","drawerWidth","PortalMock","children","loadedFromPortal","useTheme","_jsx","_Fragment","drawer","Typography","sx","fontWeight","_jsxs","Box","CssBaseline","AppBar","position","width","sm","ml","boxShadow","component","flexShrink","Drawer","variant","xs","boxSizing","borderColor","borderWidth","open","flexGrow","marginTop"],"mappings":"sTAOA,MAAMA,EAAeC,EAAO,MAAPA,EAAc,EAAGC,YAAa,CAC/CC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,KAAK,KACpCC,OAAQ,OACRC,MAAOR,EAAMK,QAAQI,KAAKC,QAC1BC,aAAc,aAAaX,EAAMK,QAAQC,KAAK,WAG5CM,EAAgBb,EAAO,MAAPA,EAAc,EAAGC,YAAa,CAChDC,QAAS,OACTC,eAAgB,SAChBC,WAAY,SACZC,gBAAiBJ,EAAMK,QAAQC,KAAK,KACpCC,OAAQ,OACRC,MAAOR,EAAMK,QAAQI,KAAKC,YAOxBG,EAAc,IAEdC,EAAa,EAAGC,WAAUC,uBAC5B,MAAMhB,EAAQiB,IAEd,GAAID,EACA,OAAOE,EAAAC,EAAA,CAAAJ,SAAGA,IAGd,MAAMK,EACFF,EAACN,EAAa,CAAAG,SACVG,EAACG,EAAU,CAACC,GAAI,CAAEC,WAAY,QAA8BR,SAAA,cAIpE,OACIS,EAACC,EAAI,CAAAH,GAAI,CAAErB,QAAS,QAAQc,SAAA,CACxBG,EAACQ,EAAW,CAAA,GACZR,EAACS,EAAM,CACHC,SAAS,QACTN,GAAI,CACAO,MAAO,CAAEC,GAAI,sBACbC,GAAI,CAAED,GAAI,SACVE,UAAW,QAGfjB,SAAAG,EAACpB,EAAY,CAAAiB,SACTG,EAACG,GAAWC,GAAI,CAAEC,WAAY,QAA6BR,SAAA,eAGnEG,EAACO,EAAI,CAAAQ,UAAU,MAAMX,GAAI,CAAEO,MAAO,CAAEC,GAAIjB,GAAeqB,WAAY,CAAEJ,GAAI,IAAK,aAAa,kBAAiBf,SACxGG,EAACiB,EACG,CAAAC,QAAQ,YACRd,GAAI,CACArB,QAAS,CAAEoC,GAAI,OAAQP,GAAI,SAC3B,qBAAsB,CAClBQ,UAAW,aACXT,MAAOhB,EACP0B,YAAavC,EAAMK,QAAQC,KAAK,KAChCkC,YAAa,QAGrBC,MAEC,EAAA1B,SAAAK,MAGTF,EAACO,EAAI,CAAAQ,UAAU,OAAOX,GAAI,CAAEoB,SAAU,EAAGb,MAAO,CAAEC,GAAI,qBAAiCa,UAAW,SAAU5B,SACvGA,MAGX"}
@@ -1,2 +1,2 @@
1
1
  import{jsx as i}from"react/jsx-runtime";import"react";import{styled as r}from"@mui/material/styles";const a=r("div")((({size:i=8,variant:r,children:a})=>{const t={padding:a?`${i}px`:void 0};return a?"horizontal"===r?t.margin=`${i}px 0`:"vertical"===r&&(t.margin=`0 ${i}px`):"horizontal"===r?t.height=`${i}px`:"vertical"===r&&(t.width=`${i}px`),t})),t=({className:r,variant:t,size:e=8,children:n})=>i(a,{className:r,variant:t,size:e,children:n});export{t as default};
2
- //# sourceMappingURL=Spacer.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Spacer/index.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\nimport { styled } from '@mui/material/styles';\n\nexport interface ISpacerProps {\n className?: string;\n variant?: 'horizontal' | 'vertical';\n size?: 8 | 16 | 24 | 32 | 40 | 56;\n children?: ReactNode;\n}\n\nconst SpacerDiv = styled('div')<ISpacerProps>(({ size = 8, variant, children }) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const style: any = {\n padding: children ? `${size}px` : undefined,\n };\n\n if (!children) {\n if (variant === 'horizontal') {\n style.height = `${size}px`;\n } else if (variant === 'vertical') {\n style.width = `${size}px`;\n }\n } else if (variant === 'horizontal') {\n style.margin = `${size}px 0`;\n } else if (variant === 'vertical') {\n style.margin = `0 ${size}px`;\n }\n\n return style;\n});\n\nconst Spacer = ({ className, variant, size = 8, children }: ISpacerProps) => {\n return (\n <SpacerDiv className={className} variant={variant} size={size}>\n {children}\n </SpacerDiv>\n );\n};\n\nexport default Spacer;\n"],"names":["SpacerDiv","styled","size","variant","children","style","padding","undefined","margin","height","width","Spacer","className","_jsx"],"mappings":"oGAUA,MAAMA,EAAYC,EAAO,MAAPA,EAA4B,EAAGC,OAAO,EAAGC,UAASC,eAEhE,MAAMC,EAAa,CACfC,QAASF,EAAW,GAAGF,WAAWK,GAetC,OAZKH,EAMkB,eAAZD,EACPE,EAAMG,OAAS,GAAGN,QACC,aAAZC,IACPE,EAAMG,OAAS,KAAKN,OARJ,eAAZC,EACAE,EAAMI,OAAS,GAAGP,MACC,aAAZC,IACPE,EAAMK,MAAQ,GAAGR,OAQlBG,CAAK,IAGVM,EAAS,EAAGC,YAAWT,UAASD,OAAO,EAAGE,cAExCS,EAACb,GAAUY,UAAWA,EAAWT,QAASA,EAASD,KAAMA,WACpDE"}
@@ -1,2 +1,2 @@
1
1
  import{jsx as e}from"react/jsx-runtime";import a from"@mui/material/FormControlLabel";import t from"@mui/material/Switch";const l=({label:l,checked:r,onChange:m,labelPlacement:o="start",size:i="medium",disabled:c=!1,testId:d})=>e(a,{label:l,labelPlacement:o,control:e(t,{checked:r,onChange:m,color:"primary",size:i,disabled:c,"data-fd":d})});export{l as default};
2
- //# sourceMappingURL=Switch.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Switch/index.tsx"],"sourcesContent":["import FormControlLabel, { type FormControlLabelProps } from '@mui/material/FormControlLabel';\nimport MuiSwitch, { type SwitchProps as MuiSwitchProps } from '@mui/material/Switch';\n\nexport type SwitchProps = {\n label: string;\n labelPlacement?: FormControlLabelProps['labelPlacement'];\n checked?: boolean;\n onChange?: MuiSwitchProps['onChange'];\n size?: MuiSwitchProps['size'];\n disabled?: boolean;\n testId?: string;\n};\n\nconst Switch = ({ label, checked, onChange, labelPlacement = 'start', size = 'medium', disabled = false, testId = undefined }: SwitchProps) => {\n return (\n <FormControlLabel\n label={label}\n labelPlacement={labelPlacement}\n control={<MuiSwitch checked={checked} onChange={onChange} color=\"primary\" size={size} disabled={disabled} data-fd={testId} />}\n />\n );\n};\n\nexport default Switch;\n"],"names":["Switch","label","checked","onChange","labelPlacement","size","disabled","testId","_jsx","FormControlLabel","control","MuiSwitch","color"],"mappings":"0HAaM,MAAAA,EAAS,EAAGC,QAAOC,UAASC,WAAUC,iBAAiB,QAASC,OAAO,SAAUC,YAAW,EAAOC,YAEjGC,EAACC,GACGR,MAAOA,EACPG,eAAgBA,EAChBM,QAASF,EAACG,EAAS,CAACT,QAASA,EAASC,SAAUA,EAAUS,MAAM,UAAUP,KAAMA,EAAMC,SAAUA,EAAQ,UAAWC"}
@@ -0,0 +1,2 @@
1
+ import{jsx as i}from"react/jsx-runtime";import t from"@mui/material/Tooltip";import m from"@mui/material/IconButton";import o from"@mui/icons-material/InfoOutlined";const r=["small","medium","large"],e=({text:r,iconSize:e="small"})=>i(t,{title:r,children:i(m,{children:i(o,{fontSize:e})})});export{r as ICON_SIZES,e as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Tooltip/index.tsx"],"sourcesContent":["import MuiTooltip from '@mui/material/Tooltip';\nimport IconButton from '@mui/material/IconButton';\nimport InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';\n\nexport const ICON_SIZES = ['small', 'medium', 'large'] as const;\nexport type IconSize = (typeof ICON_SIZES)[number];\n\nexport type TooltipProps = {\n text: string;\n iconSize?: IconSize;\n};\n\nconst Tooltip = ({ text, iconSize = 'small' }: TooltipProps) => (\n <MuiTooltip title={text}>\n <IconButton>\n <InfoOutlinedIcon fontSize={iconSize} />\n </IconButton>\n </MuiTooltip>\n);\n\nexport default Tooltip;\n"],"names":["ICON_SIZES","Tooltip","text","iconSize","_jsx","MuiTooltip","title","children","IconButton","InfoOutlinedIcon","fontSize"],"mappings":"qKAIa,MAAAA,EAAa,CAAC,QAAS,SAAU,SAQxCC,EAAU,EAAGC,OAAMC,WAAW,WAChCC,EAACC,EAAU,CAACC,MAAOJ,EAAIK,SACnBH,EAACI,YACGJ,EAACK,EAAiB,CAAAC,SAAUP"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMicroFrontendAttributes.js","sources":["../../src/custom-hooks/useMicroFrontendAttributes.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\ntype KeyType = 'string' | 'boolean' | 'number';\n\ninterface KeyConfig {\n key: string;\n type?: KeyType; // type is optional, defaults to 'string'\n}\n\nconst ALWAYS_RETURN_KEYS: (string | KeyConfig)[] = ['orgId', 'appId', { key: 'isFlipdishStaff', type: 'boolean' }] as const;\n\ntype AlwaysReturnKeys = (typeof ALWAYS_RETURN_KEYS)[number] extends KeyConfig\n ? (typeof ALWAYS_RETURN_KEYS)[number]['key']\n : (typeof ALWAYS_RETURN_KEYS)[number];\n\ntype ExtractKey<T> = T extends KeyConfig ? T['key'] : T;\n\ntype AttributeValue = string | boolean | number | null;\n\n// Utility functions moved outside\ntype KeyArg<T> = string | T | AlwaysReturnKeys;\nconst getKeyConfig = <T extends string | KeyConfig>(key: KeyArg<T>, allConfigs: (string | KeyConfig)[]) => {\n return allConfigs.find((config) => (typeof config === 'string' ? config === key : config.key === key));\n};\n\nconst getValueType = (keyConfig: KeyConfig | string | undefined): KeyType => {\n return keyConfig && typeof keyConfig !== 'string' && 'type' in keyConfig ? keyConfig.type : 'string';\n};\n\nconst parseValue = (value: string | null, type: KeyType): AttributeValue => {\n if (!value && type !== 'boolean') return null;\n if (type === 'boolean') return value === 'true';\n if (type === 'number') return Number(value);\n return value;\n};\n\nconst getAllKeys = <T extends string | KeyConfig>(customKeys: (T | KeyConfig)[]): (string | T | AlwaysReturnKeys)[] => {\n return [\n ...ALWAYS_RETURN_KEYS.map((key) => (typeof key === 'string' ? key : key.key)),\n ...customKeys.map((key) => (typeof key === 'string' ? key : key.key)),\n ];\n};\n\nconst getInitialState = <T extends string | KeyConfig>(customKeys: (T | KeyConfig)[]): Record<ExtractKey<AlwaysReturnKeys | T>, AttributeValue> => {\n const allKeys = getAllKeys(customKeys);\n const initialState = {} as Record<ExtractKey<AlwaysReturnKeys | T>, AttributeValue>;\n allKeys.forEach((key) => {\n const typedKey = (typeof key === 'string' ? key : key.key) as ExtractKey<AlwaysReturnKeys | T>;\n initialState[typedKey] = null;\n });\n return initialState;\n};\n\nconst processAttribute = <T extends string | KeyConfig>(\n key: string | T | AlwaysReturnKeys,\n microFrontendDiv: HTMLElement,\n allConfigs: (string | KeyConfig)[],\n): { value: AttributeValue; key: ExtractKey<AlwaysReturnKeys | T> } => {\n const keyConfig = getKeyConfig(key, allConfigs);\n const type = getValueType(keyConfig);\n const keyString = typeof key === 'string' ? key : key.key;\n\n const envVar = import.meta.env[`VITE_${keyString.toUpperCase()}_OVERRIDE`] as string | undefined | null;\n const attributeKey = `data-${keyString}`;\n const domValue = microFrontendDiv.getAttribute(attributeKey);\n\n const value = envVar ? parseValue(envVar.toString(), type) : parseValue(domValue, type);\n return { value, key: keyString as ExtractKey<AlwaysReturnKeys | T> };\n};\n\n/**\n * Custom hook to manage micro-frontend attributes.\n *\n * This hook initializes and updates a set of attributes based on a combination of predefined keys (ALWAYS_RETURN_KEYS)\n * and custom keys provided as arguments. The attributes are fetched from environment variables or DOM attributes\n * and are updated dynamically using a MutationObserver.\n *\n * @template T - The type of custom keys, which can be either a string or a KeyConfig object.\n *\n * @param {Array<T | KeyConfig>} [customKeys=[]] - An array of custom keys or KeyConfig objects to be included in the attributes.\n *\n * @returns {Record<ExtractKey<AlwaysReturnKeys | T>, string | boolean | number | null>} - A record of attributes with their values.\n *\n * @example\n * const attributes = useMicroFrontendAttributes(['customKey1', { key: 'customKey2', type: 'boolean' }]);\n * console.log(attributes);\n */\nconst useMicroFrontendAttributes = <T extends string | KeyConfig>(\n customKeys: (T | KeyConfig)[] = [],\n): Record<ExtractKey<AlwaysReturnKeys | T>, AttributeValue> => {\n const [attributes, setAttributes] = useState(() => getInitialState(customKeys));\n\n useEffect(() => {\n const microFrontendDiv = document.getElementById('flipdish-micro-frontend');\n if (!microFrontendDiv) {\n console.warn('Micro-frontend div not found');\n return;\n }\n\n const allKeys = getAllKeys(customKeys);\n const allConfigs = [...ALWAYS_RETURN_KEYS, ...customKeys];\n\n const updateValues = () => {\n setAttributes((prev) => {\n const newAttributes = { ...prev };\n let isChanged = false;\n\n allKeys.forEach((key) => {\n const { value, key: typedKey } = processAttribute(key, microFrontendDiv, allConfigs);\n if (newAttributes[typedKey] !== value) {\n newAttributes[typedKey] = value;\n isChanged = true;\n }\n });\n\n return isChanged ? newAttributes : prev;\n });\n };\n\n updateValues();\n\n const observer = new MutationObserver(updateValues);\n observer.observe(microFrontendDiv, { attributes: true });\n\n return () => observer.disconnect();\n }, [customKeys]);\n\n return attributes;\n};\n\nexport default useMicroFrontendAttributes;\n"],"names":["ALWAYS_RETURN_KEYS","key","type","parseValue","value","Number","getAllKeys","customKeys","map","useMicroFrontendAttributes","attributes","setAttributes","useState","allKeys","initialState","forEach","typedKey","getInitialState","useEffect","microFrontendDiv","document","getElementById","console","warn","allConfigs","updateValues","prev","newAttributes","isChanged","keyConfig","find","config","getKeyConfig","getValueType","keyString","envVar","env","toUpperCase","attributeKey","domValue","getAttribute","toString","processAttribute","observer","MutationObserver","observe","disconnect"],"mappings":"gDASA,MAAMA,EAA6C,CAAC,QAAS,QAAS,CAAEC,IAAK,kBAAmBC,KAAM,YAoBhGC,EAAa,CAACC,EAAsBF,IACjCE,GAAkB,YAATF,EACD,YAATA,EAAqC,SAAVE,EAClB,WAATF,EAA0BG,OAAOD,GAC9BA,EAHkC,KAMvCE,EAA4CC,GACvC,IACAP,EAAmBQ,KAAKP,GAAwB,iBAARA,EAAmBA,EAAMA,EAAIA,SACrEM,EAAWC,KAAKP,GAAwB,iBAARA,EAAmBA,EAAMA,EAAIA,OAgDlEQ,EAA6B,CAC/BF,EAAgC,MAEhC,MAAOG,EAAYC,GAAiBC,GAAS,IA/CzB,CAA+BL,IACnD,MAAMM,EAAUP,EAAWC,GACrBO,EAAe,CAAA,EAKrB,OAJAD,EAAQE,SAASd,IACb,MAAMe,EAA2B,iBAARf,EAAmBA,EAAMA,EAAIA,IACtDa,EAAaE,GAAY,IAAI,IAE1BF,CAAY,EAwCgCG,CAAgBV,KAqCnE,OAnCAW,GAAU,KACN,MAAMC,EAAmBC,SAASC,eAAe,2BACjD,IAAKF,EAED,YADAG,QAAQC,KAAK,gCAIjB,MAAMV,EAAUP,EAAWC,GACrBiB,EAAa,IAAIxB,KAAuBO,GAExCkB,EAAe,KACjBd,GAAee,IACX,MAAMC,EAAgB,IAAKD,GAC3B,IAAIE,GAAY,EAUhB,OARAf,EAAQE,SAASd,IACb,MAAMG,MAAEA,EAAOH,IAAKe,GAvDf,EACrBf,EACAkB,EACAK,KAEA,MAAMK,EArCW,EAA+B5B,EAAgBuB,IACzDA,EAAWM,MAAMC,GAA8B,iBAAXA,EAAsBA,IAAW9B,EAAM8B,EAAO9B,MAAQA,IAoC/E+B,CAAa/B,EAAKuB,GAC9BtB,EAlCW,CAAC2B,GACXA,GAAkC,iBAAdA,GAA0B,SAAUA,EAAYA,EAAU3B,KAAO,SAiC/E+B,CAAaJ,GACpBK,EAA2B,iBAARjC,EAAmBA,EAAMA,EAAIA,IAEhDkC,cAAqBC,IAAI,QAAQF,EAAUG,0BAC3CC,EAAe,QAAQJ,IACvBK,EAAWpB,EAAiBqB,aAAaF,GAG/C,MAAO,CAAElC,MADcD,EAATgC,EAAoBA,EAAOM,WAA+BF,EAAnBrC,GACrCD,IAAKiC,EAA+C,EAyCnBQ,CAAiBzC,EAAKkB,EAAkBK,GACrEG,EAAcX,KAAcZ,IAC5BuB,EAAcX,GAAYZ,EAC1BwB,GAAY,EACf,IAGEA,EAAYD,EAAgBD,CAAI,GACzC,EAGND,IAEA,MAAMkB,EAAW,IAAIC,iBAAiBnB,GAGtC,OAFAkB,EAASE,QAAQ1B,EAAkB,CAAET,YAAY,IAE1C,IAAMiC,EAASG,YAAY,GACnC,CAACvC,IAEGG,CAAU"}
@@ -0,0 +1,2 @@
1
+ import{jsx as r}from"react/jsx-runtime";import{useState as o,useEffect as t}from"react";import{useTranslation as e}from"../providers/TranslationProvider.js";const a=({fieldError:a,showError:s,touched:i,value:l})=>{const[n,c]=o(""),{translate:d}=e(),m=()=>!s&&i&&l?r("span",{style:{color:"#1dc798"},children:d("Valid")}):s?a:"";return t((()=>{c(m())}),[a,l,s,i]),n};export{a as default};
2
+ //# sourceMappingURL=useRenderValidText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRenderValidText.js","sources":["../../src/custom-hooks/useRenderValidText.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { useTranslation } from '../providers/TranslationProvider';\n\ntype ValidationState = {\n fieldError?: string;\n showError?: boolean;\n touched: boolean;\n value: string;\n};\n\ntype ValidationElement = JSX.Element | string | undefined;\n\n/**\n * @description Custom hook for rendering validation text in form fields\n * @description Handles different validation states with separate methods for better clarity\n */\nconst useRenderValidText = ({ fieldError, showError, touched, value }: ValidationState) => {\n const [validTextElement, setValidTextElement] = useState<ValidationElement>('');\n const { translate } = useTranslation();\n\n const renderValidState = (): ValidationElement => {\n return <span style={{ color: '#1dc798' }}>{translate('Valid')}</span>;\n };\n\n const renderErrorState = (): ValidationElement => {\n return fieldError;\n };\n\n const renderEmptyState = (): ValidationElement => {\n return '';\n };\n\n const determineValidationState = (): ValidationElement => {\n if (!showError && touched && value) {\n return renderValidState();\n }\n\n if (showError) {\n return renderErrorState();\n }\n\n return renderEmptyState();\n };\n\n useEffect(() => {\n setValidTextElement(determineValidationState());\n }, [fieldError, value, showError, touched]);\n\n return validTextElement;\n};\n\nexport default useRenderValidText;\n"],"names":["useRenderValidText","fieldError","showError","touched","value","validTextElement","setValidTextElement","useState","translate","useTranslation","determineValidationState","_jsx","style","color","children","useEffect"],"mappings":"6JAgBA,MAAMA,EAAqB,EAAGC,aAAYC,YAAWC,UAASC,YAC1D,MAAOC,EAAkBC,GAAuBC,EAA4B,KACtEC,UAAEA,GAAcC,IAchBC,EAA2B,KACxBR,GAAaC,GAAWC,EAZtBO,EAAM,OAAA,CAAAC,MAAO,CAAEC,MAAO,WAAWC,SAAGN,EAAU,WAgBjDN,EAZGD,EAIA,GAmBX,OAJAc,GAAU,KACNT,EAAoBI,IAA2B,GAChD,CAACT,EAAYG,EAAOF,EAAWC,IAE3BE,CAAgB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useToasts.js","sources":["../../src/custom-hooks/useToasts.tsx"],"sourcesContent":["import { useSnackbar, type SnackbarKey, type VariantType } from 'notistack';\n\n/**\n * Configuration options for toast notifications\n * @interface ToastOptions\n * @property {boolean} [persist] - If true, the toast will not auto-dismiss\n * @property {number} [durationMs] - Duration in milliseconds before the toast auto-dismisses\n */\nexport interface ToastOptions {\n /** If true, the toast will not auto-dismiss */\n persist?: boolean;\n /** Duration in milliseconds before the toast auto-dismisses */\n durationMs?: number;\n}\n\n/**\n * Type alias for toast notification keys\n * Used to uniquely identify toast notifications for dismissal\n */\nexport type ToastKey = SnackbarKey;\n\n/**\n * Interface defining the return value of the useToasts hook\n */\nexport interface UseToastsReturn {\n /** Dismisses all active toast notifications */\n dismissAllToasts: () => void;\n /** Dismisses a specific toast by its key */\n dismissToast: (key: string) => void;\n /** Shows a default toast notification */\n showDefaultToast: (message: string, options?: ToastOptions) => ToastKey;\n /** Shows a success toast notification */\n showSuccessToast: (message: string, options?: ToastOptions) => ToastKey;\n /** Shows an error toast notification */\n showErrorToast: (message: string, options?: ToastOptions) => ToastKey;\n}\n\n/**\n * Custom hook for managing toast notifications\n * Provides methods to show different types of toasts (default, success, error)\n * and dismiss them individually or all at once\n *\n * @example\n * ```tsx\n * const { showSuccessToast, showErrorToast, dismissAllToasts } = useToasts();\n *\n * // Show a success toast that auto-dismisses after 3 seconds\n * const toastKey = showSuccessToast('Operation successful', { durationMs: 3000 });\n *\n * // Show a persistent error toast\n * const errorToastKey = showErrorToast('Error occurred', { persist: true });\n *\n * // Later, dismiss a specific toast using its key\n * dismissToast(toastKey);\n *\n * // Or dismiss all toasts\n * dismissAllToasts();\n * ```\n */\nconst useToasts = (): UseToastsReturn => {\n const { enqueueSnackbar, closeSnackbar } = useSnackbar();\n\n /**\n * Dismisses all currently active toast notifications\n */\n const dismissAllToasts = () => {\n closeSnackbar();\n };\n\n /**\n * Dismisses a specific toast notification by its key\n * @param {string} key - Unique identifier of the toast to dismiss\n */\n const dismissToast = (key: string) => {\n closeSnackbar(key);\n };\n\n /**\n * Internal method to show a toast notification with specified variant and options\n * @param {string} message - The message to display in the toast\n * @param {VariantType} variant - The type of toast (default, success, error)\n * @param {ToastOptions} [options] - Configuration options for the toast\n * @returns {ToastKey} A unique key that can be used to dismiss this toast later\n */\n const showToast = (message: string, variant: VariantType, options: ToastOptions | undefined = undefined): ToastKey => {\n return enqueueSnackbar(message, {\n autoHideDuration: options?.durationMs,\n persist: options?.persist,\n variant,\n });\n };\n\n /**\n * Shows a default toast notification\n * @param {string} message - The message to display\n * @param {ToastOptions} [options] - Configuration options for the toast\n * @returns {ToastKey} A unique key that can be used to dismiss this toast later\n */\n const showDefaultToast = (message: string, options: ToastOptions | undefined = undefined): ToastKey => {\n return showToast(message, 'default', options);\n };\n\n /**\n * Shows a success toast notification\n * @param {string} message - The message to display\n * @param {ToastOptions} [options] - Configuration options for the toast\n * @returns {ToastKey} A unique key that can be used to dismiss this toast later\n */\n const showSuccessToast = (message: string, options: ToastOptions | undefined = undefined): ToastKey => {\n return showToast(message, 'success', options);\n };\n\n /**\n * Shows an error toast notification\n * @param {string} message - The message to display\n * @param {ToastOptions} [options] - Configuration options for the toast\n * @returns {ToastKey} A unique key that can be used to dismiss this toast later\n */\n const showErrorToast = (message: string, options: ToastOptions | undefined = undefined): ToastKey => {\n return showToast(message, 'error', options);\n };\n\n return { dismissAllToasts, dismissToast, showDefaultToast, showSuccessToast, showErrorToast };\n};\n\nexport default useToasts;\n"],"names":["useToasts","enqueueSnackbar","closeSnackbar","useSnackbar","showToast","message","variant","options","undefined","autoHideDuration","durationMs","persist","dismissAllToasts","dismissToast","key","showDefaultToast","showSuccessToast","showErrorToast"],"mappings":"wCA2DM,MAAAA,EAAY,KACd,MAAMC,gBAAEA,EAAeC,cAAEA,GAAkBC,IAwBrCC,EAAY,CAACC,EAAiBC,EAAsBC,OAAoCC,IACnFP,EAAgBI,EAAS,CAC5BI,iBAAkBF,GAASG,WAC3BC,QAASJ,GAASI,QAClBL,YAkCR,MAAO,CAAEM,iBAzDgB,KACrBV,GAAe,EAwDQW,aAjDLC,IAClBZ,EAAcY,EAAI,EAgDmBC,iBAxBhB,CAACV,EAAiBE,OAAoCC,IACpEJ,EAAUC,EAAS,UAAWE,GAuBkBS,iBAdlC,CAACX,EAAiBE,OAAoCC,IACpEJ,EAAUC,EAAS,UAAWE,GAaoCU,eAJtD,CAACZ,EAAiBE,OAAoCC,IAClEJ,EAAUC,EAAS,QAASE,GAGsD"}
@@ -0,0 +1,2 @@
1
+ var e={value:"Über"},a={value:"Über Seite"},i={value:"Klicken Sie auf die Vite- und React-Logos, um mehr zu erfahren"},t={value:"Nur Flipdish-Mitarbeiter"},l={value:"Zur Über-Seite"},u={value:"Zur Startseite"},r={value:"Zuhause"},o={value:"Seite Nicht Gefunden"},_={value:"Erforderlich"},n={value:"Etwas ist schief gelaufen. Bitte aktualisieren Sie die Seite."},v={value:"Gültig"},d={value:"Willkommen auf der Über-Seite"},s={value:"Willkommen im neuen Flipdish Portal"},h={About:e,About_Page:a,Click_vite_react:i,Flipdish_staff_only:t,Go_to_about_page:l,Go_to_home_page:u,Home:r,"Micro-Frontend_Example":{value:"Micro-Frontend Beispiel"},Page_Not_Found:o,Required:_,Something_went_wrong_please_refresh_the_page:n,Valid:v,Welcome_about_page:d,Welcome_to_new_portal:s};export{e as About,a as About_Page,i as Click_vite_react,t as Flipdish_staff_only,l as Go_to_about_page,u as Go_to_home_page,r as Home,o as Page_Not_Found,_ as Required,n as Something_went_wrong_please_refresh_the_page,v as Valid,d as Welcome_about_page,s as Welcome_to_new_portal,h as default};
2
+ //# sourceMappingURL=de.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"de.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var e={value:"AboutAbout"},o={value:"About PageAbout Page"},t={value:"Click on the Vite and React logos to learn moreClick on the Vite and React logos to learn more"},a={value:"Count is {count}Count is {count}"},l={value:"Flipdish staff onlyFlipdish staff only"},u={value:"Go to About PageGo to About Page"},n={value:"Go to home PageGo to home Page"},i={value:"HomeHome"},r={value:"Page Not FoundPage Not Found"},g={value:"RequiredRequired"},_={value:"Something went wrong, please refresh the pageSomething went wrong, please refresh the page"},h={value:"ValidValid"},d={value:"Welcome to the About PageWelcome to the About Page"},m={value:"Welcome to the new Flipdish PortalWelcome to the new Flipdish Portal"},s={About:e,About_Page:o,Click_vite_react:t,Count_is:a,Flipdish_staff_only:l,Go_to_about_page:u,Go_to_home_page:n,Home:i,"Micro-Frontend_Example":{value:"Micro-Frontend ExampleMicro-Frontend Example"},Page_Not_Found:r,Required:g,Something_went_wrong_please_refresh_the_page:_,Valid:h,Welcome_about_page:d,Welcome_to_new_portal:m};export{e as About,o as About_Page,t as Click_vite_react,a as Count_is,l as Flipdish_staff_only,u as Go_to_about_page,n as Go_to_home_page,i as Home,r as Page_Not_Found,g as Required,_ as Something_went_wrong_please_refresh_the_page,h as Valid,d as Welcome_about_page,m as Welcome_to_new_portal,s as default};
2
+ //# sourceMappingURL=dev-lang.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-lang.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var e={value:"About"},o={value:"About Page"},a={value:"Click on the Vite and React logos to learn more"},t={value:"Count is {count}"},l={value:"Flipdish staff only"},u={value:"Go to About Page"},_={value:"Go to Home Page"},n={value:"Home"},i={value:"Page Not Found"},r={value:"Required"},g={value:"Something went wrong, please refresh the page"},v={value:"Valid"},p={value:"Welcome to the About Page"},d={value:"Welcome to the new Flipdish Portal"},h={About:e,About_Page:o,Click_vite_react:a,Count_is:t,Flipdish_staff_only:l,Go_to_about_page:u,Go_to_home_page:_,Home:n,"Micro-Frontend_Example":{value:"Micro-Frontend Example"},Page_Not_Found:i,Required:r,Something_went_wrong_please_refresh_the_page:g,Valid:v,Welcome_about_page:p,Welcome_to_new_portal:d};export{e as About,o as About_Page,a as Click_vite_react,t as Count_is,l as Flipdish_staff_only,u as Go_to_about_page,_ as Go_to_home_page,n as Home,i as Page_Not_Found,r as Required,g as Something_went_wrong_please_refresh_the_page,v as Valid,p as Welcome_about_page,d as Welcome_to_new_portal,h as default};
2
+ //# sourceMappingURL=en-US.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en-US.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,63 @@
1
+ var About = {
2
+ value: "About"
3
+ };
4
+ var About_Page = {
5
+ value: "About Page"
6
+ };
7
+ var Click_vite_react = {
8
+ value: "Click on the Vite and React logos to learn more"
9
+ };
10
+ var Count_is = {
11
+ value: "Count is {count}"
12
+ };
13
+ var Flipdish_staff_only = {
14
+ value: "Flipdish staff only"
15
+ };
16
+ var Go_to_about_page = {
17
+ value: "Go to About Page"
18
+ };
19
+ var Go_to_home_page = {
20
+ value: "Go to home Page"
21
+ };
22
+ var Home = {
23
+ value: "Home"
24
+ };
25
+ var Page_Not_Found = {
26
+ value: "Page Not Found"
27
+ };
28
+ var Required = {
29
+ value: "Required"
30
+ };
31
+ var Something_went_wrong_please_refresh_the_page = {
32
+ value: "Something went wrong, please refresh the page"
33
+ };
34
+ var Valid = {
35
+ value: "Valid"
36
+ };
37
+ var Welcome_about_page = {
38
+ value: "Welcome to the About Page"
39
+ };
40
+ var Welcome_to_new_portal = {
41
+ value: "Welcome to the new Flipdish Portal"
42
+ };
43
+ var en = {
44
+ About: About,
45
+ About_Page: About_Page,
46
+ Click_vite_react: Click_vite_react,
47
+ Count_is: Count_is,
48
+ Flipdish_staff_only: Flipdish_staff_only,
49
+ Go_to_about_page: Go_to_about_page,
50
+ Go_to_home_page: Go_to_home_page,
51
+ Home: Home,
52
+ "Micro-Frontend_Example": {
53
+ value: "Micro-Frontend Example"
54
+ },
55
+ Page_Not_Found: Page_Not_Found,
56
+ Required: Required,
57
+ Something_went_wrong_please_refresh_the_page: Something_went_wrong_please_refresh_the_page,
58
+ Valid: Valid,
59
+ Welcome_about_page: Welcome_about_page,
60
+ Welcome_to_new_portal: Welcome_to_new_portal
61
+ };
62
+
63
+ export { About, About_Page, Click_vite_react, Count_is, Flipdish_staff_only, Go_to_about_page, Go_to_home_page, Home, Page_Not_Found, Required, Something_went_wrong_please_refresh_the_page, Valid, Welcome_about_page, Welcome_to_new_portal, en as default };
@@ -0,0 +1,2 @@
1
+ var e={value:"Acerca de"},a={value:"Página de Acerca de"},o={value:"Haz clic en los logos de Vite y React para aprender más"},l={value:"El recuento es {count}"},i={value:"Solo para el personal de Flipdish"},n={value:"Ir a la página de Acerca de"},r={value:"Ir a la página de Inicio"},u={value:"Inicio"},d={value:"Página No Encontrada"},t={value:"Requerido"},_={value:"Algo salió mal. Por favor, refresca la página."},c={value:"Válido"},v={value:"Bienvenido a la página de Acerca de"},p={value:"Bienvenido al nuevo Flipdish Portal"},g={About:e,About_Page:a,Click_vite_react:o,Count_is:l,Flipdish_staff_only:i,Go_to_about_page:n,Go_to_home_page:r,Home:u,"Micro-Frontend_Example":{value:"Ejemplo de Micro-Frontend"},Page_Not_Found:d,Required:t,Something_went_wrong_please_refresh_the_page:_,Valid:c,Welcome_about_page:v,Welcome_to_new_portal:p};export{e as About,a as About_Page,o as Click_vite_react,l as Count_is,i as Flipdish_staff_only,n as Go_to_about_page,r as Go_to_home_page,u as Home,d as Page_Not_Found,t as Required,_ as Something_went_wrong_please_refresh_the_page,c as Valid,v as Welcome_about_page,p as Welcome_to_new_portal,g as default};
2
+ //# sourceMappingURL=es-MX.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es-MX.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var e={value:"Acerca de"},a={value:"Página de Acerca de"},o={value:"Haz clic en los logos de Vite y React para aprender más"},l={value:"El recuento es {count}"},i={value:"Solo para el personal de Flipdish"},n={value:"Ir a la página de Acerca de"},r={value:"Ir a la página de Inicio"},u={value:"Inicio"},d={value:"Página No Encontrada"},t={value:"Requerido"},_={value:"Algo salió mal. Por favor, refresca la página."},c={value:"Válido"},v={value:"Bienvenido a la página de Acerca de"},p={value:"Bienvenido al nuevo Flipdish Portal"},g={About:e,About_Page:a,Click_vite_react:o,Count_is:l,Flipdish_staff_only:i,Go_to_about_page:n,Go_to_home_page:r,Home:u,"Micro-Frontend_Example":{value:"Ejemplo de Micro-Frontend"},Page_Not_Found:d,Required:t,Something_went_wrong_please_refresh_the_page:_,Valid:c,Welcome_about_page:v,Welcome_to_new_portal:p};export{e as About,a as About_Page,o as Click_vite_react,l as Count_is,i as Flipdish_staff_only,n as Go_to_about_page,r as Go_to_home_page,u as Home,d as Page_Not_Found,t as Required,_ as Something_went_wrong_please_refresh_the_page,c as Valid,v as Welcome_about_page,p as Welcome_to_new_portal,g as default};
2
+ //# sourceMappingURL=es.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var e={value:"À propos"},a={value:"Page À propos"},l={value:"Cliquez sur les logos Vite et React pour en savoir plus"},o={value:"Le compte est de {count}"},u={value:"Réservé au personnel Flipdish"},r={value:"Aller à la page À propos"},p={value:"Aller à la page d'accueil"},s={value:"Accueil"},t={value:"Page Non Trouvée"},_={value:"Requis"},i={value:"Quelque chose s'est mal passé, veuillez rafraîchir la page"},v={value:"Valide"},n={value:"Bienvenue sur la page À propos"},c={value:"Bienvenue sur le nouveau Flipdish Portal"},g={About:e,About_Page:a,Click_vite_react:l,Count_is:o,Flipdish_staff_only:u,Go_to_about_page:r,Go_to_home_page:p,Home:s,"Micro-Frontend_Example":{value:"Exemple de Micro-Frontend"},Page_Not_Found:t,Required:_,Something_went_wrong_please_refresh_the_page:i,Valid:v,Welcome_about_page:n,Welcome_to_new_portal:c};export{e as About,a as About_Page,l as Click_vite_react,o as Count_is,u as Flipdish_staff_only,r as Go_to_about_page,p as Go_to_home_page,s as Home,t as Page_Not_Found,_ as Required,i as Something_went_wrong_please_refresh_the_page,v as Valid,n as Welcome_about_page,c as Welcome_to_new_portal,g as default};
2
+ //# sourceMappingURL=fr.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fr.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var a={value:"Informazioni"},e={value:"Pagina Informazioni"},o={value:"Clicca sui loghi Vite e React per saperne di più"},l={value:"Il conteggio è {count}"},i={value:"Solo per il personale Flipdish"},n={value:"Vai alla pagina Informazioni"},t={value:"Vai alla Home"},u={value:"Home"},r={value:"Pagina Non Trovata"},_={value:"Richiesto"},v={value:"Qualcosa è andato storto, per favore aggiorna la pagina"},p={value:"Valido"},g={value:"Benvenuto nella pagina Informazioni"},s={value:"Benvenuto nel nuovo Flipdish Portal"},c={About:a,About_Page:e,Click_vite_react:o,Count_is:l,Flipdish_staff_only:i,Go_to_about_page:n,Go_to_home_page:t,Home:u,"Micro-Frontend_Example":{value:"Esempio di Micro-Frontend"},Page_Not_Found:r,Required:_,Something_went_wrong_please_refresh_the_page:v,Valid:p,Welcome_about_page:g,Welcome_to_new_portal:s};export{a as About,e as About_Page,o as Click_vite_react,l as Count_is,i as Flipdish_staff_only,n as Go_to_about_page,t as Go_to_home_page,u as Home,r as Page_Not_Found,_ as Required,v as Something_went_wrong_please_refresh_the_page,p as Valid,g as Welcome_about_page,s as Welcome_to_new_portal,c as default};
2
+ //# sourceMappingURL=it.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"it.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var e={value:"Over"},a={value:"Over Pagina"},l={value:"Klik op de Vite- en React-logo's om meer te leren"},o={value:"Het aantal is {count}"},t={value:"Alleen Flipdish-medewerkers"},i={value:"Ga naar de Over-pagina"},r={value:"Ga naar de Startpagina"},n={value:"Thuis"},u={value:"Pagina Niet Gevonden"},_={value:"Vereist"},v={value:"Er is iets misgegaan, ververs de pagina alstublieft"},d={value:"Geldig"},g={value:"Welkom op de Over-pagina"},s={value:"Welkom bij het nieuwe Flipdish Portal"},p={About:e,About_Page:a,Click_vite_react:l,Count_is:o,Flipdish_staff_only:t,Go_to_about_page:i,Go_to_home_page:r,Home:n,"Micro-Frontend_Example":{value:"Micro-Frontend Voorbeeld"},Page_Not_Found:u,Required:_,Something_went_wrong_please_refresh_the_page:v,Valid:d,Welcome_about_page:g,Welcome_to_new_portal:s};export{e as About,a as About_Page,l as Click_vite_react,o as Count_is,t as Flipdish_staff_only,i as Go_to_about_page,r as Go_to_home_page,n as Home,u as Page_Not_Found,_ as Required,v as Something_went_wrong_please_refresh_the_page,d as Valid,g as Welcome_about_page,s as Welcome_to_new_portal,p as default};
2
+ //# sourceMappingURL=nl.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nl.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var a={value:"Sobre"},e={value:"Página Sobre"},o={value:"Clique nos logos do Vite e React para saber mais"},l={value:"O contador é {count}"},i={value:"Apenas funcionários da Flipdish"},r={value:"Ir para a página Sobre"},n={value:"Ir para a página Inicial"},t={value:"Início"},u={value:"Página Não Encontrada"},_={value:"Obrigatório"},p={value:"Algo deu errado, por favor atualize a página"},v={value:"Válido"},d={value:"Bem-vindo à página Sobre"},g={value:"Bem-vindo ao novo Flipdish Portal"},s={About:a,About_Page:e,Click_vite_react:o,Count_is:l,Flipdish_staff_only:i,Go_to_about_page:r,Go_to_home_page:n,Home:t,"Micro-Frontend_Example":{value:"Exemplo de Micro-Frontend"},Page_Not_Found:u,Required:_,Something_went_wrong_please_refresh_the_page:p,Valid:v,Welcome_about_page:d,Welcome_to_new_portal:g};export{a as About,e as About_Page,o as Click_vite_react,l as Count_is,i as Flipdish_staff_only,r as Go_to_about_page,n as Go_to_home_page,t as Home,u as Page_Not_Found,_ as Required,p as Something_went_wrong_please_refresh_the_page,v as Valid,d as Welcome_about_page,g as Welcome_to_new_portal,s as default};
2
+ //# sourceMappingURL=pt.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pt.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateTimeLocalizationProvider.js","sources":["../../src/providers/DateTimeLocalizationProvider.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\nimport { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';\nimport { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';\n\nconst DateTimeLocalizationProvider = ({ children }: { children: ReactNode }) => {\n return <LocalizationProvider dateAdapter={AdapterMoment}>{children}</LocalizationProvider>;\n};\n\nexport default DateTimeLocalizationProvider;\n"],"names":["DateTimeLocalizationProvider","children","_jsx","LocalizationProvider","dateAdapter","AdapterMoment"],"mappings":"wMAIA,MAAMA,EAA+B,EAAGC,cAC7BC,EAACC,EAAqB,CAAAC,YAAaC,EAAaJ,SAAGA"}
@@ -0,0 +1,25 @@
1
+ import en from '../localization/en.json.js';
2
+
3
+ type TranslationId = keyof typeof en;
4
+ type Translation = {
5
+ value: string;
6
+ };
7
+ interface TranslationBase {
8
+ translations: Record<string, Translation>;
9
+ }
10
+ type TranslationProp = {
11
+ children: JSX.Element;
12
+ } & TranslationBase;
13
+ declare const TranslationProvider: ({ children, translations }: TranslationProp) => JSX.Element;
14
+ declare const useTranslation: () => {
15
+ translate: (key: TranslationId, data?: Record<string, string | number>) => string;
16
+ translations: Record<string, Translation>;
17
+ };
18
+ declare const useLoadTranslations: () => {
19
+ translations: Record<string, {
20
+ value: string;
21
+ }>;
22
+ loading: boolean;
23
+ };
24
+
25
+ export { type TranslationId, TranslationProvider, useLoadTranslations, useTranslation };
@@ -1,2 +1,2 @@
1
- import"react/jsx-runtime";import{createContext as t,useContext as r,useCallback as e}from"react";import a from"../localization/en.json.js";const n=t({}),o=()=>{const{translations:t}=r(n);return{translate:e(((r,e)=>{let n=t?.[r]?.value||a[r]?.value||r;return e&&n&&Object.keys(e)?.forEach((t=>{n=n.replace(new RegExp(`{${t}}`,"g"),`${e[t]}`)})),n}),[t]),translations:t}};export{o as useTranslation};
1
+ import{jsx as n}from"react/jsx-runtime";import{createContext as o,useMemo as t,useContext as a,useCallback as i,useState as e,useEffect as r}from"react";import l from"../localization/en.json.js";import{getMicroFrontendAttribute as s}from"../utilities/renderUtilities.js";const c=o({}),j=({children:o,translations:a})=>{const i=t((()=>({translations:a})),[a]);return n(c.Provider,{value:i,children:o})},u=()=>{const{translations:n}=a(c);return{translate:i(((o,t)=>{let a=n?.[o]?.value||l[o]?.value||o;return t&&a&&Object.keys(t)?.forEach((n=>{a=a.replace(new RegExp(`{${n}}`,"g"),`${t[n]}`)})),a}),[n]),translations:n}},d=["nl","en-US","de","fr","it","es","pt","es-MX","dev-lang"],m=()=>{const[n,o]=e({loading:!0,translations:{}}),t=s("data-language")||"";return r((()=>{(async()=>{d.includes(t)?function(n){switch(n){case"../../../../localization/de.json":return import("../localization/de.json.js");case"../../../../localization/dev-lang.json":return import("../localization/dev-lang.json.js");case"../../../../localization/en-US.json":return import("../localization/en-US.json.js");case"../../../../localization/en.json":return import("../localization/en.json.js");case"../../../../localization/es-MX.json":return import("../localization/es-MX.json.js");case"../../../../localization/es.json":return import("../localization/es.json.js");case"../../../../localization/fr.json":return import("../localization/fr.json.js");case"../../../../localization/it.json":return import("../localization/it.json.js");case"../../../../localization/nl.json":return import("../localization/nl.json.js");case"../../../../localization/pt.json":return import("../localization/pt.json.js");default:return new Promise((function(o,t){("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(t.bind(null,new Error("Unknown variable dynamic import: "+n)))}))}}(`../../../../localization/${t}.json`).then((n=>n.default)).then((n=>{o({loading:!1,translations:n})})).catch((n=>{o({loading:!1}),window.fdlogger?.error(`Error while fetching ${t||"en"} language JSON data: ${n.message}`)})):o({loading:!1})})()}),[t]),{translations:n.translations||{},loading:n.loading}};export{j as TranslationProvider,m as useLoadTranslations,u as useTranslation};
2
2
  //# sourceMappingURL=TranslationProvider.js.map