@flipdish/portal-library 1.0.78 → 2.0.1

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 (387) hide show
  1. package/dist/components/{ui/Chip/Chip.cjs.js → Chip/index.cjs.js} +2 -2
  2. package/dist/components/{ui/Chip/Chip.js.map → Chip/index.cjs.js.map} +1 -1
  3. package/dist/components/Chip/index.js +2 -0
  4. package/dist/components/Chip/index.js.map +1 -0
  5. package/dist/components/FDErrorBoundary/index.cjs.js +2 -0
  6. package/dist/components/FDErrorBoundary/index.cjs.js.map +1 -0
  7. package/dist/components/FDErrorBoundary/index.d.ts +9 -0
  8. package/dist/components/FDErrorBoundary/index.js +2 -0
  9. package/dist/components/FDErrorBoundary/index.js.map +1 -0
  10. package/dist/components/FlipdishLogoLoader/index.cjs.js +2 -0
  11. package/dist/components/FlipdishLogoLoader/index.cjs.js.map +1 -0
  12. package/dist/components/FlipdishLogoLoader/index.js +2 -0
  13. package/dist/components/FlipdishLogoLoader/index.js.map +1 -0
  14. package/dist/components/FlipdishStaffContainer/index.cjs.js +2 -0
  15. package/dist/components/FlipdishStaffContainer/index.cjs.js.map +1 -0
  16. package/dist/components/FlipdishStaffContainer/index.js +2 -0
  17. package/dist/components/FlipdishStaffContainer/index.js.map +1 -0
  18. package/dist/components/{ui/Form/FormItemLayout.cjs.js → Form/FormItemLayout/index.cjs.js} +1 -1
  19. package/dist/components/Form/FormItemLayout/index.cjs.js.map +1 -0
  20. package/dist/components/Form/FormItemLayout/index.d.ts +16 -0
  21. package/dist/components/{ui/Form/FormItemLayout.js → Form/FormItemLayout/index.js} +1 -1
  22. package/dist/components/Form/FormItemLayout/index.js.map +1 -0
  23. package/dist/components/Form/GenericAutocompleteField/index.cjs.js +2 -0
  24. package/dist/components/Form/GenericAutocompleteField/index.cjs.js.map +1 -0
  25. package/dist/components/Form/GenericAutocompleteField/index.js +2 -0
  26. package/dist/components/Form/GenericAutocompleteField/index.js.map +1 -0
  27. package/dist/components/{ui/Form/GenericFormContainer.cjs.js → Form/GenericFormContainer/index.cjs.js} +1 -1
  28. package/dist/components/Form/GenericFormContainer/index.cjs.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.cjs.js +2 -0
  32. package/dist/components/{ui/Form/GenericTextField.js.map → Form/GenericTextField/index.cjs.js.map} +1 -1
  33. package/dist/components/Form/GenericTextField/index.js +2 -0
  34. package/dist/components/Form/GenericTextField/index.js.map +1 -0
  35. package/dist/components/Form/PaginatedAutocompleteField/index.cjs.js +2 -0
  36. package/dist/components/Form/PaginatedAutocompleteField/index.cjs.js.map +1 -0
  37. package/dist/components/{ui/Form/PaginatedAutocompleteField.d.ts → Form/PaginatedAutocompleteField/index.d.ts} +1 -1
  38. package/dist/components/Form/PaginatedAutocompleteField/index.js +2 -0
  39. package/dist/components/Form/PaginatedAutocompleteField/index.js.map +1 -0
  40. package/dist/components/GenericDatePickerField/GenericDateFieldBase.cjs.js +2 -0
  41. package/dist/components/GenericDatePickerField/GenericDateFieldBase.cjs.js.map +1 -0
  42. package/dist/components/{ui/GenericDatePickerField → GenericDatePickerField}/GenericDateFieldBase.d.ts +3 -1
  43. package/dist/components/GenericDatePickerField/GenericDateFieldBase.js +2 -0
  44. package/dist/components/GenericDatePickerField/GenericDateFieldBase.js.map +1 -0
  45. package/dist/components/{ui/GenericDatePickerField/GenericDatePickerField.cjs.js → GenericDatePickerField/index.cjs.js} +1 -1
  46. package/dist/components/GenericDatePickerField/index.cjs.js.map +1 -0
  47. package/dist/components/{ui/GenericDatePickerField/GenericDatePickerField.js → GenericDatePickerField/index.js} +1 -1
  48. package/dist/components/GenericDatePickerField/index.js.map +1 -0
  49. package/dist/components/{ui/GenericDateTimePickerField/GenericDateTimePickerField.cjs.js → GenericDateTimePickerField/index.cjs.js} +1 -1
  50. package/dist/components/GenericDateTimePickerField/index.cjs.js.map +1 -0
  51. package/dist/components/{ui/GenericDateTimePickerField/GenericDateTimePickerField.js → GenericDateTimePickerField/index.js} +1 -1
  52. package/dist/components/GenericDateTimePickerField/index.js.map +1 -0
  53. package/dist/components/GenericRadioButtons/index.cjs.js +2 -0
  54. package/dist/components/GenericRadioButtons/index.cjs.js.map +1 -0
  55. package/dist/components/GenericRadioButtons/index.js +2 -0
  56. package/dist/components/GenericRadioButtons/index.js.map +1 -0
  57. package/dist/components/GenericTable/HighlightScrollbar.cjs.js.map +1 -0
  58. package/dist/components/GenericTable/HighlightScrollbar.d.ts +11 -0
  59. package/dist/components/GenericTable/HighlightScrollbar.js.map +1 -0
  60. package/dist/components/{ui/GenericTable/GenericTable.cjs.js → GenericTable/index.cjs.js} +4 -4
  61. package/dist/components/GenericTable/index.cjs.js.map +1 -0
  62. package/dist/components/{ui/GenericTable/GenericTable.d.ts → GenericTable/index.d.ts} +1 -1
  63. package/dist/components/{ui/GenericTable/GenericTable.js → GenericTable/index.js} +3 -3
  64. package/dist/components/GenericTable/index.js.map +1 -0
  65. package/dist/components/GenericTableBody/index.cjs.js +2 -0
  66. package/dist/components/GenericTableBody/index.cjs.js.map +1 -0
  67. package/dist/components/GenericTableBody/index.d.ts +37 -0
  68. package/dist/components/GenericTableBody/index.js +2 -0
  69. package/dist/components/GenericTableBody/index.js.map +1 -0
  70. package/dist/components/{ui/GenericTableBodyRow/GenericTableBodyRow.cjs.js → GenericTableBodyRow/index.cjs.js} +1 -1
  71. package/dist/components/GenericTableBodyRow/index.cjs.js.map +1 -0
  72. package/dist/components/{ui/GenericTableBodyRow/GenericTableBodyRow.js → GenericTableBodyRow/index.js} +1 -1
  73. package/dist/components/GenericTableBodyRow/index.js.map +1 -0
  74. package/dist/components/{ui/GenericTableTitle/GenericTableTitle.cjs.js → GenericTableTitle/index.cjs.js} +1 -1
  75. package/dist/components/GenericTableTitle/index.cjs.js.map +1 -0
  76. package/dist/components/{ui/GenericTableTitle/GenericTableTitle.js → GenericTableTitle/index.js} +1 -1
  77. package/dist/components/GenericTableTitle/index.js.map +1 -0
  78. package/dist/components/{ui/LazyComponent/LazyComponent.cjs.js → LazyComponent/index.cjs.js} +1 -1
  79. package/dist/components/LazyComponent/index.cjs.js.map +1 -0
  80. package/dist/components/{ui/LazyComponent/LazyComponent.js → LazyComponent/index.js} +1 -1
  81. package/dist/components/LazyComponent/index.js.map +1 -0
  82. package/dist/components/{ui/ListItemLink/ListItemLink.cjs.js → ListItemLink/index.cjs.js} +1 -1
  83. package/dist/components/ListItemLink/index.cjs.js.map +1 -0
  84. package/dist/components/{ui/ListItemLink/ListItemLink.js → ListItemLink/index.js} +1 -1
  85. package/dist/components/ListItemLink/index.js.map +1 -0
  86. package/dist/components/ListItemLinkButton/index.cjs.js +2 -0
  87. package/dist/components/ListItemLinkButton/index.cjs.js.map +1 -0
  88. package/dist/components/ListItemLinkButton/index.js +2 -0
  89. package/dist/components/ListItemLinkButton/index.js.map +1 -0
  90. package/dist/components/{ui/NoResults/NoResults.cjs.js → NoResults/index.cjs.js} +1 -1
  91. package/dist/components/NoResults/index.cjs.js.map +1 -0
  92. package/dist/components/{ui/NoResults/NoResults.js → NoResults/index.js} +1 -1
  93. package/dist/components/NoResults/index.js.map +1 -0
  94. package/dist/components/NotFoundPage/index.cjs.js +2 -0
  95. package/dist/components/NotFoundPage/index.cjs.js.map +1 -0
  96. package/dist/components/NotFoundPage/index.js +2 -0
  97. package/dist/components/NotFoundPage/index.js.map +1 -0
  98. package/dist/components/PageLayout/DocumentTitle.cjs.js +2 -0
  99. package/dist/components/PageLayout/DocumentTitle.cjs.js.map +1 -0
  100. package/dist/components/PageLayout/DocumentTitle.d.ts +6 -0
  101. package/dist/components/PageLayout/DocumentTitle.js +2 -0
  102. package/dist/components/PageLayout/DocumentTitle.js.map +1 -0
  103. package/dist/components/PageLayout/FullWidthContainer.cjs.js.map +1 -0
  104. package/dist/components/PageLayout/FullWidthContainer.d.ts +13 -0
  105. package/dist/components/PageLayout/FullWidthContainer.js.map +1 -0
  106. package/dist/components/PageLayout/GlobalSpacingStyles.cjs.js +2 -0
  107. package/dist/components/PageLayout/GlobalSpacingStyles.cjs.js.map +1 -0
  108. package/dist/components/PageLayout/GlobalSpacingStyles.d.ts +5 -0
  109. package/dist/components/PageLayout/GlobalSpacingStyles.js +2 -0
  110. package/dist/components/PageLayout/GlobalSpacingStyles.js.map +1 -0
  111. package/dist/components/PageLayout/index.cjs.js +2 -0
  112. package/dist/components/PageLayout/index.cjs.js.map +1 -0
  113. package/dist/components/{ui/PageLayout/PageLayout.d.ts → PageLayout/index.d.ts} +9 -1
  114. package/dist/components/PageLayout/index.js +2 -0
  115. package/dist/components/PageLayout/index.js.map +1 -0
  116. package/dist/components/{ui/PortalMock/PortalMock.cjs.js → PortalMock/index.cjs.js} +1 -1
  117. package/dist/components/PortalMock/index.cjs.js.map +1 -0
  118. package/dist/components/{ui/PortalMock/PortalMock.js → PortalMock/index.js} +1 -1
  119. package/dist/components/PortalMock/index.js.map +1 -0
  120. package/dist/components/{ui/Spacer/Spacer.cjs.js → Spacer/index.cjs.js} +1 -1
  121. package/dist/components/Spacer/index.cjs.js.map +1 -0
  122. package/dist/components/{ui/Spacer/Spacer.js → Spacer/index.js} +1 -1
  123. package/dist/components/Spacer/index.js.map +1 -0
  124. package/dist/components/{ui/Switch/Switch.cjs.js → Switch/index.cjs.js} +1 -1
  125. package/dist/components/Switch/index.cjs.js.map +1 -0
  126. package/dist/components/{ui/Switch/Switch.js → Switch/index.js} +1 -1
  127. package/dist/components/Switch/index.js.map +1 -0
  128. package/dist/components/Tooltip/index.cjs.js +2 -0
  129. package/dist/components/Tooltip/index.cjs.js.map +1 -0
  130. package/dist/components/Tooltip/index.js +2 -0
  131. package/dist/components/Tooltip/index.js.map +1 -0
  132. package/dist/custom-hooks/useMicroFrontendAttributes.cjs.js.map +1 -0
  133. package/dist/custom-hooks/useMicroFrontendAttributes.js.map +1 -0
  134. package/dist/custom-hooks/useRenderValidText.cjs.js +2 -0
  135. package/dist/custom-hooks/useRenderValidText.cjs.js.map +1 -0
  136. package/dist/custom-hooks/useRenderValidText.js +2 -0
  137. package/dist/custom-hooks/useRenderValidText.js.map +1 -0
  138. package/dist/custom-hooks/useToasts.cjs.js.map +1 -0
  139. package/dist/custom-hooks/useToasts.js.map +1 -0
  140. package/dist/icons/AccessTimeIcon.cjs.js +2 -0
  141. package/dist/icons/AccessTimeIcon.cjs.js.map +1 -0
  142. package/dist/icons/AccessTimeIcon.d.ts +2 -0
  143. package/dist/icons/AccessTimeIcon.js +2 -0
  144. package/dist/icons/AccessTimeIcon.js.map +1 -0
  145. package/dist/icons/CalenderTodayIcon.cjs.js +2 -0
  146. package/dist/icons/CalenderTodayIcon.cjs.js.map +1 -0
  147. package/dist/icons/CalenderTodayIcon.d.ts +2 -0
  148. package/dist/icons/CalenderTodayIcon.js +2 -0
  149. package/dist/icons/CalenderTodayIcon.js.map +1 -0
  150. package/dist/icons/DoneIcon.cjs.js +2 -0
  151. package/dist/icons/DoneIcon.cjs.js.map +1 -0
  152. package/dist/icons/DoneIcon.d.ts +2 -0
  153. package/dist/icons/DoneIcon.js +2 -0
  154. package/dist/icons/DoneIcon.js.map +1 -0
  155. package/dist/icons/SearchIcon.cjs.js +2 -0
  156. package/dist/icons/SearchIcon.cjs.js.map +1 -0
  157. package/dist/icons/SearchIcon.d.ts +2 -0
  158. package/dist/icons/SearchIcon.js +2 -0
  159. package/dist/icons/SearchIcon.js.map +1 -0
  160. package/dist/icons/logo/Deliveroo.cjs.js +2 -0
  161. package/dist/icons/logo/Deliveroo.cjs.js.map +1 -0
  162. package/dist/icons/logo/Deliveroo.d.ts +8 -0
  163. package/dist/icons/logo/Deliveroo.js +2 -0
  164. package/dist/icons/logo/Deliveroo.js.map +1 -0
  165. package/dist/localization/de.json.cjs.js +2 -0
  166. package/dist/localization/de.json.cjs.js.map +1 -0
  167. package/dist/localization/de.json.js +2 -0
  168. package/dist/localization/de.json.js.map +1 -0
  169. package/dist/localization/dev-lang.json.cjs.js +2 -0
  170. package/dist/localization/dev-lang.json.cjs.js.map +1 -0
  171. package/dist/localization/dev-lang.json.js +2 -0
  172. package/dist/localization/dev-lang.json.js.map +1 -0
  173. package/dist/localization/en-US.json.cjs.js +2 -0
  174. package/dist/localization/en-US.json.cjs.js.map +1 -0
  175. package/dist/localization/en-US.json.js +2 -0
  176. package/dist/localization/en-US.json.js.map +1 -0
  177. package/dist/localization/en.json.d.ts +63 -0
  178. package/dist/localization/es-MX.json.cjs.js +2 -0
  179. package/dist/localization/es-MX.json.cjs.js.map +1 -0
  180. package/dist/localization/es-MX.json.js +2 -0
  181. package/dist/localization/es-MX.json.js.map +1 -0
  182. package/dist/localization/es.json.cjs.js +2 -0
  183. package/dist/localization/es.json.cjs.js.map +1 -0
  184. package/dist/localization/es.json.js +2 -0
  185. package/dist/localization/es.json.js.map +1 -0
  186. package/dist/localization/fr.json.cjs.js +2 -0
  187. package/dist/localization/fr.json.cjs.js.map +1 -0
  188. package/dist/localization/fr.json.js +2 -0
  189. package/dist/localization/fr.json.js.map +1 -0
  190. package/dist/localization/it.json.cjs.js +2 -0
  191. package/dist/localization/it.json.cjs.js.map +1 -0
  192. package/dist/localization/it.json.js +2 -0
  193. package/dist/localization/it.json.js.map +1 -0
  194. package/dist/localization/nl.json.cjs.js +2 -0
  195. package/dist/localization/nl.json.cjs.js.map +1 -0
  196. package/dist/localization/nl.json.js +2 -0
  197. package/dist/localization/nl.json.js.map +1 -0
  198. package/dist/localization/pt.json.cjs.js +2 -0
  199. package/dist/localization/pt.json.cjs.js.map +1 -0
  200. package/dist/localization/pt.json.js +2 -0
  201. package/dist/localization/pt.json.js.map +1 -0
  202. package/dist/providers/DateTimeLocalizationProvider.cjs.js.map +1 -0
  203. package/dist/providers/DateTimeLocalizationProvider.js.map +1 -0
  204. package/dist/providers/TranslationProvider.cjs.js +1 -1
  205. package/dist/providers/TranslationProvider.cjs.js.map +1 -1
  206. package/dist/providers/TranslationProvider.d.ts +25 -0
  207. package/dist/providers/TranslationProvider.js +1 -1
  208. package/dist/providers/TranslationProvider.js.map +1 -1
  209. package/dist/stories/utilities/MockPageContent.cjs.js +2 -0
  210. package/dist/stories/utilities/MockPageContent.cjs.js.map +1 -0
  211. package/dist/stories/utilities/MockPageContent.d.ts +5 -0
  212. package/dist/stories/utilities/MockPageContent.js +2 -0
  213. package/dist/stories/utilities/MockPageContent.js.map +1 -0
  214. package/dist/themes/flipdishPublicTheme.cjs.js +2 -0
  215. package/dist/themes/flipdishPublicTheme.cjs.js.map +1 -0
  216. package/dist/themes/flipdishPublicTheme.d.ts +5 -0
  217. package/dist/themes/flipdishPublicTheme.js +2 -0
  218. package/dist/themes/flipdishPublicTheme.js.map +1 -0
  219. package/dist/utilities/formValidation.cjs.js.map +1 -0
  220. package/dist/utilities/formValidation.d.ts +6 -0
  221. package/dist/utilities/formValidation.js.map +1 -0
  222. package/dist/{components/genericUtilities/index.cjs.js → utilities/genericUtilities.cjs.js} +1 -1
  223. package/dist/utilities/genericUtilities.cjs.js.map +1 -0
  224. package/dist/{components/genericUtilities/index.js → utilities/genericUtilities.js} +1 -1
  225. package/dist/utilities/genericUtilities.js.map +1 -0
  226. package/dist/utilities/renderUtilities.cjs.js +2 -0
  227. package/dist/utilities/renderUtilities.cjs.js.map +1 -0
  228. package/dist/{components/renderUtilities → utilities}/renderUtilities.d.ts +4 -4
  229. package/dist/utilities/renderUtilities.js +2 -0
  230. package/dist/utilities/renderUtilities.js.map +1 -0
  231. package/dist/utilities/validation.d.ts +3 -0
  232. package/package.json +35 -1
  233. package/dist/components/custom-hooks/useMicroFrontendAttributes.cjs.js.map +0 -1
  234. package/dist/components/custom-hooks/useMicroFrontendAttributes.js.map +0 -1
  235. package/dist/components/custom-hooks/useRenderValidText.cjs.js +0 -2
  236. package/dist/components/custom-hooks/useRenderValidText.cjs.js.map +0 -1
  237. package/dist/components/custom-hooks/useRenderValidText.js +0 -2
  238. package/dist/components/custom-hooks/useRenderValidText.js.map +0 -1
  239. package/dist/components/custom-hooks/useToasts.cjs.js.map +0 -1
  240. package/dist/components/custom-hooks/useToasts.js.map +0 -1
  241. package/dist/components/genericUtilities/index.cjs.js.map +0 -1
  242. package/dist/components/genericUtilities/index.js.map +0 -1
  243. package/dist/components/index.cjs.js +0 -2
  244. package/dist/components/index.cjs.js.map +0 -1
  245. package/dist/components/index.d.ts +0 -38
  246. package/dist/components/index.js +0 -2
  247. package/dist/components/index.js.map +0 -1
  248. package/dist/components/renderUtilities/renderUtilities.cjs.js +0 -2
  249. package/dist/components/renderUtilities/renderUtilities.cjs.js.map +0 -1
  250. package/dist/components/renderUtilities/renderUtilities.js +0 -2
  251. package/dist/components/renderUtilities/renderUtilities.js.map +0 -1
  252. package/dist/components/themes/flipdishPublicTheme.cjs.js +0 -2
  253. package/dist/components/themes/flipdishPublicTheme.cjs.js.map +0 -1
  254. package/dist/components/themes/flipdishPublicTheme.d.ts +0 -28
  255. package/dist/components/themes/flipdishPublicTheme.js +0 -2
  256. package/dist/components/themes/flipdishPublicTheme.js.map +0 -1
  257. package/dist/components/ui/Chip/Chip.cjs.js.map +0 -1
  258. package/dist/components/ui/Chip/Chip.js +0 -2
  259. package/dist/components/ui/DateTimeLocalizationProvider/DateTimeLocalizationProvider.cjs.js.map +0 -1
  260. package/dist/components/ui/DateTimeLocalizationProvider/DateTimeLocalizationProvider.js.map +0 -1
  261. package/dist/components/ui/FDErrorBoundary/FDErrorBoundary.cjs.js +0 -2
  262. package/dist/components/ui/FDErrorBoundary/FDErrorBoundary.cjs.js.map +0 -1
  263. package/dist/components/ui/FDErrorBoundary/FDErrorBoundary.js +0 -2
  264. package/dist/components/ui/FDErrorBoundary/FDErrorBoundary.js.map +0 -1
  265. package/dist/components/ui/FlipdishLogoLoader/FlipdishLogoLoader.cjs.js +0 -2
  266. package/dist/components/ui/FlipdishLogoLoader/FlipdishLogoLoader.cjs.js.map +0 -1
  267. package/dist/components/ui/FlipdishLogoLoader/FlipdishLogoLoader.js +0 -2
  268. package/dist/components/ui/FlipdishLogoLoader/FlipdishLogoLoader.js.map +0 -1
  269. package/dist/components/ui/FlipdishStaffContainer/FlipdishStaffContainer.cjs.js +0 -2
  270. package/dist/components/ui/FlipdishStaffContainer/FlipdishStaffContainer.cjs.js.map +0 -1
  271. package/dist/components/ui/FlipdishStaffContainer/FlipdishStaffContainer.js +0 -2
  272. package/dist/components/ui/FlipdishStaffContainer/FlipdishStaffContainer.js.map +0 -1
  273. package/dist/components/ui/Form/FormItemLayout.cjs.js.map +0 -1
  274. package/dist/components/ui/Form/FormItemLayout.js.map +0 -1
  275. package/dist/components/ui/Form/GenericAutocompleteField.cjs.js +0 -2
  276. package/dist/components/ui/Form/GenericAutocompleteField.cjs.js.map +0 -1
  277. package/dist/components/ui/Form/GenericAutocompleteField.js +0 -2
  278. package/dist/components/ui/Form/GenericAutocompleteField.js.map +0 -1
  279. package/dist/components/ui/Form/GenericFormContainer.cjs.js.map +0 -1
  280. package/dist/components/ui/Form/GenericFormContainer.js.map +0 -1
  281. package/dist/components/ui/Form/GenericTextField.cjs.js +0 -2
  282. package/dist/components/ui/Form/GenericTextField.cjs.js.map +0 -1
  283. package/dist/components/ui/Form/GenericTextField.js +0 -2
  284. package/dist/components/ui/Form/PaginatedAutocompleteField.cjs.js +0 -2
  285. package/dist/components/ui/Form/PaginatedAutocompleteField.cjs.js.map +0 -1
  286. package/dist/components/ui/Form/PaginatedAutocompleteField.js +0 -2
  287. package/dist/components/ui/Form/PaginatedAutocompleteField.js.map +0 -1
  288. package/dist/components/ui/Form/utilities/formValidation.cjs.js.map +0 -1
  289. package/dist/components/ui/Form/utilities/formValidation.d.ts +0 -6
  290. package/dist/components/ui/Form/utilities/formValidation.js.map +0 -1
  291. package/dist/components/ui/GenericDatePickerField/GenericDateFieldBase.cjs.js +0 -2
  292. package/dist/components/ui/GenericDatePickerField/GenericDateFieldBase.cjs.js.map +0 -1
  293. package/dist/components/ui/GenericDatePickerField/GenericDateFieldBase.js +0 -2
  294. package/dist/components/ui/GenericDatePickerField/GenericDateFieldBase.js.map +0 -1
  295. package/dist/components/ui/GenericDatePickerField/GenericDatePickerField.cjs.js.map +0 -1
  296. package/dist/components/ui/GenericDatePickerField/GenericDatePickerField.js.map +0 -1
  297. package/dist/components/ui/GenericDateTimePickerField/GenericDateTimePickerField.cjs.js.map +0 -1
  298. package/dist/components/ui/GenericDateTimePickerField/GenericDateTimePickerField.js.map +0 -1
  299. package/dist/components/ui/GenericRadioButtons/GenericRadioButtons.cjs.js +0 -2
  300. package/dist/components/ui/GenericRadioButtons/GenericRadioButtons.cjs.js.map +0 -1
  301. package/dist/components/ui/GenericRadioButtons/GenericRadioButtons.js +0 -2
  302. package/dist/components/ui/GenericRadioButtons/GenericRadioButtons.js.map +0 -1
  303. package/dist/components/ui/GenericTable/GenericTable.cjs.js.map +0 -1
  304. package/dist/components/ui/GenericTable/GenericTable.js.map +0 -1
  305. package/dist/components/ui/GenericTable/HighlightScrollbar.cjs.js.map +0 -1
  306. package/dist/components/ui/GenericTable/HighlightScrollbar.js.map +0 -1
  307. package/dist/components/ui/GenericTable/types.d.ts +0 -13
  308. package/dist/components/ui/GenericTableBody/GenericTableBody.cjs.js +0 -2
  309. package/dist/components/ui/GenericTableBody/GenericTableBody.cjs.js.map +0 -1
  310. package/dist/components/ui/GenericTableBody/GenericTableBody.d.ts +0 -16
  311. package/dist/components/ui/GenericTableBody/GenericTableBody.js +0 -2
  312. package/dist/components/ui/GenericTableBody/GenericTableBody.js.map +0 -1
  313. package/dist/components/ui/GenericTableBodyRow/GenericTableBodyRow.cjs.js.map +0 -1
  314. package/dist/components/ui/GenericTableBodyRow/GenericTableBodyRow.js.map +0 -1
  315. package/dist/components/ui/GenericTableTitle/GenericTableTitle.cjs.js.map +0 -1
  316. package/dist/components/ui/GenericTableTitle/GenericTableTitle.js.map +0 -1
  317. package/dist/components/ui/LazyComponent/LazyComponent.cjs.js.map +0 -1
  318. package/dist/components/ui/LazyComponent/LazyComponent.js.map +0 -1
  319. package/dist/components/ui/ListItemLink/ListItemLink.cjs.js.map +0 -1
  320. package/dist/components/ui/ListItemLink/ListItemLink.js.map +0 -1
  321. package/dist/components/ui/ListItemLinkButton/ListItemLinkButton.cjs.js +0 -2
  322. package/dist/components/ui/ListItemLinkButton/ListItemLinkButton.cjs.js.map +0 -1
  323. package/dist/components/ui/ListItemLinkButton/ListItemLinkButton.js +0 -2
  324. package/dist/components/ui/ListItemLinkButton/ListItemLinkButton.js.map +0 -1
  325. package/dist/components/ui/NoResults/NoResults.cjs.js.map +0 -1
  326. package/dist/components/ui/NoResults/NoResults.js.map +0 -1
  327. package/dist/components/ui/NotFoundPage/NotFoundPage.cjs.js +0 -2
  328. package/dist/components/ui/NotFoundPage/NotFoundPage.cjs.js.map +0 -1
  329. package/dist/components/ui/NotFoundPage/NotFoundPage.js +0 -2
  330. package/dist/components/ui/NotFoundPage/NotFoundPage.js.map +0 -1
  331. package/dist/components/ui/PageLayout/DocumentTitle.cjs.js +0 -2
  332. package/dist/components/ui/PageLayout/DocumentTitle.cjs.js.map +0 -1
  333. package/dist/components/ui/PageLayout/DocumentTitle.js +0 -2
  334. package/dist/components/ui/PageLayout/DocumentTitle.js.map +0 -1
  335. package/dist/components/ui/PageLayout/FullWidthContainer.cjs.js.map +0 -1
  336. package/dist/components/ui/PageLayout/FullWidthContainer.js.map +0 -1
  337. package/dist/components/ui/PageLayout/PageLayout.cjs.js +0 -2
  338. package/dist/components/ui/PageLayout/PageLayout.cjs.js.map +0 -1
  339. package/dist/components/ui/PageLayout/PageLayout.js +0 -2
  340. package/dist/components/ui/PageLayout/PageLayout.js.map +0 -1
  341. package/dist/components/ui/PortalMock/PortalMock.cjs.js.map +0 -1
  342. package/dist/components/ui/PortalMock/PortalMock.js.map +0 -1
  343. package/dist/components/ui/Spacer/Spacer.cjs.js.map +0 -1
  344. package/dist/components/ui/Spacer/Spacer.js.map +0 -1
  345. package/dist/components/ui/Switch/Switch.cjs.js.map +0 -1
  346. package/dist/components/ui/Switch/Switch.js.map +0 -1
  347. package/dist/components/ui/Tooltip/Tooltip.cjs.js +0 -2
  348. package/dist/components/ui/Tooltip/Tooltip.cjs.js.map +0 -1
  349. package/dist/components/ui/Tooltip/Tooltip.js +0 -2
  350. package/dist/components/ui/Tooltip/Tooltip.js.map +0 -1
  351. /package/dist/components/{ui/Chip/Chip.d.ts → Chip/index.d.ts} +0 -0
  352. /package/dist/components/{ui/FlipdishLogoLoader/FlipdishLogoLoader.d.ts → FlipdishLogoLoader/index.d.ts} +0 -0
  353. /package/dist/components/{ui/FlipdishStaffContainer/FlipdishStaffContainer.d.ts → FlipdishStaffContainer/index.d.ts} +0 -0
  354. /package/dist/components/{ui/Form/GenericAutocompleteField.d.ts → Form/GenericAutocompleteField/index.d.ts} +0 -0
  355. /package/dist/components/{ui/Form/GenericFormContainer.d.ts → Form/GenericFormContainer/index.d.ts} +0 -0
  356. /package/dist/components/{ui/Form/GenericTextField.d.ts → Form/GenericTextField/index.d.ts} +0 -0
  357. /package/dist/components/{ui/GenericDatePickerField/GenericDatePickerField.d.ts → GenericDatePickerField/index.d.ts} +0 -0
  358. /package/dist/components/{ui/GenericDateTimePickerField/GenericDateTimePickerField.d.ts → GenericDateTimePickerField/index.d.ts} +0 -0
  359. /package/dist/components/{ui/GenericRadioButtons/GenericRadioButtons.d.ts → GenericRadioButtons/index.d.ts} +0 -0
  360. /package/dist/components/{ui/GenericTable → GenericTable}/HighlightScrollbar.cjs.js +0 -0
  361. /package/dist/components/{ui/GenericTable → GenericTable}/HighlightScrollbar.js +0 -0
  362. /package/dist/components/{ui/GenericTableBodyRow/GenericTableBodyRow.d.ts → GenericTableBodyRow/index.d.ts} +0 -0
  363. /package/dist/components/{ui/GenericTableTitle/GenericTableTitle.d.ts → GenericTableTitle/index.d.ts} +0 -0
  364. /package/dist/components/{ui/LazyComponent/LazyComponent.d.ts → LazyComponent/index.d.ts} +0 -0
  365. /package/dist/components/{ui/ListItemLink/ListItemLink.d.ts → ListItemLink/index.d.ts} +0 -0
  366. /package/dist/components/{ui/ListItemLinkButton/ListItemLinkButton.d.ts → ListItemLinkButton/index.d.ts} +0 -0
  367. /package/dist/components/{ui/NoResults/NoResults.d.ts → NoResults/index.d.ts} +0 -0
  368. /package/dist/components/{ui/NotFoundPage/NotFoundPage.d.ts → NotFoundPage/index.d.ts} +0 -0
  369. /package/dist/components/{ui/PageLayout → PageLayout}/FullWidthContainer.cjs.js +0 -0
  370. /package/dist/components/{ui/PageLayout → PageLayout}/FullWidthContainer.js +0 -0
  371. /package/dist/components/{ui/PortalMock/PortalMock.d.ts → PortalMock/index.d.ts} +0 -0
  372. /package/dist/components/{ui/Spacer/Spacer.d.ts → Spacer/index.d.ts} +0 -0
  373. /package/dist/components/{ui/Switch/Switch.d.ts → Switch/index.d.ts} +0 -0
  374. /package/dist/components/{ui/Tooltip/Tooltip.d.ts → Tooltip/index.d.ts} +0 -0
  375. /package/dist/{components/custom-hooks → custom-hooks}/useMicroFrontendAttributes.cjs.js +0 -0
  376. /package/dist/{components/custom-hooks → custom-hooks}/useMicroFrontendAttributes.d.ts +0 -0
  377. /package/dist/{components/custom-hooks → custom-hooks}/useMicroFrontendAttributes.js +0 -0
  378. /package/dist/{components/custom-hooks → custom-hooks}/useRenderValidText.d.ts +0 -0
  379. /package/dist/{components/custom-hooks → custom-hooks}/useToasts.cjs.js +0 -0
  380. /package/dist/{components/custom-hooks → custom-hooks}/useToasts.d.ts +0 -0
  381. /package/dist/{components/custom-hooks → custom-hooks}/useToasts.js +0 -0
  382. /package/dist/{components/ui/DateTimeLocalizationProvider → providers}/DateTimeLocalizationProvider.cjs.js +0 -0
  383. /package/dist/{components/ui/DateTimeLocalizationProvider → providers}/DateTimeLocalizationProvider.d.ts +0 -0
  384. /package/dist/{components/ui/DateTimeLocalizationProvider → providers}/DateTimeLocalizationProvider.js +0 -0
  385. /package/dist/{components/ui/Form/utilities → utilities}/formValidation.cjs.js +0 -0
  386. /package/dist/{components/ui/Form/utilities → utilities}/formValidation.js +0 -0
  387. /package/dist/{components/genericUtilities/index.d.ts → utilities/genericUtilities.d.ts} +0 -0
@@ -1,2 +1,2 @@
1
1
  "use strict";var e=require("lodash.debounce");exports.debounce=(r,o)=>e(r,o);
2
- //# sourceMappingURL=index.cjs.js.map
2
+ //# sourceMappingURL=genericUtilities.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"genericUtilities.cjs.js","sources":["../../src/utilities/genericUtilities.ts"],"sourcesContent":["import lodashDebounce from 'lodash.debounce';\n\n/**\n * Creates a debounced function that delays invoking the provided function until after `waitMs` milliseconds\n * have elapsed since the last time the debounced function was invoked.\n *\n * @param func - The function to debounce\n * @param waitMs - The number of milliseconds to delay\n * @returns A debounced version of the provided function\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const debounce = (func: (...args: any[]) => void, waitMs: number) => lodashDebounce(func, waitMs);\n"],"names":["func","waitMs","lodashDebounce"],"mappings":"+DAWwB,CAACA,EAAgCC,IAAmBC,EAAeF,EAAMC"}
@@ -1,2 +1,2 @@
1
1
  import o from"lodash.debounce";const e=(e,r)=>o(e,r);export{e as debounce};
2
- //# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=genericUtilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"genericUtilities.js","sources":["../../src/utilities/genericUtilities.ts"],"sourcesContent":["import lodashDebounce from 'lodash.debounce';\n\n/**\n * Creates a debounced function that delays invoking the provided function until after `waitMs` milliseconds\n * have elapsed since the last time the debounced function was invoked.\n *\n * @param func - The function to debounce\n * @param waitMs - The number of milliseconds to delay\n * @returns A debounced version of the provided function\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const debounce = (func: (...args: any[]) => void, waitMs: number) => lodashDebounce(func, waitMs);\n"],"names":["debounce","func","waitMs","lodashDebounce"],"mappings":"+BAWa,MAAAA,EAAW,CAACC,EAAgCC,IAAmBC,EAAeF,EAAMC"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("react");const t=e=>{const t=document.getElementById("flipdish-micro-frontend");return t?.getAttribute(e)||""};exports.getAppId=()=>(void 0).VITE_APPID_OVERRIDE||t("data-appId"),exports.getBrandId=()=>(void 0).VITE_BRANDID_OVERRIDE||t("data-brandId"),exports.getIsFlipdishStaff=()=>{const e=(void 0).VITE_ISFLIPDISHSTAFFOVERRIDE||t("data-isFlipdishStaff");return"true"===e?.toString()},exports.getMicroFrontendAttribute=t,exports.getOrgId=()=>(void 0).VITE_ORGID_OVERRIDE||t("data-orgId"),exports.lazyWithRetry=t=>e.lazy((async()=>{const e=JSON.parse(window.sessionStorage.getItem("page-has-been-force-refreshed")||"false");try{const e=await t();return window.sessionStorage.setItem("page-has-been-force-refreshed","false"),e}catch(t){if(!e)return window.sessionStorage.setItem("page-has-been-force-refreshed","true"),window.location.reload();throw t}}));
2
+ //# sourceMappingURL=renderUtilities.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderUtilities.cjs.js","sources":["../../src/utilities/renderUtilities.ts"],"sourcesContent":["import { lazy } from 'react';\n\nexport const getMicroFrontendAttribute = (key: string): string => {\n const microFrontendDiv = document.getElementById('flipdish-micro-frontend');\n return microFrontendDiv?.getAttribute(key) || '';\n};\n\n/**\n * Retrieves the AppId.\n *\n * Attempts to get the value from the environment variable `VITE_APPID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-appId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getAppId = (): string => {\n return import.meta.env.VITE_APPID_OVERRIDE || getMicroFrontendAttribute('data-appId');\n};\n\n/**\n * Retrieves the OrgId.\n *\n * Attempts to get the value from the environment variable `VITE_ORGID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-orgId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getOrgId = (): string => {\n //TODO: change to kebab case to satisfy html attribute requirements\n return import.meta.env.VITE_ORGID_OVERRIDE || getMicroFrontendAttribute('data-orgId');\n};\n\n/**\n * Retrieves the BrandId.\n *\n * Attempts to get the value from the environment variable `VITE_BRANDID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-brandId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getBrandId = (): string => {\n //TODO: change to kebab case to satisfy html attribute requirements\n return import.meta.env.VITE_BRANDID_OVERRIDE || getMicroFrontendAttribute('data-brandId');\n};\n\n/**\n * Retrieves the isFlipdishStaff attribute.\n *\n * Attempts to get the value from the environment variable `VITE_ISFLIPDISHSTAFFOVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-isFlipdishStaff`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getIsFlipdishStaff = (): boolean => {\n const stringValue = import.meta.env.VITE_ISFLIPDISHSTAFFOVERRIDE || getMicroFrontendAttribute('data-isFlipdishStaff');\n return stringValue?.toString() === 'true';\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const lazyWithRetry = (componentImport: () => any) =>\n lazy(async () => {\n const pageHasAlreadyBeenForceRefreshed = JSON.parse(window.sessionStorage.getItem('page-has-been-force-refreshed') || 'false');\n\n try {\n const component = await componentImport();\n window.sessionStorage.setItem('page-has-been-force-refreshed', 'false');\n\n return component;\n } catch (error) {\n if (!pageHasAlreadyBeenForceRefreshed) {\n // Assuming that the user is not on the latest version of the application.\n // Let's refresh the page immediately.\n window.sessionStorage.setItem('page-has-been-force-refreshed', 'true');\n return window.location.reload();\n }\n\n // The page has already been reloaded\n // Assuming that user is already using the latest version of the application.\n // Let's let the application crash and raise the error.\n throw error;\n }\n });\n"],"names":["getMicroFrontendAttribute","key","microFrontendDiv","document","getElementById","getAttribute","undefined","VITE_APPID_OVERRIDE","VITE_BRANDID_OVERRIDE","stringValue","VITE_ISFLIPDISHSTAFFOVERRIDE","toString","VITE_ORGID_OVERRIDE","componentImport","lazy","async","pageHasAlreadyBeenForceRefreshed","JSON","parse","window","sessionStorage","getItem","component","setItem","error","location","reload"],"mappings":"oCAEa,MAAAA,EAA6BC,IACtC,MAAMC,EAAmBC,SAASC,eAAe,2BACjD,OAAOF,GAAkBG,aAAaJ,IAAQ,EAAE,mBAW5B,UACbK,GAAgBC,qBAAuBP,EAA0B,iCAwBlD,UAEfM,GAAgBE,uBAAyBR,EAA0B,2CAW5C,KAC9B,MAAMS,QAAcH,GAAgBI,8BAAgCV,EAA0B,wBAC9F,MAAmC,SAA5BS,GAAaE,UAAqB,uDA5BrB,UAEbL,GAAgBM,qBAAuBZ,EAA0B,oCA8B9Ca,GAC1BC,EAAAA,MAAKC,UACD,MAAMC,EAAmCC,KAAKC,MAAMC,OAAOC,eAAeC,QAAQ,kCAAoC,SAEtH,IACI,MAAMC,QAAkBT,IAGxB,OAFAM,OAAOC,eAAeG,QAAQ,gCAAiC,SAExDD,CACV,CAAC,MAAOE,GACL,IAAKR,EAID,OADAG,OAAOC,eAAeG,QAAQ,gCAAiC,QACxDJ,OAAOM,SAASC,SAM3B,MAAMF,CACT"}
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
 
3
- declare const getMicroFrontendAttribute: (key: string) => string | null;
3
+ declare const getMicroFrontendAttribute: (key: string) => string;
4
4
  /**
5
5
  * Retrieves the AppId.
6
6
  *
@@ -9,7 +9,7 @@ declare const getMicroFrontendAttribute: (key: string) => string | null;
9
9
  *
10
10
  * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.
11
11
  */
12
- declare const getAppId: () => string | null;
12
+ declare const getAppId: () => string;
13
13
  /**
14
14
  * Retrieves the OrgId.
15
15
  *
@@ -18,7 +18,7 @@ declare const getAppId: () => string | null;
18
18
  *
19
19
  * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.
20
20
  */
21
- declare const getOrgId: () => string | null;
21
+ declare const getOrgId: () => string;
22
22
  /**
23
23
  * Retrieves the BrandId.
24
24
  *
@@ -27,7 +27,7 @@ declare const getOrgId: () => string | null;
27
27
  *
28
28
  * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.
29
29
  */
30
- declare const getBrandId: () => string | null;
30
+ declare const getBrandId: () => string;
31
31
  /**
32
32
  * Retrieves the isFlipdishStaff attribute.
33
33
  *
@@ -0,0 +1,2 @@
1
+ import{lazy as e}from"react";const t=e=>{const t=document.getElementById("flipdish-micro-frontend");return t?.getAttribute(e)||""},r=()=>import.meta.env.VITE_APPID_OVERRIDE||t("data-appId"),a=()=>import.meta.env.VITE_ORGID_OVERRIDE||t("data-orgId"),o=()=>import.meta.env.VITE_BRANDID_OVERRIDE||t("data-brandId"),n=()=>{const e=import.meta.env.VITE_ISFLIPDISHSTAFFOVERRIDE||t("data-isFlipdishStaff");return"true"===e?.toString()},s=t=>e((async()=>{const e=JSON.parse(window.sessionStorage.getItem("page-has-been-force-refreshed")||"false");try{const e=await t();return window.sessionStorage.setItem("page-has-been-force-refreshed","false"),e}catch(t){if(!e)return window.sessionStorage.setItem("page-has-been-force-refreshed","true"),window.location.reload();throw t}}));export{r as getAppId,o as getBrandId,n as getIsFlipdishStaff,t as getMicroFrontendAttribute,a as getOrgId,s as lazyWithRetry};
2
+ //# sourceMappingURL=renderUtilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderUtilities.js","sources":["../../src/utilities/renderUtilities.ts"],"sourcesContent":["import { lazy } from 'react';\n\nexport const getMicroFrontendAttribute = (key: string): string => {\n const microFrontendDiv = document.getElementById('flipdish-micro-frontend');\n return microFrontendDiv?.getAttribute(key) || '';\n};\n\n/**\n * Retrieves the AppId.\n *\n * Attempts to get the value from the environment variable `VITE_APPID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-appId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getAppId = (): string => {\n return import.meta.env.VITE_APPID_OVERRIDE || getMicroFrontendAttribute('data-appId');\n};\n\n/**\n * Retrieves the OrgId.\n *\n * Attempts to get the value from the environment variable `VITE_ORGID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-orgId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getOrgId = (): string => {\n //TODO: change to kebab case to satisfy html attribute requirements\n return import.meta.env.VITE_ORGID_OVERRIDE || getMicroFrontendAttribute('data-orgId');\n};\n\n/**\n * Retrieves the BrandId.\n *\n * Attempts to get the value from the environment variable `VITE_BRANDID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-brandId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getBrandId = (): string => {\n //TODO: change to kebab case to satisfy html attribute requirements\n return import.meta.env.VITE_BRANDID_OVERRIDE || getMicroFrontendAttribute('data-brandId');\n};\n\n/**\n * Retrieves the isFlipdishStaff attribute.\n *\n * Attempts to get the value from the environment variable `VITE_ISFLIPDISHSTAFFOVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-isFlipdishStaff`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getIsFlipdishStaff = (): boolean => {\n const stringValue = import.meta.env.VITE_ISFLIPDISHSTAFFOVERRIDE || getMicroFrontendAttribute('data-isFlipdishStaff');\n return stringValue?.toString() === 'true';\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const lazyWithRetry = (componentImport: () => any) =>\n lazy(async () => {\n const pageHasAlreadyBeenForceRefreshed = JSON.parse(window.sessionStorage.getItem('page-has-been-force-refreshed') || 'false');\n\n try {\n const component = await componentImport();\n window.sessionStorage.setItem('page-has-been-force-refreshed', 'false');\n\n return component;\n } catch (error) {\n if (!pageHasAlreadyBeenForceRefreshed) {\n // Assuming that the user is not on the latest version of the application.\n // Let's refresh the page immediately.\n window.sessionStorage.setItem('page-has-been-force-refreshed', 'true');\n return window.location.reload();\n }\n\n // The page has already been reloaded\n // Assuming that user is already using the latest version of the application.\n // Let's let the application crash and raise the error.\n throw error;\n }\n });\n"],"names":["getMicroFrontendAttribute","key","microFrontendDiv","document","getElementById","getAttribute","getAppId","env","VITE_APPID_OVERRIDE","getOrgId","VITE_ORGID_OVERRIDE","getBrandId","VITE_BRANDID_OVERRIDE","getIsFlipdishStaff","stringValue","VITE_ISFLIPDISHSTAFFOVERRIDE","toString","lazyWithRetry","componentImport","lazy","async","pageHasAlreadyBeenForceRefreshed","JSON","parse","window","sessionStorage","getItem","component","setItem","error","location","reload"],"mappings":"6BAEa,MAAAA,EAA6BC,IACtC,MAAMC,EAAmBC,SAASC,eAAe,2BACjD,OAAOF,GAAkBG,aAAaJ,IAAQ,EAAE,EAWvCK,EAAW,gBACDC,IAAIC,qBAAuBR,EAA0B,cAW/DS,EAAW,gBAEDF,IAAIG,qBAAuBV,EAA0B,cAW/DW,EAAa,gBAEHJ,IAAIK,uBAAyBZ,EAA0B,gBAWjEa,EAAqB,KAC9B,MAAMC,cAA0BP,IAAIQ,8BAAgCf,EAA0B,wBAC9F,MAAmC,SAA5Bc,GAAaE,UAAqB,EAIhCC,EAAiBC,GAC1BC,GAAKC,UACD,MAAMC,EAAmCC,KAAKC,MAAMC,OAAOC,eAAeC,QAAQ,kCAAoC,SAEtH,IACI,MAAMC,QAAkBT,IAGxB,OAFAM,OAAOC,eAAeG,QAAQ,gCAAiC,SAExDD,CACV,CAAC,MAAOE,GACL,IAAKR,EAID,OADAG,OAAOC,eAAeG,QAAQ,gCAAiC,QACxDJ,OAAOM,SAASC,SAM3B,MAAMF,CACT"}
@@ -0,0 +1,3 @@
1
+ declare const joinUrlPaths: (baseUrl: string, path: string) => string;
2
+
3
+ export { joinUrlPaths };
package/package.json CHANGED
@@ -1,9 +1,41 @@
1
1
  {
2
2
  "name": "@flipdish/portal-library",
3
- "version": "1.0.78",
3
+ "version": "2.0.1",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
7
+ "exports": {
8
+ "./components/*": {
9
+ "types": "./dist/components/*/index.d.ts",
10
+ "import": "./dist/components/*/index.js",
11
+ "node": "./dist/components/*/index.cjs.js"
12
+ },
13
+ "./utilities/*": {
14
+ "types": "./dist/utilities/*.d.ts",
15
+ "import": "./dist/utilities/*.js",
16
+ "node": "./dist/utilities/*.cjs.js"
17
+ },
18
+ "./providers/*": {
19
+ "types": "./dist/providers/*.d.ts",
20
+ "import": "./dist/providers/*.js",
21
+ "node": "./dist/providers/*.cjs.js"
22
+ },
23
+ "./custom-hooks/*": {
24
+ "types": "./dist/custom-hooks/*.d.ts",
25
+ "import": "./dist/custom-hooks/*.js",
26
+ "node": "./dist/custom-hooks/*.cjs.js"
27
+ },
28
+ "./themes/*": {
29
+ "types": "./dist/themes/*.d.ts",
30
+ "import": "./dist/themes/*.js",
31
+ "node": "./dist/themes/*.cjs.js"
32
+ },
33
+ "./icons/*": {
34
+ "types": "./dist/icons/*.d.ts",
35
+ "import": "./dist/icons/*.js",
36
+ "node": "./dist/icons/*.cjs.js"
37
+ }
38
+ },
7
39
  "peerDependencies": {
8
40
  "@actions/core": "^1.11.1",
9
41
  "@emotion/react": "11.14.0",
@@ -24,6 +56,7 @@
24
56
  "devDependencies": {
25
57
  "@chromatic-com/storybook": "^3.2.5",
26
58
  "@rollup/plugin-commonjs": "^28.0.1",
59
+ "@rollup/plugin-dynamic-import-vars": "^2.1.5",
27
60
  "@rollup/plugin-json": "^6.1.0",
28
61
  "@rollup/plugin-node-resolve": "^15.3.0",
29
62
  "@rollup/plugin-terser": "^0.4.4",
@@ -78,6 +111,7 @@
78
111
  "preview": "vite preview",
79
112
  "test:run": "vitest run",
80
113
  "test:watch": "vitest",
114
+ "test:coverage": "vitest run --coverage --pool=threads",
81
115
  "variables:generate": "node domains.js",
82
116
  "typecheck": "tsc --noEmit",
83
117
  "storybook": "storybook dev -p 6006",
@@ -1 +0,0 @@
1
- {"version":3,"file":"useMicroFrontendAttributes.cjs.js","sources":["../../../src/components/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","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","undefined","toUpperCase","attributeKey","domValue","getAttribute","toString","processAttribute","observer","MutationObserver","observe","disconnect"],"mappings":"oCASA,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,sBAgDrC,CAC/BM,EAAgC,MAEhC,MAAOE,EAAYC,GAAiBC,EAAQA,UAAC,IA/CzB,CAA+BJ,IACnD,MAAMK,EAAUN,EAAWC,GACrBM,EAAe,CAAA,EAKrB,OAJAD,EAAQE,SAASb,IACb,MAAMc,EAA2B,iBAARd,EAAmBA,EAAMA,EAAIA,IACtDY,EAAaE,GAAY,IAAI,IAE1BF,CAAY,EAwCgCG,CAAgBT,KAqCnE,OAnCAU,EAAAA,WAAU,KACN,MAAMC,EAAmBC,SAASC,eAAe,2BACjD,IAAKF,EAED,YADAG,QAAQC,KAAK,gCAIjB,MAAMV,EAAUN,EAAWC,GACrBgB,EAAa,IAAIvB,KAAuBO,GAExCiB,EAAe,KACjBd,GAAee,IACX,MAAMC,EAAgB,IAAKD,GAC3B,IAAIE,GAAY,EAUhB,OARAf,EAAQE,SAASb,IACb,MAAMG,MAAEA,EAAOH,IAAKc,GAvDf,EACrBd,EACAiB,EACAK,KAEA,MAAMK,EArCW,EAA+B3B,EAAgBsB,IACzDA,EAAWM,MAAMC,GAA8B,iBAAXA,EAAsBA,IAAW7B,EAAM6B,EAAO7B,MAAQA,IAoC/E8B,CAAa9B,EAAKsB,GAC9BrB,EAlCW,CAAC0B,GACXA,GAAkC,iBAAdA,GAA0B,SAAUA,EAAYA,EAAU1B,KAAO,SAiC/E8B,CAAaJ,GACpBK,EAA2B,iBAARhC,EAAmBA,EAAMA,EAAIA,IAEhDiC,QAASC,GAAgB,QAAQF,EAAUG,0BAC3CC,EAAe,QAAQJ,IACvBK,EAAWpB,EAAiBqB,aAAaF,GAG/C,MAAO,CAAEjC,MADcD,EAAT+B,EAAoBA,EAAOM,WAA+BF,EAAnBpC,GACrCD,IAAKgC,EAA+C,EAyCnBQ,CAAiBxC,EAAKiB,EAAkBK,GACrEG,EAAcX,KAAcX,IAC5BsB,EAAcX,GAAYX,EAC1BuB,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,CAACtC,IAEGE,CAAU"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useMicroFrontendAttributes.js","sources":["../../../src/components/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"}
@@ -1,2 +0,0 @@
1
- "use strict";var r=require("react/jsx-runtime"),e=require("react"),s=require("../../providers/TranslationProvider.cjs.js");module.exports=({fieldError:t,showError:a,touched:o,value:i})=>{const[u,c]=e.useState(""),{translate:l}=s.useTranslation(),n=()=>!a&&o&&i?r.jsx("span",{style:{color:"#1dc798"},children:l("Valid")}):a?t:"";return e.useEffect((()=>{c(n())}),[t,i,a,o]),u};
2
- //# sourceMappingURL=useRenderValidText.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRenderValidText.cjs.js","sources":["../../../src/components/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":["fieldError","showError","touched","value","validTextElement","setValidTextElement","useState","translate","useTranslation","determineValidationState","_jsx","style","color","children","useEffect"],"mappings":"0IAgB2B,EAAGA,aAAYC,YAAWC,UAASC,YAC1D,MAAOC,EAAkBC,GAAuBC,EAAQA,SAAoB,KACtEC,UAAEA,GAAcC,EAAAA,iBAchBC,EAA2B,KACxBR,GAAaC,GAAWC,EAZtBO,MAAM,OAAA,CAAAC,MAAO,CAAEC,MAAO,WAAWC,SAAGN,EAAU,WAgBjDN,EAZGD,EAIA,GAmBX,OAJAc,EAAAA,WAAU,KACNT,EAAoBI,IAA2B,GAChD,CAACT,EAAYG,EAAOF,EAAWC,IAE3BE,CAAgB"}
@@ -1,2 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRenderValidText.js","sources":["../../../src/components/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":"gKAgBA,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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useToasts.cjs.js","sources":["../../../src/components/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":["enqueueSnackbar","closeSnackbar","useSnackbar","showToast","message","variant","options","undefined","autoHideDuration","durationMs","persist","dismissAllToasts","dismissToast","key","showDefaultToast","showSuccessToast","showErrorToast"],"mappings":"uDA2DkB,KACd,MAAMA,gBAAEA,EAAeC,cAAEA,GAAkBC,EAAWA,cAwBhDC,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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useToasts.js","sources":["../../../src/components/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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../src/components/genericUtilities/index.ts"],"sourcesContent":["import lodashDebounce from 'lodash.debounce';\n\n/**\n * Creates a debounced function that delays invoking the provided function until after `waitMs` milliseconds\n * have elapsed since the last time the debounced function was invoked.\n *\n * @param func - The function to debounce\n * @param waitMs - The number of milliseconds to delay\n * @returns A debounced version of the provided function\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const debounce = (func: (...args: any[]) => void, waitMs: number) => lodashDebounce(func, waitMs);\n"],"names":["func","waitMs","lodashDebounce"],"mappings":"+DAWwB,CAACA,EAAgCC,IAAmBC,EAAeF,EAAMC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/genericUtilities/index.ts"],"sourcesContent":["import lodashDebounce from 'lodash.debounce';\n\n/**\n * Creates a debounced function that delays invoking the provided function until after `waitMs` milliseconds\n * have elapsed since the last time the debounced function was invoked.\n *\n * @param func - The function to debounce\n * @param waitMs - The number of milliseconds to delay\n * @returns A debounced version of the provided function\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const debounce = (func: (...args: any[]) => void, waitMs: number) => lodashDebounce(func, waitMs);\n"],"names":["debounce","func","waitMs","lodashDebounce"],"mappings":"+BAWa,MAAAA,EAAW,CAACC,EAAgCC,IAAmBC,EAAeF,EAAMC"}
@@ -1,2 +0,0 @@
1
- "use strict";var e=require("./themes/flipdishPublicTheme.cjs.js"),i=require("./ui/NotFoundPage/NotFoundPage.cjs.js"),r=require("./ui/FlipdishStaffContainer/FlipdishStaffContainer.cjs.js"),t=require("./ui/PageLayout/PageLayout.cjs.js"),s=require("./ui/PortalMock/PortalMock.cjs.js"),o=require("./ui/LazyComponent/LazyComponent.cjs.js"),c=require("./ui/Spacer/Spacer.cjs.js"),u=require("./ui/Chip/Chip.cjs.js"),a=require("./ui/Switch/Switch.cjs.js"),n=require("./ui/Tooltip/Tooltip.cjs.js"),d=require("./ui/Form/utilities/formValidation.cjs.js"),l=require("./ui/Form/GenericAutocompleteField.cjs.js"),p=require("./ui/Form/GenericFormContainer.cjs.js"),j=require("./ui/Form/GenericTextField.cjs.js"),x=require("./ui/Form/PaginatedAutocompleteField.cjs.js"),m=require("./ui/FlipdishLogoLoader/FlipdishLogoLoader.cjs.js"),T=require("./ui/GenericDatePickerField/GenericDatePickerField.cjs.js"),q=require("./ui/GenericDateTimePickerField/GenericDateTimePickerField.cjs.js"),F=require("./ui/GenericRadioButtons/GenericRadioButtons.cjs.js"),L=require("./ui/DateTimeLocalizationProvider/DateTimeLocalizationProvider.cjs.js"),G=require("./ui/GenericTable/GenericTable.cjs.js"),h=require("./ui/GenericTableBody/GenericTableBody.cjs.js"),g=require("./ui/GenericTableBodyRow/GenericTableBodyRow.cjs.js"),P=require("./ui/GenericTableTitle/GenericTableTitle.cjs.js"),k=require("./ui/ListItemLink/ListItemLink.cjs.js"),b=require("./ui/ListItemLinkButton/ListItemLinkButton.cjs.js"),I=require("./ui/NoResults/NoResults.cjs.js"),y=require("@mui/icons-material/Search"),f=require("@mui/icons-material/CalendarToday"),B=require("@mui/icons-material/AccessTime"),C=require("@mui/icons-material/Done"),R=require("./custom-hooks/useRenderValidText.cjs.js"),S=require("./custom-hooks/useMicroFrontendAttributes.cjs.js"),A=require("./custom-hooks/useToasts.cjs.js"),D=require("./renderUtilities/renderUtilities.cjs.js"),z=require("./genericUtilities/index.cjs.js"),v=require("../providers/ToastProvider.cjs.js");exports.flipdishPublicTheme=e,exports.NotFoundPage=i,exports.FlipdishStaffContainer=r,exports.PageLayout=t.default,exports.PortalMock=s,exports.LazyComponent=o,exports.Spacer=c,exports.Chip=u.default,exports.Switch=a,exports.Tooltip=n,exports.formikValidate=d.formikValidate,exports.GenericAutocompleteField=l,exports.GenericFormContainer=p,exports.GenericTextField=j,exports.PaginatedAutocompleteField=x,exports.FlipdishLogoLoader=m,exports.GenericDatePickerField=T,exports.GenericDateTimePickerField=q,exports.GenericRadioButtons=F,exports.DateTimeLocalizationProvider=L,exports.GenericTable=G,exports.GenericTableBody=h,exports.GenericTableBodyRow=g,exports.GenericTableTitle=P,exports.ListItemLink=k,exports.ListItemLinkButton=b.ListItemLinkButton,exports.NoResults=I,exports.SearchIcon=y,exports.CalendarTodayIcon=f,exports.AccessTimeIcon=B,exports.DoneIcon=C,exports.useRenderValidText=R,exports.useMicroFrontendAttributes=S,exports.useToasts=A,exports.getAppId=D.getAppId,exports.getBrandId=D.getBrandId,exports.getIsFlipdishStaff=D.getIsFlipdishStaff,exports.getMicroFrontendAttribute=D.getMicroFrontendAttribute,exports.getOrgId=D.getOrgId,exports.lazyWithRetry=D.lazyWithRetry,exports.debounce=z.debounce,exports.ToastProvider=v;
2
- //# sourceMappingURL=index.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,38 +0,0 @@
1
- export { default as flipdishPublicTheme } from './themes/flipdishPublicTheme.js';
2
- export { default as NotFoundPage } from './ui/NotFoundPage/NotFoundPage.js';
3
- export { default as FlipdishStaffContainer } from './ui/FlipdishStaffContainer/FlipdishStaffContainer.js';
4
- export { default as PageLayout } from './ui/PageLayout/PageLayout.js';
5
- export { default as PortalMock } from './ui/PortalMock/PortalMock.js';
6
- export { default as LazyComponent } from './ui/LazyComponent/LazyComponent.js';
7
- export { default as Spacer } from './ui/Spacer/Spacer.js';
8
- export { default as Chip } from './ui/Chip/Chip.js';
9
- export { default as Switch } from './ui/Switch/Switch.js';
10
- export { default as Tooltip } from './ui/Tooltip/Tooltip.js';
11
- export { formikValidate } from './ui/Form/utilities/formValidation.js';
12
- export { default as GenericAutocompleteField } from './ui/Form/GenericAutocompleteField.js';
13
- export { default as GenericFormContainer } from './ui/Form/GenericFormContainer.js';
14
- export { default as GenericTextField } from './ui/Form/GenericTextField.js';
15
- export { default as PaginatedAutocompleteField } from './ui/Form/PaginatedAutocompleteField.js';
16
- export { default as FlipdishLogoLoader } from './ui/FlipdishLogoLoader/FlipdishLogoLoader.js';
17
- export { default as GenericDatePickerField } from './ui/GenericDatePickerField/GenericDatePickerField.js';
18
- export { default as GenericDateTimePickerField } from './ui/GenericDateTimePickerField/GenericDateTimePickerField.js';
19
- export { default as GenericRadioButtons } from './ui/GenericRadioButtons/GenericRadioButtons.js';
20
- export { default as DateTimeLocalizationProvider } from './ui/DateTimeLocalizationProvider/DateTimeLocalizationProvider.js';
21
- export { GenericTableColumns } from './ui/GenericTable/types.js';
22
- export { default as GenericTable } from './ui/GenericTable/GenericTable.js';
23
- export { default as GenericTableBody } from './ui/GenericTableBody/GenericTableBody.js';
24
- export { default as GenericTableBodyRow } from './ui/GenericTableBodyRow/GenericTableBodyRow.js';
25
- export { default as GenericTableTitle } from './ui/GenericTableTitle/GenericTableTitle.js';
26
- export { default as ListItemLink } from './ui/ListItemLink/ListItemLink.js';
27
- export { default as ListItemLinkButton } from './ui/ListItemLinkButton/ListItemLinkButton.js';
28
- export { default as NoResults } from './ui/NoResults/NoResults.js';
29
- export { default as SearchIcon } from '@mui/icons-material/Search';
30
- export { default as CalendarTodayIcon } from '@mui/icons-material/CalendarToday';
31
- export { default as AccessTimeIcon } from '@mui/icons-material/AccessTime';
32
- export { default as DoneIcon } from '@mui/icons-material/Done';
33
- export { default as useRenderValidText } from './custom-hooks/useRenderValidText.js';
34
- export { default as useMicroFrontendAttributes } from './custom-hooks/useMicroFrontendAttributes.js';
35
- export { default as useToasts } from './custom-hooks/useToasts.js';
36
- export { getAppId, getBrandId, getIsFlipdishStaff, getMicroFrontendAttribute, getOrgId, lazyWithRetry } from './renderUtilities/renderUtilities.js';
37
- export { debounce } from './genericUtilities/index.js';
38
- export { default as ToastProvider } from '../providers/ToastProvider.js';
@@ -1,2 +0,0 @@
1
- export{default as flipdishPublicTheme}from"./themes/flipdishPublicTheme.js";export{default as NotFoundPage}from"./ui/NotFoundPage/NotFoundPage.js";export{default as FlipdishStaffContainer}from"./ui/FlipdishStaffContainer/FlipdishStaffContainer.js";export{default as PageLayout}from"./ui/PageLayout/PageLayout.js";export{default as PortalMock}from"./ui/PortalMock/PortalMock.js";export{default as LazyComponent}from"./ui/LazyComponent/LazyComponent.js";export{default as Spacer}from"./ui/Spacer/Spacer.js";export{default as Chip}from"./ui/Chip/Chip.js";export{default as Switch}from"./ui/Switch/Switch.js";export{default as Tooltip}from"./ui/Tooltip/Tooltip.js";export{formikValidate}from"./ui/Form/utilities/formValidation.js";export{default as GenericAutocompleteField}from"./ui/Form/GenericAutocompleteField.js";export{default as GenericFormContainer}from"./ui/Form/GenericFormContainer.js";export{default as GenericTextField}from"./ui/Form/GenericTextField.js";export{default as PaginatedAutocompleteField}from"./ui/Form/PaginatedAutocompleteField.js";export{default as FlipdishLogoLoader}from"./ui/FlipdishLogoLoader/FlipdishLogoLoader.js";export{default as GenericDatePickerField}from"./ui/GenericDatePickerField/GenericDatePickerField.js";export{default as GenericDateTimePickerField}from"./ui/GenericDateTimePickerField/GenericDateTimePickerField.js";export{default as GenericRadioButtons}from"./ui/GenericRadioButtons/GenericRadioButtons.js";export{default as DateTimeLocalizationProvider}from"./ui/DateTimeLocalizationProvider/DateTimeLocalizationProvider.js";export{default as GenericTable}from"./ui/GenericTable/GenericTable.js";export{default as GenericTableBody}from"./ui/GenericTableBody/GenericTableBody.js";export{default as GenericTableBodyRow}from"./ui/GenericTableBodyRow/GenericTableBodyRow.js";export{default as GenericTableTitle}from"./ui/GenericTableTitle/GenericTableTitle.js";export{default as ListItemLink}from"./ui/ListItemLink/ListItemLink.js";export{ListItemLinkButton}from"./ui/ListItemLinkButton/ListItemLinkButton.js";export{default as NoResults}from"./ui/NoResults/NoResults.js";export{default as SearchIcon}from"@mui/icons-material/Search";export{default as CalendarTodayIcon}from"@mui/icons-material/CalendarToday";export{default as AccessTimeIcon}from"@mui/icons-material/AccessTime";export{default as DoneIcon}from"@mui/icons-material/Done";export{default as useRenderValidText}from"./custom-hooks/useRenderValidText.js";export{default as useMicroFrontendAttributes}from"./custom-hooks/useMicroFrontendAttributes.js";export{default as useToasts}from"./custom-hooks/useToasts.js";export{getAppId,getBrandId,getIsFlipdishStaff,getMicroFrontendAttribute,getOrgId,lazyWithRetry}from"./renderUtilities/renderUtilities.js";export{debounce}from"./genericUtilities/index.js";export{default as ToastProvider}from"../providers/ToastProvider.js";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- "use strict";var e=require("react");const t=e=>{const t=document.getElementById("flipdish-micro-frontend");return t?.getAttribute(e)};exports.getAppId=()=>(void 0).VITE_APPID_OVERRIDE||t("data-appId"),exports.getBrandId=()=>(void 0).VITE_BRANDID_OVERRIDE||t("data-brandId"),exports.getIsFlipdishStaff=()=>{const e=(void 0).VITE_ISFLIPDISHSTAFFOVERRIDE||t("data-isFlipdishStaff");return"true"===e?.toString()},exports.getMicroFrontendAttribute=t,exports.getOrgId=()=>(void 0).VITE_ORGID_OVERRIDE||t("data-orgId"),exports.lazyWithRetry=t=>e.lazy((async()=>{const e=JSON.parse(window.sessionStorage.getItem("page-has-been-force-refreshed")||"false");try{const e=await t();return window.sessionStorage.setItem("page-has-been-force-refreshed","false"),e}catch(t){if(!e)return window.sessionStorage.setItem("page-has-been-force-refreshed","true"),window.location.reload();throw t}}));
2
- //# sourceMappingURL=renderUtilities.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderUtilities.cjs.js","sources":["../../../src/components/renderUtilities/renderUtilities.ts"],"sourcesContent":["import { lazy } from 'react';\n\nexport const getMicroFrontendAttribute = (key: string): string | null => {\n const microFrontendDiv = document.getElementById('flipdish-micro-frontend');\n return microFrontendDiv?.getAttribute(key);\n};\n\n/**\n * Retrieves the AppId.\n *\n * Attempts to get the value from the environment variable `VITE_APPID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-appId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getAppId = (): string | null => {\n return import.meta.env.VITE_APPID_OVERRIDE || getMicroFrontendAttribute('data-appId');\n};\n\n/**\n * Retrieves the OrgId.\n *\n * Attempts to get the value from the environment variable `VITE_ORGID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-orgId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getOrgId = (): string | null => {\n return import.meta.env.VITE_ORGID_OVERRIDE || getMicroFrontendAttribute('data-orgId');\n};\n\n/**\n * Retrieves the BrandId.\n *\n * Attempts to get the value from the environment variable `VITE_BRANDID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-brandId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getBrandId = (): string | null => {\n return import.meta.env.VITE_BRANDID_OVERRIDE || getMicroFrontendAttribute('data-brandId');\n};\n\n/**\n * Retrieves the isFlipdishStaff attribute.\n *\n * Attempts to get the value from the environment variable `VITE_ISFLIPDISHSTAFFOVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-isFlipdishStaff`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getIsFlipdishStaff = (): boolean => {\n const stringValue = import.meta.env.VITE_ISFLIPDISHSTAFFOVERRIDE || getMicroFrontendAttribute('data-isFlipdishStaff');\n return stringValue?.toString() === 'true';\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const lazyWithRetry = (componentImport: () => any) =>\n lazy(async () => {\n const pageHasAlreadyBeenForceRefreshed = JSON.parse(window.sessionStorage.getItem('page-has-been-force-refreshed') || 'false');\n\n try {\n const component = await componentImport();\n window.sessionStorage.setItem('page-has-been-force-refreshed', 'false');\n\n return component;\n } catch (error) {\n if (!pageHasAlreadyBeenForceRefreshed) {\n // Assuming that the user is not on the latest version of the application.\n // Let's refresh the page immediately.\n window.sessionStorage.setItem('page-has-been-force-refreshed', 'true');\n return window.location.reload();\n }\n\n // The page has already been reloaded\n // Assuming that user is already using the latest version of the application.\n // Let's let the application crash and raise the error.\n throw error;\n }\n });\n"],"names":["getMicroFrontendAttribute","key","microFrontendDiv","document","getElementById","getAttribute","undefined","VITE_APPID_OVERRIDE","VITE_BRANDID_OVERRIDE","stringValue","VITE_ISFLIPDISHSTAFFOVERRIDE","toString","VITE_ORGID_OVERRIDE","componentImport","lazy","async","pageHasAlreadyBeenForceRefreshed","JSON","parse","window","sessionStorage","getItem","component","setItem","error","location","reload"],"mappings":"oCAEa,MAAAA,EAA6BC,IACtC,MAAMC,EAAmBC,SAASC,eAAe,2BACjD,OAAOF,GAAkBG,aAAaJ,EAAI,mBAWtB,UACbK,GAAgBC,qBAAuBP,EAA0B,iCAuBlD,UACfM,GAAgBE,uBAAyBR,EAA0B,2CAW5C,KAC9B,MAAMS,QAAcH,GAAgBI,8BAAgCV,EAA0B,wBAC9F,MAAmC,SAA5BS,GAAaE,UAAqB,uDA1BrB,UACbL,GAAgBM,qBAAuBZ,EAA0B,oCA6B9Ca,GAC1BC,EAAAA,MAAKC,UACD,MAAMC,EAAmCC,KAAKC,MAAMC,OAAOC,eAAeC,QAAQ,kCAAoC,SAEtH,IACI,MAAMC,QAAkBT,IAGxB,OAFAM,OAAOC,eAAeG,QAAQ,gCAAiC,SAExDD,CACV,CAAC,MAAOE,GACL,IAAKR,EAID,OADAG,OAAOC,eAAeG,QAAQ,gCAAiC,QACxDJ,OAAOM,SAASC,SAM3B,MAAMF,CACT"}
@@ -1,2 +0,0 @@
1
- import{lazy as e}from"react";const t=e=>{const t=document.getElementById("flipdish-micro-frontend");return t?.getAttribute(e)},r=()=>import.meta.env.VITE_APPID_OVERRIDE||t("data-appId"),a=()=>import.meta.env.VITE_ORGID_OVERRIDE||t("data-orgId"),o=()=>import.meta.env.VITE_BRANDID_OVERRIDE||t("data-brandId"),n=()=>{const e=import.meta.env.VITE_ISFLIPDISHSTAFFOVERRIDE||t("data-isFlipdishStaff");return"true"===e?.toString()},s=t=>e((async()=>{const e=JSON.parse(window.sessionStorage.getItem("page-has-been-force-refreshed")||"false");try{const e=await t();return window.sessionStorage.setItem("page-has-been-force-refreshed","false"),e}catch(t){if(!e)return window.sessionStorage.setItem("page-has-been-force-refreshed","true"),window.location.reload();throw t}}));export{r as getAppId,o as getBrandId,n as getIsFlipdishStaff,t as getMicroFrontendAttribute,a as getOrgId,s as lazyWithRetry};
2
- //# sourceMappingURL=renderUtilities.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderUtilities.js","sources":["../../../src/components/renderUtilities/renderUtilities.ts"],"sourcesContent":["import { lazy } from 'react';\n\nexport const getMicroFrontendAttribute = (key: string): string | null => {\n const microFrontendDiv = document.getElementById('flipdish-micro-frontend');\n return microFrontendDiv?.getAttribute(key);\n};\n\n/**\n * Retrieves the AppId.\n *\n * Attempts to get the value from the environment variable `VITE_APPID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-appId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getAppId = (): string | null => {\n return import.meta.env.VITE_APPID_OVERRIDE || getMicroFrontendAttribute('data-appId');\n};\n\n/**\n * Retrieves the OrgId.\n *\n * Attempts to get the value from the environment variable `VITE_ORGID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-orgId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getOrgId = (): string | null => {\n return import.meta.env.VITE_ORGID_OVERRIDE || getMicroFrontendAttribute('data-orgId');\n};\n\n/**\n * Retrieves the BrandId.\n *\n * Attempts to get the value from the environment variable `VITE_BRANDID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-brandId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getBrandId = (): string | null => {\n return import.meta.env.VITE_BRANDID_OVERRIDE || getMicroFrontendAttribute('data-brandId');\n};\n\n/**\n * Retrieves the isFlipdishStaff attribute.\n *\n * Attempts to get the value from the environment variable `VITE_ISFLIPDISHSTAFFOVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-isFlipdishStaff`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getIsFlipdishStaff = (): boolean => {\n const stringValue = import.meta.env.VITE_ISFLIPDISHSTAFFOVERRIDE || getMicroFrontendAttribute('data-isFlipdishStaff');\n return stringValue?.toString() === 'true';\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const lazyWithRetry = (componentImport: () => any) =>\n lazy(async () => {\n const pageHasAlreadyBeenForceRefreshed = JSON.parse(window.sessionStorage.getItem('page-has-been-force-refreshed') || 'false');\n\n try {\n const component = await componentImport();\n window.sessionStorage.setItem('page-has-been-force-refreshed', 'false');\n\n return component;\n } catch (error) {\n if (!pageHasAlreadyBeenForceRefreshed) {\n // Assuming that the user is not on the latest version of the application.\n // Let's refresh the page immediately.\n window.sessionStorage.setItem('page-has-been-force-refreshed', 'true');\n return window.location.reload();\n }\n\n // The page has already been reloaded\n // Assuming that user is already using the latest version of the application.\n // Let's let the application crash and raise the error.\n throw error;\n }\n });\n"],"names":["getMicroFrontendAttribute","key","microFrontendDiv","document","getElementById","getAttribute","getAppId","env","VITE_APPID_OVERRIDE","getOrgId","VITE_ORGID_OVERRIDE","getBrandId","VITE_BRANDID_OVERRIDE","getIsFlipdishStaff","stringValue","VITE_ISFLIPDISHSTAFFOVERRIDE","toString","lazyWithRetry","componentImport","lazy","async","pageHasAlreadyBeenForceRefreshed","JSON","parse","window","sessionStorage","getItem","component","setItem","error","location","reload"],"mappings":"6BAEa,MAAAA,EAA6BC,IACtC,MAAMC,EAAmBC,SAASC,eAAe,2BACjD,OAAOF,GAAkBG,aAAaJ,EAAI,EAWjCK,EAAW,gBACDC,IAAIC,qBAAuBR,EAA0B,cAW/DS,EAAW,gBACDF,IAAIG,qBAAuBV,EAA0B,cAW/DW,EAAa,gBACHJ,IAAIK,uBAAyBZ,EAA0B,gBAWjEa,EAAqB,KAC9B,MAAMC,cAA0BP,IAAIQ,8BAAgCf,EAA0B,wBAC9F,MAAmC,SAA5Bc,GAAaE,UAAqB,EAIhCC,EAAiBC,GAC1BC,GAAKC,UACD,MAAMC,EAAmCC,KAAKC,MAAMC,OAAOC,eAAeC,QAAQ,kCAAoC,SAEtH,IACI,MAAMC,QAAkBT,IAGxB,OAFAM,OAAOC,eAAeG,QAAQ,gCAAiC,SAExDD,CACV,CAAC,MAAOE,GACL,IAAKR,EAID,OADAG,OAAOC,eAAeG,QAAQ,gCAAiC,QACxDJ,OAAOM,SAASC,SAM3B,MAAMF,CACT"}
@@ -1,2 +0,0 @@
1
- "use strict";require("@mui/material/styles");var e=require("@mui/material/styles/createTheme");const o=e({typography:{body1:{fontFamily:"'Roboto', sans-serif"},body2:{fontFamily:"'Roboto', sans-serif"},h1:{fontFamily:"clarendon-text-pro,Domine,serif"},h2:{fontFamily:"clarendon-text-pro,Domine,serif"},h3:{fontFamily:"clarendon-text-pro,Domine,serif"},h4:{fontFamily:"clarendon-text-pro,Domine,serif"},h5:{fontFamily:"clarendon-text-pro,Domine,serif"},h6:{fontFamily:"clarendon-text-pro,Domine,serif"}},palette:{success:{main:"#20C26E",dark:"#137442",light:"#D2F3E2"},error:{main:"#CA0030",dark:"#79001D",light:"#FADBE2"},warning:{main:"#FFBC2C",dark:"#FF7A00",light:"#FFF2D5"}}}),t=e(o,{palette:{black:o.palette.augmentColor({color:{main:"#000000"},name:"black"}),white:o.palette.augmentColor({color:{main:"#ffffff"},name:"white"}),flippyBlue:o.palette.augmentColor({color:{main:"#0b75d7",light:"#e3f2fe"},name:"flippyBlue"}),freezerBurn:o.palette.augmentColor({color:{main:"#a5e2f6"},name:"freezerBurn"}),spricyCarrot:o.palette.augmentColor({color:{main:"#f7742b"},name:"spricyCarrot"}),pebble:o.palette.augmentColor({color:{main:"#eeebe3"},name:"pebble"}),donutPanic:o.palette.augmentColor({color:{main:"#ffbae4"},name:"donutPanic"}),eletricLime:o.palette.augmentColor({color:{main:"#cff27d"},name:"eletricLime"}),pending:o.palette.augmentColor({color:{main:"#DEACFA",dark:"#A56AC6",light:"#FCF7FE"},name:"pending"}),alternateBackground:o.palette.augmentColor({color:{main:"#F7F7F7"},name:"alternateBackground"})}});var r=e(t,{palette:{primary:{main:t.palette.flippyBlue.main},secondary:{main:t.palette.spricyCarrot.main}},shape:{borderRadius:"4px"},components:{MuiButton:{styleOverrides:{root:{padding:"12px 24px",textTransform:"none"}}},MuiCard:{styleOverrides:{root:{boxShadow:"none",borderWidth:"1px",borderStyle:"solid",borderColor:t.palette.divider}}},MuiChip:{styleOverrides:{root:{fontWeight:"bold",paddingLeft:"6px",paddingRight:"6px"}}},MuiListItemButton:{styleOverrides:{root:{"&:hover":{backgroundColor:"#eaf2ff"},"&:not(:last-child)":{borderBottom:`1px solid ${t.palette.divider}`}}}},MuiTableRow:{styleOverrides:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:t.palette.flippyBlue.light,cursor:"pointer"}}}}}});module.exports=r;
2
- //# sourceMappingURL=flipdishPublicTheme.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flipdishPublicTheme.cjs.js","sources":["../../../src/components/themes/flipdishPublicTheme.ts"],"sourcesContent":["import { type Breakpoint } from '@mui/material/styles';\nimport createTheme, { type ThemeOptions } from '@mui/material/styles/createTheme';\n\n// Colours and fonts as per our brand guidelines\nconst fontTheme = createTheme({\n typography: {\n body1: {\n fontFamily: \"'Roboto', sans-serif\",\n },\n body2: {\n fontFamily: \"'Roboto', sans-serif\",\n },\n h1: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h2: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h3: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h4: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h5: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h6: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n },\n palette: {\n success: {\n main: '#20C26E',\n dark: '#137442',\n light: '#D2F3E2',\n },\n error: {\n main: '#CA0030',\n dark: '#79001D',\n light: '#FADBE2',\n },\n warning: {\n main: '#FFBC2C',\n dark: '#FF7A00',\n light: '#FFF2D5',\n },\n },\n});\n\nconst theme = createTheme(fontTheme as ThemeOptions, {\n palette: {\n // Primary\n black: fontTheme.palette.augmentColor({\n color: {\n main: '#000000',\n },\n name: 'black',\n }),\n white: fontTheme.palette.augmentColor({\n color: {\n main: '#ffffff',\n },\n name: 'white',\n }),\n flippyBlue: fontTheme.palette.augmentColor({\n color: {\n main: '#0b75d7',\n light: '#e3f2fe',\n },\n name: 'flippyBlue',\n }),\n // Core\n freezerBurn: fontTheme.palette.augmentColor({\n color: {\n main: '#a5e2f6',\n },\n name: 'freezerBurn',\n }),\n spricyCarrot: fontTheme.palette.augmentColor({\n color: {\n main: '#f7742b',\n },\n name: 'spricyCarrot',\n }),\n pebble: fontTheme.palette.augmentColor({\n color: {\n main: '#eeebe3',\n },\n name: 'pebble',\n }),\n // Secondary\n donutPanic: fontTheme.palette.augmentColor({\n color: {\n main: '#ffbae4',\n },\n name: 'donutPanic',\n }),\n eletricLime: fontTheme.palette.augmentColor({\n color: {\n main: '#cff27d',\n },\n name: 'eletricLime',\n }),\n pending: fontTheme.palette.augmentColor({\n color: {\n main: '#DEACFA',\n dark: '#A56AC6',\n light: '#FCF7FE',\n },\n name: 'pending',\n }),\n alternateBackground: fontTheme.palette.augmentColor({\n color: {\n main: '#F7F7F7',\n },\n name: 'alternateBackground',\n }),\n },\n});\n\nexport default createTheme(theme as ThemeOptions, {\n palette: {\n primary: {\n main: theme.palette.flippyBlue.main,\n },\n secondary: {\n main: theme.palette.spricyCarrot.main,\n },\n },\n shape: {\n borderRadius: '4px',\n },\n components: {\n MuiButton: {\n styleOverrides: {\n root: {\n padding: '12px 24px',\n textTransform: 'none',\n },\n },\n },\n MuiCard: {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: theme.palette.divider,\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n fontWeight: 'bold',\n paddingLeft: '6px',\n paddingRight: '6px',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:not(:last-child)': {\n borderBottom: `1px solid ${theme.palette.divider}`,\n },\n },\n },\n },\n MuiTableRow: {\n styleOverrides: {\n root: {\n '&.MuiTableRow-hover:hover': {\n backgroundColor: theme.palette.flippyBlue.light,\n cursor: 'pointer',\n },\n },\n },\n },\n },\n});\n\ndeclare module '@mui/material/styles' {\n interface Palette {\n black: Palette['primary'];\n white: Palette['primary'];\n flippyBlue: Palette['primary'];\n freezerBurn: Palette['primary'];\n spricyCarrot: Palette['primary'];\n pebble: Palette['primary'];\n donutPanic: Palette['primary'];\n eletricLime: Palette['primary'];\n pending: Palette['primary'];\n alternateBackground: Palette['primary'];\n }\n interface Theme {\n breakpoints: {\n up: (key: number | Breakpoint) => string;\n down: (key: number | Breakpoint) => string;\n only: (key: number | Breakpoint) => string;\n };\n }\n}\n"],"names":["fontTheme","createTheme","typography","body1","fontFamily","body2","h1","h2","h3","h4","h5","h6","palette","success","main","dark","light","error","warning","theme","black","augmentColor","color","name","white","flippyBlue","freezerBurn","spricyCarrot","pebble","donutPanic","eletricLime","pending","alternateBackground","flipdishPublicTheme","primary","secondary","shape","borderRadius","components","MuiButton","styleOverrides","root","padding","textTransform","MuiCard","boxShadow","borderWidth","borderStyle","borderColor","divider","MuiChip","fontWeight","paddingLeft","paddingRight","MuiListItemButton","backgroundColor","borderBottom","MuiTableRow","cursor"],"mappings":"+FAIA,MAAMA,EAAYC,EAAY,CAC1BC,WAAY,CACRC,MAAO,CACHC,WAAY,wBAEhBC,MAAO,CACHD,WAAY,wBAEhBE,GAAI,CACAF,WAAY,mCAEhBG,GAAI,CACAH,WAAY,mCAEhBI,GAAI,CACAJ,WAAY,mCAEhBK,GAAI,CACAL,WAAY,mCAEhBM,GAAI,CACAN,WAAY,mCAEhBO,GAAI,CACAP,WAAY,oCAGpBQ,QAAS,CACLC,QAAS,CACLC,KAAM,UACNC,KAAM,UACNC,MAAO,WAEXC,MAAO,CACHH,KAAM,UACNC,KAAM,UACNC,MAAO,WAEXE,QAAS,CACLJ,KAAM,UACNC,KAAM,UACNC,MAAO,cAKbG,EAAQlB,EAAYD,EAA2B,CACjDY,QAAS,CAELQ,MAAOpB,EAAUY,QAAQS,aAAa,CAClCC,MAAO,CACHR,KAAM,WAEVS,KAAM,UAEVC,MAAOxB,EAAUY,QAAQS,aAAa,CAClCC,MAAO,CACHR,KAAM,WAEVS,KAAM,UAEVE,WAAYzB,EAAUY,QAAQS,aAAa,CACvCC,MAAO,CACHR,KAAM,UACNE,MAAO,WAEXO,KAAM,eAGVG,YAAa1B,EAAUY,QAAQS,aAAa,CACxCC,MAAO,CACHR,KAAM,WAEVS,KAAM,gBAEVI,aAAc3B,EAAUY,QAAQS,aAAa,CACzCC,MAAO,CACHR,KAAM,WAEVS,KAAM,iBAEVK,OAAQ5B,EAAUY,QAAQS,aAAa,CACnCC,MAAO,CACHR,KAAM,WAEVS,KAAM,WAGVM,WAAY7B,EAAUY,QAAQS,aAAa,CACvCC,MAAO,CACHR,KAAM,WAEVS,KAAM,eAEVO,YAAa9B,EAAUY,QAAQS,aAAa,CACxCC,MAAO,CACHR,KAAM,WAEVS,KAAM,gBAEVQ,QAAS/B,EAAUY,QAAQS,aAAa,CACpCC,MAAO,CACHR,KAAM,UACNC,KAAM,UACNC,MAAO,WAEXO,KAAM,YAEVS,oBAAqBhC,EAAUY,QAAQS,aAAa,CAChDC,MAAO,CACHR,KAAM,WAEVS,KAAM,2BAKlB,IAAeU,EAAAhC,EAAYkB,EAAuB,CAC9CP,QAAS,CACLsB,QAAS,CACLpB,KAAMK,EAAMP,QAAQa,WAAWX,MAEnCqB,UAAW,CACPrB,KAAMK,EAAMP,QAAQe,aAAab,OAGzCsB,MAAO,CACHC,aAAc,OAElBC,WAAY,CACRC,UAAW,CACPC,eAAgB,CACZC,KAAM,CACFC,QAAS,YACTC,cAAe,UAI3BC,QAAS,CACLJ,eAAgB,CACZC,KAAM,CACFI,UAAW,OACXC,YAAa,MACbC,YAAa,QACbC,YAAa7B,EAAMP,QAAQqC,WAIvCC,QAAS,CACLV,eAAgB,CACZC,KAAM,CACFU,WAAY,OACZC,YAAa,MACbC,aAAc,SAI1BC,kBAAmB,CACfd,eAAgB,CACZC,KAAM,CACF,UAAW,CACPc,gBAAiB,WAErB,qBAAsB,CAClBC,aAAc,aAAarC,EAAMP,QAAQqC,cAKzDQ,YAAa,CACTjB,eAAgB,CACZC,KAAM,CACF,4BAA6B,CACzBc,gBAAiBpC,EAAMP,QAAQa,WAAWT,MAC1C0C,OAAQ"}
@@ -1,28 +0,0 @@
1
- import * as _mui_material_styles from '@mui/material/styles';
2
- import { Breakpoint } from '@mui/material/styles';
3
-
4
- declare const _default: _mui_material_styles.Theme;
5
-
6
- declare module '@mui/material/styles' {
7
- interface Palette {
8
- black: Palette['primary'];
9
- white: Palette['primary'];
10
- flippyBlue: Palette['primary'];
11
- freezerBurn: Palette['primary'];
12
- spricyCarrot: Palette['primary'];
13
- pebble: Palette['primary'];
14
- donutPanic: Palette['primary'];
15
- eletricLime: Palette['primary'];
16
- pending: Palette['primary'];
17
- alternateBackground: Palette['primary'];
18
- }
19
- interface Theme {
20
- breakpoints: {
21
- up: (key: number | Breakpoint) => string;
22
- down: (key: number | Breakpoint) => string;
23
- only: (key: number | Breakpoint) => string;
24
- };
25
- }
26
- }
27
-
28
- export { _default as default };
@@ -1,2 +0,0 @@
1
- import"@mui/material/styles";import e from"@mui/material/styles/createTheme";const o=e({typography:{body1:{fontFamily:"'Roboto', sans-serif"},body2:{fontFamily:"'Roboto', sans-serif"},h1:{fontFamily:"clarendon-text-pro,Domine,serif"},h2:{fontFamily:"clarendon-text-pro,Domine,serif"},h3:{fontFamily:"clarendon-text-pro,Domine,serif"},h4:{fontFamily:"clarendon-text-pro,Domine,serif"},h5:{fontFamily:"clarendon-text-pro,Domine,serif"},h6:{fontFamily:"clarendon-text-pro,Domine,serif"}},palette:{success:{main:"#20C26E",dark:"#137442",light:"#D2F3E2"},error:{main:"#CA0030",dark:"#79001D",light:"#FADBE2"},warning:{main:"#FFBC2C",dark:"#FF7A00",light:"#FFF2D5"}}}),t=e(o,{palette:{black:o.palette.augmentColor({color:{main:"#000000"},name:"black"}),white:o.palette.augmentColor({color:{main:"#ffffff"},name:"white"}),flippyBlue:o.palette.augmentColor({color:{main:"#0b75d7",light:"#e3f2fe"},name:"flippyBlue"}),freezerBurn:o.palette.augmentColor({color:{main:"#a5e2f6"},name:"freezerBurn"}),spricyCarrot:o.palette.augmentColor({color:{main:"#f7742b"},name:"spricyCarrot"}),pebble:o.palette.augmentColor({color:{main:"#eeebe3"},name:"pebble"}),donutPanic:o.palette.augmentColor({color:{main:"#ffbae4"},name:"donutPanic"}),eletricLime:o.palette.augmentColor({color:{main:"#cff27d"},name:"eletricLime"}),pending:o.palette.augmentColor({color:{main:"#DEACFA",dark:"#A56AC6",light:"#FCF7FE"},name:"pending"}),alternateBackground:o.palette.augmentColor({color:{main:"#F7F7F7"},name:"alternateBackground"})}});var r=e(t,{palette:{primary:{main:t.palette.flippyBlue.main},secondary:{main:t.palette.spricyCarrot.main}},shape:{borderRadius:"4px"},components:{MuiButton:{styleOverrides:{root:{padding:"12px 24px",textTransform:"none"}}},MuiCard:{styleOverrides:{root:{boxShadow:"none",borderWidth:"1px",borderStyle:"solid",borderColor:t.palette.divider}}},MuiChip:{styleOverrides:{root:{fontWeight:"bold",paddingLeft:"6px",paddingRight:"6px"}}},MuiListItemButton:{styleOverrides:{root:{"&:hover":{backgroundColor:"#eaf2ff"},"&:not(:last-child)":{borderBottom:`1px solid ${t.palette.divider}`}}}},MuiTableRow:{styleOverrides:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:t.palette.flippyBlue.light,cursor:"pointer"}}}}}});export{r as default};
2
- //# sourceMappingURL=flipdishPublicTheme.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flipdishPublicTheme.js","sources":["../../../src/components/themes/flipdishPublicTheme.ts"],"sourcesContent":["import { type Breakpoint } from '@mui/material/styles';\nimport createTheme, { type ThemeOptions } from '@mui/material/styles/createTheme';\n\n// Colours and fonts as per our brand guidelines\nconst fontTheme = createTheme({\n typography: {\n body1: {\n fontFamily: \"'Roboto', sans-serif\",\n },\n body2: {\n fontFamily: \"'Roboto', sans-serif\",\n },\n h1: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h2: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h3: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h4: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h5: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n h6: {\n fontFamily: 'clarendon-text-pro,Domine,serif',\n },\n },\n palette: {\n success: {\n main: '#20C26E',\n dark: '#137442',\n light: '#D2F3E2',\n },\n error: {\n main: '#CA0030',\n dark: '#79001D',\n light: '#FADBE2',\n },\n warning: {\n main: '#FFBC2C',\n dark: '#FF7A00',\n light: '#FFF2D5',\n },\n },\n});\n\nconst theme = createTheme(fontTheme as ThemeOptions, {\n palette: {\n // Primary\n black: fontTheme.palette.augmentColor({\n color: {\n main: '#000000',\n },\n name: 'black',\n }),\n white: fontTheme.palette.augmentColor({\n color: {\n main: '#ffffff',\n },\n name: 'white',\n }),\n flippyBlue: fontTheme.palette.augmentColor({\n color: {\n main: '#0b75d7',\n light: '#e3f2fe',\n },\n name: 'flippyBlue',\n }),\n // Core\n freezerBurn: fontTheme.palette.augmentColor({\n color: {\n main: '#a5e2f6',\n },\n name: 'freezerBurn',\n }),\n spricyCarrot: fontTheme.palette.augmentColor({\n color: {\n main: '#f7742b',\n },\n name: 'spricyCarrot',\n }),\n pebble: fontTheme.palette.augmentColor({\n color: {\n main: '#eeebe3',\n },\n name: 'pebble',\n }),\n // Secondary\n donutPanic: fontTheme.palette.augmentColor({\n color: {\n main: '#ffbae4',\n },\n name: 'donutPanic',\n }),\n eletricLime: fontTheme.palette.augmentColor({\n color: {\n main: '#cff27d',\n },\n name: 'eletricLime',\n }),\n pending: fontTheme.palette.augmentColor({\n color: {\n main: '#DEACFA',\n dark: '#A56AC6',\n light: '#FCF7FE',\n },\n name: 'pending',\n }),\n alternateBackground: fontTheme.palette.augmentColor({\n color: {\n main: '#F7F7F7',\n },\n name: 'alternateBackground',\n }),\n },\n});\n\nexport default createTheme(theme as ThemeOptions, {\n palette: {\n primary: {\n main: theme.palette.flippyBlue.main,\n },\n secondary: {\n main: theme.palette.spricyCarrot.main,\n },\n },\n shape: {\n borderRadius: '4px',\n },\n components: {\n MuiButton: {\n styleOverrides: {\n root: {\n padding: '12px 24px',\n textTransform: 'none',\n },\n },\n },\n MuiCard: {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: theme.palette.divider,\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n fontWeight: 'bold',\n paddingLeft: '6px',\n paddingRight: '6px',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n '&:hover': {\n backgroundColor: '#eaf2ff',\n },\n '&:not(:last-child)': {\n borderBottom: `1px solid ${theme.palette.divider}`,\n },\n },\n },\n },\n MuiTableRow: {\n styleOverrides: {\n root: {\n '&.MuiTableRow-hover:hover': {\n backgroundColor: theme.palette.flippyBlue.light,\n cursor: 'pointer',\n },\n },\n },\n },\n },\n});\n\ndeclare module '@mui/material/styles' {\n interface Palette {\n black: Palette['primary'];\n white: Palette['primary'];\n flippyBlue: Palette['primary'];\n freezerBurn: Palette['primary'];\n spricyCarrot: Palette['primary'];\n pebble: Palette['primary'];\n donutPanic: Palette['primary'];\n eletricLime: Palette['primary'];\n pending: Palette['primary'];\n alternateBackground: Palette['primary'];\n }\n interface Theme {\n breakpoints: {\n up: (key: number | Breakpoint) => string;\n down: (key: number | Breakpoint) => string;\n only: (key: number | Breakpoint) => string;\n };\n }\n}\n"],"names":["fontTheme","createTheme","typography","body1","fontFamily","body2","h1","h2","h3","h4","h5","h6","palette","success","main","dark","light","error","warning","theme","black","augmentColor","color","name","white","flippyBlue","freezerBurn","spricyCarrot","pebble","donutPanic","eletricLime","pending","alternateBackground","flipdishPublicTheme","primary","secondary","shape","borderRadius","components","MuiButton","styleOverrides","root","padding","textTransform","MuiCard","boxShadow","borderWidth","borderStyle","borderColor","divider","MuiChip","fontWeight","paddingLeft","paddingRight","MuiListItemButton","backgroundColor","borderBottom","MuiTableRow","cursor"],"mappings":"6EAIA,MAAMA,EAAYC,EAAY,CAC1BC,WAAY,CACRC,MAAO,CACHC,WAAY,wBAEhBC,MAAO,CACHD,WAAY,wBAEhBE,GAAI,CACAF,WAAY,mCAEhBG,GAAI,CACAH,WAAY,mCAEhBI,GAAI,CACAJ,WAAY,mCAEhBK,GAAI,CACAL,WAAY,mCAEhBM,GAAI,CACAN,WAAY,mCAEhBO,GAAI,CACAP,WAAY,oCAGpBQ,QAAS,CACLC,QAAS,CACLC,KAAM,UACNC,KAAM,UACNC,MAAO,WAEXC,MAAO,CACHH,KAAM,UACNC,KAAM,UACNC,MAAO,WAEXE,QAAS,CACLJ,KAAM,UACNC,KAAM,UACNC,MAAO,cAKbG,EAAQlB,EAAYD,EAA2B,CACjDY,QAAS,CAELQ,MAAOpB,EAAUY,QAAQS,aAAa,CAClCC,MAAO,CACHR,KAAM,WAEVS,KAAM,UAEVC,MAAOxB,EAAUY,QAAQS,aAAa,CAClCC,MAAO,CACHR,KAAM,WAEVS,KAAM,UAEVE,WAAYzB,EAAUY,QAAQS,aAAa,CACvCC,MAAO,CACHR,KAAM,UACNE,MAAO,WAEXO,KAAM,eAGVG,YAAa1B,EAAUY,QAAQS,aAAa,CACxCC,MAAO,CACHR,KAAM,WAEVS,KAAM,gBAEVI,aAAc3B,EAAUY,QAAQS,aAAa,CACzCC,MAAO,CACHR,KAAM,WAEVS,KAAM,iBAEVK,OAAQ5B,EAAUY,QAAQS,aAAa,CACnCC,MAAO,CACHR,KAAM,WAEVS,KAAM,WAGVM,WAAY7B,EAAUY,QAAQS,aAAa,CACvCC,MAAO,CACHR,KAAM,WAEVS,KAAM,eAEVO,YAAa9B,EAAUY,QAAQS,aAAa,CACxCC,MAAO,CACHR,KAAM,WAEVS,KAAM,gBAEVQ,QAAS/B,EAAUY,QAAQS,aAAa,CACpCC,MAAO,CACHR,KAAM,UACNC,KAAM,UACNC,MAAO,WAEXO,KAAM,YAEVS,oBAAqBhC,EAAUY,QAAQS,aAAa,CAChDC,MAAO,CACHR,KAAM,WAEVS,KAAM,2BAKlB,IAAeU,EAAAhC,EAAYkB,EAAuB,CAC9CP,QAAS,CACLsB,QAAS,CACLpB,KAAMK,EAAMP,QAAQa,WAAWX,MAEnCqB,UAAW,CACPrB,KAAMK,EAAMP,QAAQe,aAAab,OAGzCsB,MAAO,CACHC,aAAc,OAElBC,WAAY,CACRC,UAAW,CACPC,eAAgB,CACZC,KAAM,CACFC,QAAS,YACTC,cAAe,UAI3BC,QAAS,CACLJ,eAAgB,CACZC,KAAM,CACFI,UAAW,OACXC,YAAa,MACbC,YAAa,QACbC,YAAa7B,EAAMP,QAAQqC,WAIvCC,QAAS,CACLV,eAAgB,CACZC,KAAM,CACFU,WAAY,OACZC,YAAa,MACbC,aAAc,SAI1BC,kBAAmB,CACfd,eAAgB,CACZC,KAAM,CACF,UAAW,CACPc,gBAAiB,WAErB,qBAAsB,CAClBC,aAAc,aAAarC,EAAMP,QAAQqC,cAKzDQ,YAAa,CACTjB,eAAgB,CACZC,KAAM,CACF,4BAA6B,CACzBc,gBAAiBpC,EAAMP,QAAQa,WAAWT,MAC1C0C,OAAQ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Chip.cjs.js","sources":["../../../../src/components/ui/Chip/Chip.tsx"],"sourcesContent":["import MuiChip, { type ChipProps as MuiChipProps } from '@mui/material/Chip';\nimport { styled, type Theme } from '@mui/material/styles';\n\nexport const CHIP_COLORS = ['default', 'blue', 'success', 'warning', 'error'] as const;\nexport type ChipColor = (typeof CHIP_COLORS)[number];\n\nexport const CHIP_VARIANTS = ['filled', 'outlined'] as const;\nexport type ChipVariant = (typeof CHIP_VARIANTS)[number];\n\nexport type ChipProps = {\n label: string;\n color?: ChipColor;\n size?: MuiChipProps['size'];\n variant?: ChipVariant;\n icon?: MuiChipProps['icon'];\n rounded?: boolean;\n};\n\ntype StyledChipProps = {\n colour: ChipColor;\n rounded: boolean;\n variant?: ChipVariant;\n};\n\nconst getColorStyles = (colour: ChipColor, theme: Theme, variant: ChipVariant) => {\n const colorMap = {\n blue: {\n filled: {\n backgroundColor: theme.palette.flippyBlue.light,\n color: theme.palette.flippyBlue.dark,\n },\n outlined: {\n borderColor: theme.palette.flippyBlue.dark,\n color: theme.palette.flippyBlue.dark,\n },\n },\n success: {\n filled: {\n backgroundColor: theme.palette.success.light,\n color: theme.palette.success.dark,\n },\n outlined: {\n borderColor: theme.palette.success.main,\n color: theme.palette.success.main,\n },\n },\n warning: {\n filled: {\n backgroundColor: theme.palette.warning.light,\n color: theme.palette.warning.dark,\n },\n outlined: {\n borderColor: theme.palette.warning.main,\n color: theme.palette.warning.dark,\n },\n },\n error: {\n filled: {\n backgroundColor: theme.palette.error.light,\n color: theme.palette.error.dark,\n },\n outlined: {\n borderColor: theme.palette.error.main,\n color: theme.palette.error.main,\n },\n },\n default: {\n filled: {},\n outlined: {},\n },\n } satisfies Record<ChipColor, Record<ChipVariant, object>>;\n\n return colorMap[colour][variant];\n};\n\nconst StyledChip = styled(MuiChip, {\n shouldForwardProp: (prop) => prop !== 'colour' && prop !== 'rounded',\n})<StyledChipProps>(({ theme, colour, rounded, variant = CHIP_VARIANTS[0] }) => ({\n borderRadius: rounded ? '100px' : '5px',\n '& .MuiChip-icon': {\n color: 'inherit',\n },\n ...getColorStyles(colour, theme, variant),\n}));\n\nconst Chip = ({ label, color = 'default', size = 'medium', variant = 'filled', icon, rounded = true }: ChipProps) => (\n <StyledChip icon={icon} label={label} colour={color} size={size} variant={variant} rounded={rounded} />\n);\n\nexport default Chip;\n"],"names":["CHIP_VARIANTS","getColorStyles","colour","theme","variant","blue","filled","backgroundColor","palette","flippyBlue","light","color","dark","outlined","borderColor","success","main","warning","error","default","StyledChip","styled","MuiChip","shouldForwardProp","prop","rounded","borderRadius","label","size","icon","_jsx"],"mappings":"+KAMaA,EAAgB,CAAC,SAAU,YAkBlCC,EAAiB,CAACC,EAAmBC,EAAcC,KACpC,CACbC,KAAM,CACFC,OAAQ,CACJC,gBAAiBJ,EAAMK,QAAQC,WAAWC,MAC1CC,MAAOR,EAAMK,QAAQC,WAAWG,MAEpCC,SAAU,CACNC,YAAaX,EAAMK,QAAQC,WAAWG,KACtCD,MAAOR,EAAMK,QAAQC,WAAWG,OAGxCG,QAAS,CACLT,OAAQ,CACJC,gBAAiBJ,EAAMK,QAAQO,QAAQL,MACvCC,MAAOR,EAAMK,QAAQO,QAAQH,MAEjCC,SAAU,CACNC,YAAaX,EAAMK,QAAQO,QAAQC,KACnCL,MAAOR,EAAMK,QAAQO,QAAQC,OAGrCC,QAAS,CACLX,OAAQ,CACJC,gBAAiBJ,EAAMK,QAAQS,QAAQP,MACvCC,MAAOR,EAAMK,QAAQS,QAAQL,MAEjCC,SAAU,CACNC,YAAaX,EAAMK,QAAQS,QAAQD,KACnCL,MAAOR,EAAMK,QAAQS,QAAQL,OAGrCM,MAAO,CACHZ,OAAQ,CACJC,gBAAiBJ,EAAMK,QAAQU,MAAMR,MACrCC,MAAOR,EAAMK,QAAQU,MAAMN,MAE/BC,SAAU,CACNC,YAAaX,EAAMK,QAAQU,MAAMF,KACjCL,MAAOR,EAAMK,QAAQU,MAAMF,OAGnCG,QAAS,CACLb,OAAQ,CAAE,EACVO,SAAU,CAAE,IAIJX,GAAQE,IAGtBgB,EAAaC,EAAMA,OAACC,EAAS,CAC/BC,kBAAoBC,GAAkB,WAATA,GAA8B,YAATA,GADnCH,EAEC,EAAGlB,QAAOD,SAAQuB,UAASrB,UAAUJ,EAAc,OAAU,CAC7E0B,aAAcD,EAAU,QAAU,MAClC,kBAAmB,CACfd,MAAO,cAERV,EAAeC,EAAQC,EAAOC,+CAGxB,EAAGuB,QAAOhB,QAAQ,UAAWiB,OAAO,SAAUxB,UAAU,SAAUyB,OAAMJ,WAAU,KAC3FK,MAACV,EAAU,CAACS,KAAMA,EAAMF,MAAOA,EAAOzB,OAAQS,EAAOiB,KAAMA,EAAMxB,QAASA,EAASqB,QAASA"}
@@ -1,2 +0,0 @@
1
- import{jsx as e}from"react/jsx-runtime";import r from"@mui/material/Chip";import{styled as l}from"@mui/material/styles";const o=["filled","outlined"],t=(e,r,l)=>({blue:{filled:{backgroundColor:r.palette.flippyBlue.light,color:r.palette.flippyBlue.dark},outlined:{borderColor:r.palette.flippyBlue.dark,color:r.palette.flippyBlue.dark}},success:{filled:{backgroundColor:r.palette.success.light,color:r.palette.success.dark},outlined:{borderColor:r.palette.success.main,color:r.palette.success.main}},warning:{filled:{backgroundColor:r.palette.warning.light,color:r.palette.warning.dark},outlined:{borderColor:r.palette.warning.main,color:r.palette.warning.dark}},error:{filled:{backgroundColor:r.palette.error.light,color:r.palette.error.dark},outlined:{borderColor:r.palette.error.main,color:r.palette.error.main}},default:{filled:{},outlined:{}}}[e][l]),a=l(r,{shouldForwardProp:e=>"colour"!==e&&"rounded"!==e})((({theme:e,colour:r,rounded:l,variant:a=o[0]})=>({borderRadius:l?"100px":"5px","& .MuiChip-icon":{color:"inherit"},...t(r,e,a)}))),i=({label:r,color:l="default",size:o="medium",variant:t="filled",icon:i,rounded:d=!0})=>e(a,{icon:i,label:r,colour:l,size:o,variant:t,rounded:d});export{o as CHIP_VARIANTS,i as default};
2
- //# sourceMappingURL=Chip.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DateTimeLocalizationProvider.cjs.js","sources":["../../../../src/components/ui/DateTimeLocalizationProvider/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":["children","_jsx","LocalizationProvider","dateAdapter","AdapterMoment"],"mappings":"yLAIqC,EAAGA,cAC7BC,EAAAA,IAACC,EAAAA,qBAAqB,CAAAC,YAAaC,EAAAA,cAAaJ,SAAGA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DateTimeLocalizationProvider.js","sources":["../../../../src/components/ui/DateTimeLocalizationProvider/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"}
@@ -1,2 +0,0 @@
1
- "use strict";var r=require("react/jsx-runtime"),e=require("react-error-boundary"),t=require("../../../providers/TranslationProvider.cjs.js");require("react");const n=require("@mui/material/styles").styled("div")((({theme:r})=>({marginTop:r.spacing(2),display:"flex",justifyContent:"center",alignItems:"center"}))),s=()=>{const{translate:e}=t.useTranslation();return r.jsx(n,{children:e("Something_went_wrong_please_refresh_the_page")})};module.exports=({identifier:t,children:n})=>r.jsx(e.ErrorBoundary,{FallbackComponent:s,onError:(r,e)=>{window.fdlogger?.error(`${t?.toString()} Error Boundary`,{message:r?.message,stack:e})},children:n});
2
- //# sourceMappingURL=FDErrorBoundary.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FDErrorBoundary.cjs.js","sources":["../../../../src/components/ui/FDErrorBoundary/FDErrorBoundary.tsx"],"sourcesContent":["import { ErrorBoundary } from 'react-error-boundary';\nimport { useTranslation } from '../../../providers/TranslationProvider';\nimport { type ReactNode } from 'react';\nimport { styled } from '@mui/material/styles';\n\nconst StyledTextContainer = styled('div')(({ theme }) => ({\n marginTop: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n}));\n\nconst FallbackComponent = () => {\n const { translate } = useTranslation();\n return <StyledTextContainer>{translate('Something_went_wrong_please_refresh_the_page')}</StyledTextContainer>;\n};\n\nconst FDErrorBoundary = ({ identifier, children }: { identifier: string; children: ReactNode }) => {\n return (\n <ErrorBoundary\n FallbackComponent={FallbackComponent}\n onError={(error, info) => {\n window.fdlogger?.error(`${identifier?.toString()} Error Boundary`, {\n message: error?.message,\n stack: info,\n });\n }}\n >\n {children}\n </ErrorBoundary>\n );\n};\n\nexport default FDErrorBoundary;\n"],"names":["StyledTextContainer","styled","theme","marginTop","spacing","display","justifyContent","alignItems","FallbackComponent","translate","useTranslation","_jsx","children","identifier","jsx","ErrorBoundary","onError","error","info","window","fdlogger","toString","message","stack"],"mappings":"8JAKA,MAAMA,kCAAsBC,OAAO,MAAPA,EAAc,EAAGC,YAAa,CACtDC,UAAWD,EAAME,QAAQ,GACzBC,QAAS,OACTC,eAAgB,SAChBC,WAAY,aAGVC,EAAoB,KACtB,MAAMC,UAAEA,GAAcC,EAAAA,iBACtB,OAAOC,EAAAA,IAACX,EAAqB,CAAAY,SAAAH,EAAU,iDAAsE,iBAGzF,EAAGI,aAAYD,cAE/BD,EAAAG,IAACC,EAAaA,cAAA,CACVP,kBAAmBA,EACnBQ,QAAS,CAACC,EAAOC,KACbC,OAAOC,UAAUH,MAAM,GAAGJ,GAAYQ,4BAA6B,CAC/DC,QAASL,GAAOK,QAChBC,MAAOL,GACT,EAGLN,SAAAA"}
@@ -1,2 +0,0 @@
1
- import{jsx as r}from"react/jsx-runtime";import{ErrorBoundary as e}from"react-error-boundary";import{useTranslation as t}from"../../../providers/TranslationProvider.js";import"react";import{styled as o}from"@mui/material/styles";const n=o("div")((({theme:r})=>({marginTop:r.spacing(2),display:"flex",justifyContent:"center",alignItems:"center"}))),i=()=>{const{translate:e}=t();return r(n,{children:e("Something_went_wrong_please_refresh_the_page")})},a=({identifier:t,children:o})=>r(e,{FallbackComponent:i,onError:(r,e)=>{window.fdlogger?.error(`${t?.toString()} Error Boundary`,{message:r?.message,stack:e})},children:o});export{a as default};
2
- //# sourceMappingURL=FDErrorBoundary.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FDErrorBoundary.js","sources":["../../../../src/components/ui/FDErrorBoundary/FDErrorBoundary.tsx"],"sourcesContent":["import { ErrorBoundary } from 'react-error-boundary';\nimport { useTranslation } from '../../../providers/TranslationProvider';\nimport { type ReactNode } from 'react';\nimport { styled } from '@mui/material/styles';\n\nconst StyledTextContainer = styled('div')(({ theme }) => ({\n marginTop: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n}));\n\nconst FallbackComponent = () => {\n const { translate } = useTranslation();\n return <StyledTextContainer>{translate('Something_went_wrong_please_refresh_the_page')}</StyledTextContainer>;\n};\n\nconst FDErrorBoundary = ({ identifier, children }: { identifier: string; children: ReactNode }) => {\n return (\n <ErrorBoundary\n FallbackComponent={FallbackComponent}\n onError={(error, info) => {\n window.fdlogger?.error(`${identifier?.toString()} Error Boundary`, {\n message: error?.message,\n stack: info,\n });\n }}\n >\n {children}\n </ErrorBoundary>\n );\n};\n\nexport default FDErrorBoundary;\n"],"names":["StyledTextContainer","styled","theme","marginTop","spacing","display","justifyContent","alignItems","FallbackComponent","translate","useTranslation","_jsx","children","FDErrorBoundary","identifier","ErrorBoundary","onError","error","info","window","fdlogger","toString","message","stack"],"mappings":"oOAKA,MAAMA,EAAsBC,EAAO,MAAPA,EAAc,EAAGC,YAAa,CACtDC,UAAWD,EAAME,QAAQ,GACzBC,QAAS,OACTC,eAAgB,SAChBC,WAAY,aAGVC,EAAoB,KACtB,MAAMC,UAAEA,GAAcC,IACtB,OAAOC,EAACX,EAAqB,CAAAY,SAAAH,EAAU,iDAAsE,EAG3GI,EAAkB,EAAGC,aAAYF,cAE/BD,EAACI,EAAa,CACVP,kBAAmBA,EACnBQ,QAAS,CAACC,EAAOC,KACbC,OAAOC,UAAUH,MAAM,GAAGH,GAAYO,4BAA6B,CAC/DC,QAASL,GAAOK,QAChBC,MAAOL,GACT,EAGLN,SAAAA"}
@@ -1,2 +0,0 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material/styles"),i=require("../../../assets/images/fd-loader.gif.cjs.js"),r=require("@mui/material/Typography");const l=t.styled("div")((({theme:e,fullscreen:t})=>({display:"flex",alignItems:"center",justifyContent:"center",background:e.palette.white.main,flexDirection:"column",...t&&{width:"100vw",height:"100vh",position:"absolute",top:0,left:0}}))),a=t.styled("div")((({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:"160px",height:"160px",borderRadius:"80px",background:e.palette.white.main,boxShadow:"0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 8px 10px 1px rgba(0, 0, 0, 0.14)",marginBottom:"32px"}))),s=t.styled("img")({height:"96px",width:"96px"}),n=t.styled(r)((({theme:e})=>({color:e.palette.flippyBlue.dark,lineHeight:"1.2",marginBottom:"4px"}))),o=t.styled(r)({fontSize:"20px",color:"rgba(0, 0, 0, 0.54)",lineHeight:"1.4",letterSpacing:"normal"});module.exports=({headline:t,subHeadline:r,fullscreen:d=!1})=>e.jsxs(l,{fullscreen:d,"data-testid":"FlipdishLogoLoader",children:[e.jsx(a,{children:e.jsx(s,{src:i,alt:"Flipdish Logo Loader"})}),e.jsx(n,{variant:"h2",children:t}),r&&e.jsx(o,{children:r})]});
2
- //# sourceMappingURL=FlipdishLogoLoader.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FlipdishLogoLoader.cjs.js","sources":["../../../../src/components/ui/FlipdishLogoLoader/FlipdishLogoLoader.tsx"],"sourcesContent":["import { styled } from '@mui/material/styles';\nimport FdLoader from '../../../assets/images/fd-loader.gif';\nimport Typography from '@mui/material/Typography';\n\nconst StyledContainer = styled('div')<{ fullscreen?: boolean }>(({ theme, fullscreen }) => ({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n background: theme.palette.white.main,\n flexDirection: 'column',\n ...(fullscreen && {\n width: '100vw',\n height: '100vh',\n position: 'absolute',\n top: 0,\n left: 0,\n }),\n}));\n\nconst ImageContainer = styled('div')(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '160px',\n height: '160px',\n borderRadius: '80px',\n background: theme.palette.white.main,\n boxShadow: '0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 8px 10px 1px rgba(0, 0, 0, 0.14)',\n marginBottom: '32px',\n}));\n\nconst StyledImage = styled('img')({\n height: '96px',\n width: '96px',\n});\n\nconst StyledHeadline = styled(Typography)(({ theme }) => ({\n color: theme.palette.flippyBlue.dark,\n lineHeight: '1.2',\n marginBottom: '4px',\n}));\n\nconst StyledSubHeadline = styled(Typography)({\n fontSize: '20px',\n color: 'rgba(0, 0, 0, 0.54)',\n lineHeight: '1.4',\n letterSpacing: 'normal',\n});\n\ntype FlipdishLogoLoaderProps = {\n headline: string;\n subHeadline?: string;\n fullscreen?: boolean;\n};\n\nconst FlipdishLogoLoader = ({ headline, subHeadline, fullscreen = false }: FlipdishLogoLoaderProps) => {\n return (\n <StyledContainer fullscreen={fullscreen} data-testid=\"FlipdishLogoLoader\">\n <ImageContainer>\n <StyledImage src={FdLoader} alt=\"Flipdish Logo Loader\" />\n </ImageContainer>\n <StyledHeadline variant=\"h2\">{headline}</StyledHeadline>\n {subHeadline && <StyledSubHeadline>{subHeadline}</StyledSubHeadline>}\n </StyledContainer>\n );\n};\n\nexport default FlipdishLogoLoader;\n"],"names":["StyledContainer","styled","theme","fullscreen","display","alignItems","justifyContent","background","palette","white","main","flexDirection","width","height","position","top","left","ImageContainer","borderRadius","boxShadow","marginBottom","StyledImage","StyledHeadline","Typography","color","flippyBlue","dark","lineHeight","StyledSubHeadline","fontSize","letterSpacing","headline","subHeadline","_jsxs","children","_jsx","src","FdLoader","alt","variant","jsx"],"mappings":"iLAIA,MAAMA,EAAkBC,EAAMA,OAAC,MAAPA,EAAwC,EAAGC,QAAOC,iBAAkB,CACxFC,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChBC,WAAYL,EAAMM,QAAQC,MAAMC,KAChCC,cAAe,YACXR,GAAc,CACdS,MAAO,QACPC,OAAQ,QACRC,SAAU,WACVC,IAAK,EACLC,KAAM,OAIRC,EAAiBhB,EAAAA,OAAO,MAAPA,EAAc,EAAGC,YAAa,CACjDE,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChBM,MAAO,QACPC,OAAQ,QACRK,aAAc,OACdX,WAAYL,EAAMM,QAAQC,MAAMC,KAChCS,UAAW,4GACXC,aAAc,WAGZC,EAAcpB,EAAAA,OAAO,MAAPA,CAAc,CAC9BY,OAAQ,OACRD,MAAO,SAGLU,EAAiBrB,EAAAA,OAAOsB,EAAPtB,EAAmB,EAAGC,YAAa,CACtDsB,MAAOtB,EAAMM,QAAQiB,WAAWC,KAChCC,WAAY,MACZP,aAAc,UAGZQ,EAAoB3B,EAAAA,OAAOsB,EAAPtB,CAAmB,CACzC4B,SAAU,OACVL,MAAO,sBACPG,WAAY,MACZG,cAAe,0BASQ,EAAGC,WAAUC,cAAa7B,cAAa,KAE1D8B,EAAAA,KAACjC,EAAe,CAACG,WAAYA,gBAAwB,qBAAoB+B,SAAA,CACrEC,EAAAA,IAAClB,EAAc,CAAAiB,SACXC,EAAAA,IAACd,EAAW,CAACe,IAAKC,EAAUC,IAAI,2BAEpCH,MAACb,GAAeiB,QAAQ,KAAML,SAAAH,IAC7BC,GAAeG,EAACK,IAAAZ,YAAmBI"}
@@ -1,2 +0,0 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{styled as i}from"@mui/material/styles";import r from"../../../assets/images/fd-loader.gif.js";import a from"@mui/material/Typography";const l=i("div")((({theme:e,fullscreen:t})=>({display:"flex",alignItems:"center",justifyContent:"center",background:e.palette.white.main,flexDirection:"column",...t&&{width:"100vw",height:"100vh",position:"absolute",top:0,left:0}}))),o=i("div")((({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:"160px",height:"160px",borderRadius:"80px",background:e.palette.white.main,boxShadow:"0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 8px 10px 1px rgba(0, 0, 0, 0.14)",marginBottom:"32px"}))),n=i("img")({height:"96px",width:"96px"}),p=i(a)((({theme:e})=>({color:e.palette.flippyBlue.dark,lineHeight:"1.2",marginBottom:"4px"}))),d=i(a)({fontSize:"20px",color:"rgba(0, 0, 0, 0.54)",lineHeight:"1.4",letterSpacing:"normal"}),m=({headline:i,subHeadline:a,fullscreen:m=!1})=>e(l,{fullscreen:m,"data-testid":"FlipdishLogoLoader",children:[t(o,{children:t(n,{src:r,alt:"Flipdish Logo Loader"})}),t(p,{variant:"h2",children:i}),a&&t(d,{children:a})]});export{m as default};
2
- //# sourceMappingURL=FlipdishLogoLoader.js.map