@gen-epix/ui-client-common 4.3.2 → 4.4.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 (361) hide show
  1. package/README.md +9 -10
  2. package/dist/@types/mui.d.ts +1 -1
  3. package/dist/_chunks/ApplicationFooter.js +49 -49
  4. package/dist/_chunks/ApplicationFooter.js.map +1 -1
  5. package/dist/_chunks/Breadcrumbs.js +23 -22
  6. package/dist/_chunks/Breadcrumbs.js.map +1 -1
  7. package/dist/_chunks/CrudPage.js +211 -210
  8. package/dist/_chunks/CrudPage.js.map +1 -1
  9. package/dist/_chunks/GeoFilter.js.map +1 -1
  10. package/dist/_chunks/Notifications.js +67 -66
  11. package/dist/_chunks/Notifications.js.map +1 -1
  12. package/dist/_chunks/OutageList.js +30 -30
  13. package/dist/_chunks/OutageList.js.map +1 -1
  14. package/dist/_chunks/OutageUtil.js +2 -2
  15. package/dist/_chunks/OutageUtil.js.map +1 -1
  16. package/dist/_chunks/QueryClientProvider.js +1 -1
  17. package/dist/_chunks/QueryClientProvider.js.map +1 -1
  18. package/dist/_chunks/QueryClientService.js +405 -115
  19. package/dist/_chunks/QueryClientService.js.map +1 -1
  20. package/dist/_chunks/Reflect.js +642 -0
  21. package/dist/_chunks/Reflect.js.map +1 -0
  22. package/dist/_chunks/Table.js +572 -574
  23. package/dist/_chunks/Table.js.map +1 -1
  24. package/dist/_chunks/TableUtil.js +5 -5
  25. package/dist/_chunks/TableUtil.js.map +1 -1
  26. package/dist/_chunks/TextFilter.js +1 -1
  27. package/dist/_chunks/TextFilter.js.map +1 -1
  28. package/dist/_chunks/UserInvitationsAdminPage.js +109 -107
  29. package/dist/_chunks/UserInvitationsAdminPage.js.map +1 -1
  30. package/dist/_chunks/UserManagerUtil.js +7 -15
  31. package/dist/_chunks/UserManagerUtil.js.map +1 -1
  32. package/dist/_chunks/_baseAssignValue.js.map +1 -1
  33. package/dist/_chunks/_baseFlatten.js +8 -8
  34. package/dist/_chunks/_baseFlatten.js.map +1 -1
  35. package/dist/_chunks/_baseUnset.js +299 -22
  36. package/dist/_chunks/_baseUnset.js.map +1 -1
  37. package/dist/_chunks/_cacheHas.js.map +1 -1
  38. package/dist/_chunks/_setToString.js.map +1 -1
  39. package/dist/_chunks/decorate.js +9 -0
  40. package/dist/_chunks/decorateParam.js +8 -0
  41. package/dist/_chunks/format.js.map +1 -1
  42. package/dist/_chunks/isArrayLike.js.map +1 -1
  43. package/dist/_chunks/isObject.js.map +1 -1
  44. package/dist/_chunks/isSymbol.js.map +1 -1
  45. package/dist/_chunks/middleware.js +1 -1
  46. package/dist/_chunks/middleware.js.map +1 -1
  47. package/dist/_chunks/omit.js +39 -40
  48. package/dist/_chunks/omit.js.map +1 -1
  49. package/dist/_chunks/query.js +13 -17
  50. package/dist/_chunks/query.js.map +1 -1
  51. package/dist/_chunks/react.js +1 -1
  52. package/dist/_chunks/react.js.map +1 -1
  53. package/dist/_chunks/tableStore.js +40 -54
  54. package/dist/_chunks/tableStore.js.map +1 -1
  55. package/dist/_chunks/toDate.js.map +1 -1
  56. package/dist/_chunks/useColumnsMenu.js +2 -2
  57. package/dist/_chunks/useColumnsMenu.js.map +1 -1
  58. package/dist/_chunks/useMutation.js +31 -30
  59. package/dist/_chunks/useMutation.js.map +1 -1
  60. package/dist/_chunks/useQueryMemo.js +5 -5
  61. package/dist/_chunks/useQueryMemo.js.map +1 -1
  62. package/dist/_chunks/vanilla.js +1 -1
  63. package/dist/_chunks/vanilla.js.map +1 -1
  64. package/dist/_chunks/yup.js +2 -2
  65. package/dist/_chunks/yup.js.map +1 -1
  66. package/dist/classes/TableEventBus/TableEventBus.d.ts +1 -1
  67. package/dist/classes/TableEventBus/index.js.map +1 -1
  68. package/dist/classes/abstracts/FilterAbstract/index.js.map +1 -1
  69. package/dist/classes/filters/BooleanFilter.d.ts +1 -1
  70. package/dist/classes/filters/DateFilter.d.ts +2 -2
  71. package/dist/classes/filters/GeoFilter.d.ts +2 -2
  72. package/dist/classes/filters/MultiSelectFilter.d.ts +2 -2
  73. package/dist/classes/filters/NumberRangeFilter.d.ts +1 -1
  74. package/dist/classes/filters/TextFilter.d.ts +1 -1
  75. package/dist/classes/services/AuthenticationService/AuthenticationService.d.ts +5 -3
  76. package/dist/classes/services/AuthenticationService/index.js +34 -661
  77. package/dist/classes/services/AuthenticationService/index.js.map +1 -1
  78. package/dist/classes/services/AuthorizationService/AuthorizationService.d.ts +4 -4
  79. package/dist/classes/services/AuthorizationService/index.js +12 -10
  80. package/dist/classes/services/AuthorizationService/index.js.map +1 -1
  81. package/dist/classes/services/BackendVersionService/BackendVersionService.d.ts +0 -3
  82. package/dist/classes/services/BackendVersionService/index.js +5 -8
  83. package/dist/classes/services/BackendVersionService/index.js.map +1 -1
  84. package/dist/classes/services/BreadcrumbService/BreadcrumbService.d.ts +1 -3
  85. package/dist/classes/services/BreadcrumbService/index.js +19 -21
  86. package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
  87. package/dist/classes/services/EmotionCacheService/EmotionCacheService.d.ts +4 -4
  88. package/dist/classes/services/EmotionCacheService/index.js +17 -14
  89. package/dist/classes/services/EmotionCacheService/index.js.map +1 -1
  90. package/dist/classes/services/FeatureFlagsService/FeatureFlagsService.d.ts +0 -3
  91. package/dist/classes/services/FeatureFlagsService/index.js +5 -8
  92. package/dist/classes/services/FeatureFlagsService/index.js.map +1 -1
  93. package/dist/classes/services/I18nService/I18nService.d.ts +3 -3
  94. package/dist/classes/services/I18nService/index.js +25 -29
  95. package/dist/classes/services/I18nService/index.js.map +1 -1
  96. package/dist/classes/services/InactivityService/InactivityService.d.ts +6 -3
  97. package/dist/classes/services/InactivityService/index.js +42 -36
  98. package/dist/classes/services/InactivityService/index.js.map +1 -1
  99. package/dist/classes/services/LogService/LogService.d.ts +7 -4
  100. package/dist/classes/services/LogService/index.js +39 -32
  101. package/dist/classes/services/LogService/index.js.map +1 -1
  102. package/dist/classes/services/NavigationHistoryService/NavigationHistoryService.d.ts +0 -3
  103. package/dist/classes/services/NavigationHistoryService/index.js +5 -8
  104. package/dist/classes/services/NavigationHistoryService/index.js.map +1 -1
  105. package/dist/classes/services/NotificationService/NotificationService.d.ts +4 -4
  106. package/dist/classes/services/NotificationService/index.js +21 -21
  107. package/dist/classes/services/NotificationService/index.js.map +1 -1
  108. package/dist/classes/services/PageEventBusService/PageEventBusService.d.ts +4 -3
  109. package/dist/classes/services/PageEventBusService/index.js +18 -15
  110. package/dist/classes/services/PageEventBusService/index.js.map +1 -1
  111. package/dist/classes/services/QueryClientService/QueryClientService.d.ts +6 -7
  112. package/dist/classes/services/QueryClientService/index.js +1 -2
  113. package/dist/classes/services/RouterService/RouterService.d.ts +6 -9
  114. package/dist/classes/services/RouterService/index.js +8 -12
  115. package/dist/classes/services/RouterService/index.js.map +1 -1
  116. package/dist/classes/services/UserSettingsService/UserSettingsService.d.ts +0 -3
  117. package/dist/classes/services/UserSettingsService/index.js +5 -8
  118. package/dist/classes/services/UserSettingsService/index.js.map +1 -1
  119. package/dist/components/app/App/App.d.ts +5 -1
  120. package/dist/components/app/App/index.js +31 -37
  121. package/dist/components/app/App/index.js.map +1 -1
  122. package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +50 -49
  123. package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -1
  124. package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +42 -41
  125. package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js.map +1 -1
  126. package/dist/components/app/AuthenticationWrapper/index.js +68 -67
  127. package/dist/components/app/AuthenticationWrapper/index.js.map +1 -1
  128. package/dist/components/app/AuthorizationWrapper/index.js +33 -32
  129. package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
  130. package/dist/components/app/RouterRoot/index.js +62 -61
  131. package/dist/components/app/RouterRoot/index.js.map +1 -1
  132. package/dist/components/epi/EpiContactDetailsDialog/index.js +38 -37
  133. package/dist/components/epi/EpiContactDetailsDialog/index.js.map +1 -1
  134. package/dist/components/filters/BooleanFilterField/index.js +5 -5
  135. package/dist/components/filters/BooleanFilterField/index.js.map +1 -1
  136. package/dist/components/filters/DateFilterField/index.js +3 -3
  137. package/dist/components/filters/DateFilterField/index.js.map +1 -1
  138. package/dist/components/filters/GeoFilterField/index.js +4 -4
  139. package/dist/components/filters/GeoFilterField/index.js.map +1 -1
  140. package/dist/components/filters/MultiSelectFilterField/index.js +4 -4
  141. package/dist/components/filters/MultiSelectFilterField/index.js.map +1 -1
  142. package/dist/components/filters/NumberRangeFilterField/index.js +3 -3
  143. package/dist/components/filters/NumberRangeFilterField/index.js.map +1 -1
  144. package/dist/components/filters/TextFilterField/index.js +3 -3
  145. package/dist/components/filters/TextFilterField/index.js.map +1 -1
  146. package/dist/components/ui/ApplicationBar/index.js +242 -241
  147. package/dist/components/ui/ApplicationBar/index.js.map +1 -1
  148. package/dist/components/ui/ApplicationFooter/index.js +1 -2
  149. package/dist/components/ui/Breadcrumbs/Breadcrumb.d.ts +1 -1
  150. package/dist/components/ui/Breadcrumbs/index.js +1 -2
  151. package/dist/components/ui/ConsentDialog/index.js +11 -6
  152. package/dist/components/ui/ConsentDialog/index.js.map +1 -1
  153. package/dist/components/ui/GenericErrorMessage/index.js +51 -50
  154. package/dist/components/ui/GenericErrorMessage/index.js.map +1 -1
  155. package/dist/components/ui/LicensesDialog/index.js +66 -69
  156. package/dist/components/ui/LicensesDialog/index.js.map +1 -1
  157. package/dist/components/ui/MyPermissionsDialog/index.js +26 -25
  158. package/dist/components/ui/MyPermissionsDialog/index.js.map +1 -1
  159. package/dist/components/ui/NavLink/index.js +6 -6
  160. package/dist/components/ui/NavLink/index.js.map +1 -1
  161. package/dist/components/ui/Notifications/NotificationItem.d.ts +1 -1
  162. package/dist/components/ui/Notifications/index.js +1 -2
  163. package/dist/components/ui/OrganizationSwitcherDialog/index.js +69 -76
  164. package/dist/components/ui/OrganizationSwitcherDialog/index.js.map +1 -1
  165. package/dist/components/ui/OutageList/index.js +1 -2
  166. package/dist/components/ui/OutagesDialog/index.js.map +1 -1
  167. package/dist/components/ui/PageContainer/PageContainer.d.ts +1 -1
  168. package/dist/components/ui/PageContainer/index.js +57 -52
  169. package/dist/components/ui/PageContainer/index.js.map +1 -1
  170. package/dist/components/ui/ResponseHandler/ResponseHandler.d.ts +1 -1
  171. package/dist/components/ui/ResponseHandler/index.js.map +1 -1
  172. package/dist/components/ui/Sidebar/SidebarItem.d.ts +1 -1
  173. package/dist/components/ui/Sidebar/SidebarMenuItem.d.ts +1 -1
  174. package/dist/components/ui/Sidebar/index.js +45 -45
  175. package/dist/components/ui/Sidebar/index.js.map +1 -1
  176. package/dist/components/ui/Table/Table.d.ts +1 -1
  177. package/dist/components/ui/Table/TableActionsCell.d.ts +1 -1
  178. package/dist/components/ui/Table/TableCell.d.ts +1 -1
  179. package/dist/components/ui/Table/TableCheckboxCell.d.ts +1 -1
  180. package/dist/components/ui/Table/TableCheckboxHeader.d.ts +1 -1
  181. package/dist/components/ui/Table/TableColumnsEditorDialog.d.ts +1 -1
  182. package/dist/components/ui/Table/TableFilter.d.ts +2 -2
  183. package/dist/components/ui/Table/TableHeaderCell.d.ts +1 -1
  184. package/dist/components/ui/Table/TableHeaderFilter.d.ts +2 -2
  185. package/dist/components/ui/Table/TableReadableIndexCell.d.ts +1 -1
  186. package/dist/components/ui/Table/index.js +1 -2
  187. package/dist/components/ui/UserFeedbackDialog/index.js +65 -64
  188. package/dist/components/ui/UserFeedbackDialog/index.js.map +1 -1
  189. package/dist/components/ui/UserInactivityConfirmation/index.js +26 -25
  190. package/dist/components/ui/UserInactivityConfirmation/index.js.map +1 -1
  191. package/dist/constants/api.constants.d.ts +8 -0
  192. package/dist/constants/api.constants.js +6 -0
  193. package/dist/constants/api.constants.js.map +1 -0
  194. package/dist/constants/config.constants.d.ts +5 -0
  195. package/dist/constants/config.constants.js +6 -0
  196. package/dist/constants/config.constants.js.map +1 -0
  197. package/dist/constants/{query.js → query.constants.js} +2 -2
  198. package/dist/constants/query.constants.js.map +1 -0
  199. package/dist/context/uiClientCommonConfigContext/UiClientCommonConfigContext.d.ts +6 -2
  200. package/dist/context/uiClientCommonConfigContext/UiClientCommonConfigContextProvider.d.ts +2 -2
  201. package/dist/context/uiClientCommonConfigContext/index.js +28 -12
  202. package/dist/context/uiClientCommonConfigContext/index.js.map +1 -1
  203. package/dist/context/uiClientCommonConfigContext/useUiClientCommonConfigContext.d.ts +2 -1
  204. package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +17 -16
  205. package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js.map +1 -1
  206. package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/useIdentifierIssuerOwnOrganizationQuery.d.ts +1 -1
  207. package/dist/dataHooks/useIdentifierIssuerQuery/index.js +18 -17
  208. package/dist/dataHooks/useIdentifierIssuerQuery/index.js.map +1 -1
  209. package/dist/dataHooks/useIdentifierIssuerQuery/useIdentifierIssuerQuery.d.ts +1 -1
  210. package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +11 -10
  211. package/dist/dataHooks/useInviteUserConstraintsQuery/index.js.map +1 -1
  212. package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +22 -21
  213. package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js.map +1 -1
  214. package/dist/dataHooks/useOrganizationAdminPoliciesQuery/useOrganizationAdminPoliciesQuery.d.ts +1 -1
  215. package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js +8 -7
  216. package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js.map +1 -1
  217. package/dist/dataHooks/useOrganizationsQuery/index.js +17 -16
  218. package/dist/dataHooks/useOrganizationsQuery/index.js.map +1 -1
  219. package/dist/dataHooks/useOrganizationsQuery/useOrganizationsQuery.d.ts +1 -1
  220. package/dist/dataHooks/useUsersQuery/index.js +18 -17
  221. package/dist/dataHooks/useUsersQuery/index.js.map +1 -1
  222. package/dist/dataHooks/useUsersQuery/useUsersQuery.d.ts +1 -1
  223. package/dist/hoc/withPermissions/index.js +12 -11
  224. package/dist/hoc/withPermissions/index.js.map +1 -1
  225. package/dist/hooks/useColumnsMenu/index.js +1 -2
  226. package/dist/hooks/useColumnsMenu/useColumnsMenu.d.ts +2 -2
  227. package/dist/hooks/useConfig/index.d.ts +1 -0
  228. package/dist/hooks/useConfig/index.js +7 -0
  229. package/dist/hooks/useConfig/index.js.map +1 -0
  230. package/dist/hooks/useConfig/useConfig.d.ts +2 -0
  231. package/dist/hooks/useCreateMutation/index.js +25 -24
  232. package/dist/hooks/useCreateMutation/index.js.map +1 -1
  233. package/dist/hooks/useCreateMutation/useCreateMutation.d.ts +1 -1
  234. package/dist/hooks/useDeleteMutation/index.js +24 -23
  235. package/dist/hooks/useDeleteMutation/index.js.map +1 -1
  236. package/dist/hooks/useDeleteMutation/useDeleteMutation.d.ts +1 -1
  237. package/dist/hooks/useEditMutation/index.js +33 -32
  238. package/dist/hooks/useEditMutation/index.js.map +1 -1
  239. package/dist/hooks/useEditMutation/useEditMutation.d.ts +1 -1
  240. package/dist/hooks/useInitializeTableStore/index.js.map +1 -1
  241. package/dist/hooks/useInitializeTableStore/useInitializeTableStore.d.ts +1 -1
  242. package/dist/hooks/useItemQuery/index.js +36 -35
  243. package/dist/hooks/useItemQuery/index.js.map +1 -1
  244. package/dist/hooks/useItemQuery/useItemQuery.d.ts +1 -1
  245. package/dist/hooks/useQueryMemo/index.js +1 -2
  246. package/dist/hooks/useUpdateBreadcrumb/index.js +10 -9
  247. package/dist/hooks/useUpdateBreadcrumb/index.js.map +1 -1
  248. package/dist/hooks/useUpdateDocumentTitle/index.js +4 -3
  249. package/dist/hooks/useUpdateDocumentTitle/index.js.map +1 -1
  250. package/dist/models/{admin.js → admin.models.js} +2 -2
  251. package/dist/models/admin.models.js.map +1 -0
  252. package/dist/models/{dataHooks.d.ts → data-hooks.models.d.ts} +1 -1
  253. package/dist/models/{table.d.ts → table.models.d.ts} +2 -2
  254. package/dist/models/{table.js → table.models.js} +2 -2
  255. package/dist/models/table.models.js.map +1 -0
  256. package/dist/pages/AcceptInvitationPage/index.js +40 -39
  257. package/dist/pages/AcceptInvitationPage/index.js.map +1 -1
  258. package/dist/pages/AdminPage/index.js +39 -38
  259. package/dist/pages/AdminPage/index.js.map +1 -1
  260. package/dist/pages/ChooseIdentityProviderPage/ChooseIdentityProviderPage.d.ts +1 -1
  261. package/dist/pages/ChooseIdentityProviderPage/index.js +38 -37
  262. package/dist/pages/ChooseIdentityProviderPage/index.js.map +1 -1
  263. package/dist/pages/CrudPage/CrudPage.d.ts +6 -6
  264. package/dist/pages/CrudPage/CrudPageDeleteDialog.d.ts +1 -1
  265. package/dist/pages/CrudPage/CrudPageEditDialog.d.ts +2 -2
  266. package/dist/pages/CrudPage/index.js +1 -2
  267. package/dist/pages/ErrorPage/index.js.map +1 -1
  268. package/dist/pages/IdentifierIssuersAdminPage/index.js +41 -40
  269. package/dist/pages/IdentifierIssuersAdminPage/index.js.map +1 -1
  270. package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +58 -57
  271. package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js.map +1 -1
  272. package/dist/pages/OrganizationContactsAdminPage/index.js +49 -48
  273. package/dist/pages/OrganizationContactsAdminPage/index.js.map +1 -1
  274. package/dist/pages/OrganizationSitesAdminPage/index.js +44 -43
  275. package/dist/pages/OrganizationSitesAdminPage/index.js.map +1 -1
  276. package/dist/pages/OrganizationsAdminPage/index.js +57 -56
  277. package/dist/pages/OrganizationsAdminPage/index.js.map +1 -1
  278. package/dist/pages/OutagesAdminPage/index.js +63 -62
  279. package/dist/pages/OutagesAdminPage/index.js.map +1 -1
  280. package/dist/pages/PostLoginPage/index.js +14 -13
  281. package/dist/pages/PostLoginPage/index.js.map +1 -1
  282. package/dist/pages/PostLogoutPage/index.js +19 -18
  283. package/dist/pages/PostLogoutPage/index.js.map +1 -1
  284. package/dist/pages/RouterErrorPage/index.js.map +1 -1
  285. package/dist/pages/UserInvitationsAdminPage/index.js +1 -2
  286. package/dist/pages/UsersAdminPage/UsersAdminPage.d.ts +1 -1
  287. package/dist/pages/UsersAdminPage/index.js +110 -109
  288. package/dist/pages/UsersAdminPage/index.js.map +1 -1
  289. package/dist/routes/adminRoutes.d.ts +1 -1
  290. package/dist/routes/index.js +1 -1
  291. package/dist/routes/index.js.map +1 -1
  292. package/dist/routes/routes.d.ts +1 -1
  293. package/dist/setup/setup.js.map +1 -1
  294. package/dist/stores/oidcStore/index.js.map +1 -1
  295. package/dist/stores/outagesStore/index.js.map +1 -1
  296. package/dist/stores/outagesStore/outagesStore.d.ts +1 -1
  297. package/dist/stores/tableStore/index.js +1 -2
  298. package/dist/stores/tableStore/tableStore.d.ts +2 -2
  299. package/dist/theme/demoTheme/index.js.map +1 -1
  300. package/dist/utils/AxiosUtil/index.js.map +1 -1
  301. package/dist/utils/DataHookUtil/DataHookUtil.d.ts +1 -1
  302. package/dist/utils/DataHookUtil/index.js.map +1 -1
  303. package/dist/utils/DependencyContainerUtil/DependencyContainerUtil.d.ts +6 -0
  304. package/dist/utils/DependencyContainerUtil/index.d.ts +1 -0
  305. package/dist/utils/DependencyContainerUtil/index.js +22 -0
  306. package/dist/utils/DependencyContainerUtil/index.js.map +1 -0
  307. package/dist/utils/LoadableUtil/LoadableUtil.d.ts +1 -1
  308. package/dist/utils/LoadableUtil/index.js.map +1 -1
  309. package/dist/utils/MenuDataUtil/MenuDataUtil.d.ts +1 -1
  310. package/dist/utils/MenuDataUtil/index.js.map +1 -1
  311. package/dist/utils/NotificationUtil/index.js.map +1 -1
  312. package/dist/utils/OutageUtil/OutageUtil.d.ts +1 -1
  313. package/dist/utils/OutageUtil/index.js +1 -2
  314. package/dist/utils/StandardConfigUtil/StandardConfigUtil.d.ts +1 -1
  315. package/dist/utils/StandardConfigUtil/index.js.map +1 -1
  316. package/dist/utils/TableUtil/TableUtil.d.ts +4 -4
  317. package/dist/utils/TableUtil/index.js +1 -2
  318. package/dist/utils/TimeUtil/index.js.map +1 -1
  319. package/dist/utils/UserManagerUtil/index.js +1 -2
  320. package/dist/utils/UserUtil/index.js.map +1 -1
  321. package/package.json +96 -86
  322. package/dist/_chunks/_baseGet.js +0 -280
  323. package/dist/_chunks/_baseGet.js.map +0 -1
  324. package/dist/_chunks/_baseIteratee.js +0 -274
  325. package/dist/_chunks/_baseIteratee.js.map +0 -1
  326. package/dist/_chunks/last.js +0 -13
  327. package/dist/_chunks/last.js.map +0 -1
  328. package/dist/_chunks/uniq.js +0 -44
  329. package/dist/_chunks/uniq.js.map +0 -1
  330. package/dist/classes/services/ApiService/ApiService.d.ts +0 -19
  331. package/dist/classes/services/ApiService/index.d.ts +0 -1
  332. package/dist/classes/services/ApiService/index.js +0 -21
  333. package/dist/classes/services/ApiService/index.js.map +0 -1
  334. package/dist/classes/services/ConfigService/ConfigService.d.ts +0 -9
  335. package/dist/classes/services/ConfigService/index.d.ts +0 -1
  336. package/dist/classes/services/ConfigService/index.js +0 -21
  337. package/dist/classes/services/ConfigService/index.js.map +0 -1
  338. package/dist/constants/query.js.map +0 -1
  339. package/dist/models/admin.js.map +0 -1
  340. package/dist/models/table.js.map +0 -1
  341. /package/dist/constants/{query.d.ts → query.constants.d.ts} +0 -0
  342. /package/dist/models/{admin.d.ts → admin.models.d.ts} +0 -0
  343. /package/dist/models/{api.d.ts → api.models.d.ts} +0 -0
  344. /package/dist/models/{api.js → api.models.js} +0 -0
  345. /package/dist/models/{auth.d.ts → auth.models.d.ts} +0 -0
  346. /package/dist/models/{auth.js → auth.models.js} +0 -0
  347. /package/dist/models/{config.d.ts → config.models.d.ts} +0 -0
  348. /package/dist/models/{config.js → config.models.js} +0 -0
  349. /package/dist/models/{data.js → data-hooks.models.js} +0 -0
  350. /package/dist/models/{data.d.ts → data.models.d.ts} +0 -0
  351. /package/dist/models/{dataHooks.js → data.models.js} +0 -0
  352. /package/dist/models/{filter.d.ts → filter.models.d.ts} +0 -0
  353. /package/dist/models/{filter.js → filter.models.js} +0 -0
  354. /package/dist/models/{notification.d.ts → notification.models.d.ts} +0 -0
  355. /package/dist/models/{notification.js → notification.models.js} +0 -0
  356. /package/dist/models/{outage.d.ts → outage.models.d.ts} +0 -0
  357. /package/dist/models/{outage.js → outage.models.js} +0 -0
  358. /package/dist/models/{reactRouter.d.ts → react-router.models.d.ts} +0 -0
  359. /package/dist/models/{reactRouter.js → react-router.models.js} +0 -0
  360. /package/dist/models/{theme.d.ts → theme.models.d.ts} +0 -0
  361. /package/dist/models/{theme.js → theme.models.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"toDate.js","names":[],"sources":["../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js"],"sourcesContent":["/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n","import { constructFromSymbol } from \"./constants.js\";\n\n/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from \"./constructFrom/date-fns\";\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date>(date: DateType): DateType {\n * return constructFrom(\n * date, // Use constructor from the given date\n * date.getTime() // Use the date value to create a new date\n * );\n * }\n */\nexport function constructFrom(date, value) {\n if (typeof date === \"function\") return date(value);\n\n if (date && typeof date === \"object\" && constructFromSymbol in date)\n return date[constructFromSymbol](value);\n\n if (date instanceof Date) return new date.constructor(value);\n\n return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * Starting from v3.7.0, it clones a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument, context) {\n // [TODO] Get rid of `toDate` or `constructFrom`?\n return constructFrom(context || argument, argument);\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n"],"x_google_ignoreList":[0,1,2],"mappings":";AAqCA,IAAa,IAAa,UAuCb,IAAqB,QAOrB,IAAoB,OAOpB,IAAuB,KAOvB,IAAqB,MA6ErB,IAAe;AAOC,IAAe,GAOf,IAAe,IAOE,KAOG;AAajD,IAAa,IAAsB,OAAO,IAAI,mBAAmB;;;AClLjE,SAAgB,EAAc,GAAM,GAAO;CAQzC,OAPI,OAAO,KAAS,aAAmB,EAAK,CAAK,IAE7C,KAAQ,OAAO,KAAS,YAAY,KAAuB,IACtD,EAAK,EAAoB,CAAC,CAAK,IAEpC,aAAgB,OAAa,IAAI,EAAK,YAAY,CAAK,IAEpD,IAAI,KAAK,CAAK;AACvB;;;ACNA,SAAgB,EAAO,GAAU,GAAS;CAExC,OAAO,EAAc,KAAW,GAAU,CAAQ;AACpD"}
1
+ {"version":3,"file":"toDate.js","names":["daysInYear","millisecondsInWeek","millisecondsInDay","millisecondsInMinute","millisecondsInHour","secondsInDay","constructFromSymbol","constructFrom","date","value","toDate","context","argument"],"sources":["../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js","../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js"],"sourcesContent":["/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n","import { constructFromSymbol } from \"./constants.js\";\n\n/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from \"./constructFrom/date-fns\";\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date>(date: DateType): DateType {\n * return constructFrom(\n * date, // Use constructor from the given date\n * date.getTime() // Use the date value to create a new date\n * );\n * }\n */\nexport function constructFrom(date, value) {\n if (typeof date === \"function\") return date(value);\n\n if (date && typeof date === \"object\" && constructFromSymbol in date)\n return date[constructFromSymbol](value);\n\n if (date instanceof Date) return new date.constructor(value);\n\n return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * Starting from v3.7.0, it clones a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument, context) {\n // [TODO] Get rid of `toDate` or `constructFrom`?\n return constructFrom(context || argument, argument);\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n"],"ignoreList":[0,1,2],"mappings":";AAqCA,IAAaA,IAAa,UAuCbC,IAAqB,QAOrBC,IAAoB,OAOpBC,IAAuB,KAOvBC,IAAqB,MA6ErBC,IAAe;AAOCA,IAAe,GAOfA,IAAeL,IAOE,KAOG;AAajD,IAAaM,IAAsB,OAAO,IAAI,mBAAmB;;;AClLjE,SAAgBC,EAAc,GAAM,GAAO;CAQzC,OAPI,OAAOC,KAAS,aAAmBA,EAAKC,CAAK,IAE7CD,KAAQ,OAAOA,KAAS,YAAYF,KAAuBE,IACtDA,EAAKF,EAAoB,CAACG,CAAK,IAEpCD,aAAgB,OAAa,IAAIA,EAAK,YAAYC,CAAK,IAEpD,IAAI,KAAKA,CAAK;AACvB;;;ACNA,SAAgBC,EAAO,GAAU,GAAS;CAExC,OAAOH,EAAcI,KAAWC,GAAUA,CAAQ;AACpD"}
@@ -9,7 +9,7 @@ import u from "@mui/icons-material/CheckBoxOutlined";
9
9
  import d from "@mui/icons-material/CheckBoxOutlineBlankOutlined";
10
10
  import f from "@mui/icons-material/ToggleOffOutlined";
11
11
  import p from "@mui/icons-material/ToggleOnOutlined";
12
- //#region ../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.18_react@19.3.0_use-sync-external-store@1.7.0_react@19.3.0_/node_modules/zustand/esm/vanilla/shallow.mjs
12
+ //#region ../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.21_react@19.3.0_use-sync-external-store@1.7.0_react@19.3.0_/node_modules/zustand/esm/vanilla/shallow.mjs
13
13
  var m = (e) => Symbol.iterator in e, h = (e) => "entries" in e, g = (e, t) => {
14
14
  let n = e instanceof Map ? e : new Map(e.entries()), r = t instanceof Map ? t : new Map(t.entries());
15
15
  if (n.size !== r.size) return !1;
@@ -27,7 +27,7 @@ function v(e, t) {
27
27
  return Object.is(e, t) ? !0 : typeof e != "object" || !e || typeof t != "object" || !t || Object.getPrototypeOf(e) !== Object.getPrototypeOf(t) ? !1 : m(e) && m(t) ? h(e) && h(t) ? g(e, t) : _(e, t) : g({ entries: () => Object.entries(e) }, { entries: () => Object.entries(t) });
28
28
  }
29
29
  //#endregion
30
- //#region ../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.18_react@19.3.0_use-sync-external-store@1.7.0_react@19.3.0_/node_modules/zustand/esm/react/shallow.mjs
30
+ //#region ../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.21_react@19.3.0_use-sync-external-store@1.7.0_react@19.3.0_/node_modules/zustand/esm/react/shallow.mjs
31
31
  function y(e) {
32
32
  let t = i.useRef(void 0);
33
33
  return (n) => {
@@ -1 +1 @@
1
- {"version":3,"file":"useColumnsMenu.js","names":[],"sources":["../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.18_react@19.3.0_use-sync-external-store@1.7.0_react@19.3.0_/node_modules/zustand/esm/vanilla/shallow.mjs","../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.18_react@19.3.0_use-sync-external-store@1.7.0_react@19.3.0_/node_modules/zustand/esm/react/shallow.mjs","../../src/hooks/useColumnsMenu/useColumnsMenu.tsx"],"sourcesContent":["const isIterable = (obj) => Symbol.iterator in obj;\nconst hasIterableEntries = (value) => (\n // HACK: avoid checking entries type\n \"entries\" in value\n);\nconst compareEntries = (valueA, valueB) => {\n const mapA = valueA instanceof Map ? valueA : new Map(valueA.entries());\n const mapB = valueB instanceof Map ? valueB : new Map(valueB.entries());\n if (mapA.size !== mapB.size) {\n return false;\n }\n for (const [key, value] of mapA) {\n if (!mapB.has(key) || !Object.is(value, mapB.get(key))) {\n return false;\n }\n }\n return true;\n};\nconst compareIterables = (valueA, valueB) => {\n const iteratorA = valueA[Symbol.iterator]();\n const iteratorB = valueB[Symbol.iterator]();\n let nextA = iteratorA.next();\n let nextB = iteratorB.next();\n while (!nextA.done && !nextB.done) {\n if (!Object.is(nextA.value, nextB.value)) {\n return false;\n }\n nextA = iteratorA.next();\n nextB = iteratorB.next();\n }\n return !!nextA.done && !!nextB.done;\n};\nfunction shallow(valueA, valueB) {\n if (Object.is(valueA, valueB)) {\n return true;\n }\n if (typeof valueA !== \"object\" || valueA === null || typeof valueB !== \"object\" || valueB === null) {\n return false;\n }\n if (Object.getPrototypeOf(valueA) !== Object.getPrototypeOf(valueB)) {\n return false;\n }\n if (isIterable(valueA) && isIterable(valueB)) {\n if (hasIterableEntries(valueA) && hasIterableEntries(valueB)) {\n return compareEntries(valueA, valueB);\n }\n return compareIterables(valueA, valueB);\n }\n return compareEntries(\n { entries: () => Object.entries(valueA) },\n { entries: () => Object.entries(valueB) }\n );\n}\n\nexport { shallow };\n","import React from 'react';\nimport { shallow } from 'zustand/vanilla/shallow';\n\nfunction useShallow(selector) {\n const prev = React.useRef(void 0);\n return (state) => {\n const next = selector(state);\n return shallow(prev.current, next) ? prev.current : prev.current = next;\n };\n}\n\nexport { useShallow };\n","import { produce } from 'immer';\nimport { useStore } from 'zustand';\nimport { useShallow } from 'zustand/shallow';\nimport CheckBoxOutlinedIcon from '@mui/icons-material/CheckBoxOutlined';\nimport CheckBoxOutlineBlankOutlinedIcon from '@mui/icons-material/CheckBoxOutlineBlankOutlined';\nimport ToggleOffOutlinedIcon from '@mui/icons-material/ToggleOffOutlined';\nimport ToggleOnOutlinedIcon from '@mui/icons-material/ToggleOnOutlined';\nimport IndeterminateCheckBoxIcon from '@mui/icons-material/IndeterminateCheckBox';\nimport {\n useCallback,\n useMemo,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport type { MenuItemData } from '@gen-epix/ui-core-components/models/nestedMenu';\n\nimport type { HasCellDataFn } from '../../models/table';\nimport { useTableStoreContext } from '../../stores/tableStore';\nimport { TableUtil } from '../../utils/TableUtil';\n\n\nexport type UseColumnsMenuProps<TRowData, TDataContext = null> = {\n readonly hasCellData?: HasCellDataFn<TRowData, TDataContext>;\n};\n\nexport const useColumnsMenu = <TRowData, TDataContext = null>({ hasCellData }: UseColumnsMenuProps<TRowData, TDataContext>): MenuItemData => {\n const tableStore = useTableStoreContext<TRowData, TDataContext>();\n const emitTableEvent = useStore(tableStore, useShallow((state) => state.emitEvent));\n const tableColumns = useStore(tableStore, useShallow((state) => state.columns));\n const dataContext = useStore(tableStore, useShallow((state) => state.dataContext));\n const visibleColumnIds = useStore(tableStore, useShallow((state) => state.getCurrentColumnVisualSettings().filter(c => c.isVisible).map(c => c.id)));\n const columnDimensions = useStore(tableStore, useShallow((state) => state.columnDimensions));\n const isCondensed = useStore(tableStore, useShallow((state) => state.isCondensed));\n const sortedData = useStore(tableStore, useShallow((state) => state.sortedData));\n const { t } = useTranslation();\n\n const isCondensingSupported = useMemo(() => {\n return tableColumns.some(c => c.cellColorGetter);\n }, [tableColumns]);\n\n const onColumnsEditorMenuItemClick = useCallback(() => {\n emitTableEvent('openColumnsEditorDialog', hasCellData);\n }, [emitTableEvent, hasCellData]);\n\n const toggleItem = useCallback((columnId: string): void => {\n const newVisibleColumnIds = produce(visibleColumnIds, (draft) => {\n if (draft.includes(columnId)) {\n return draft.filter(c => c !== columnId);\n }\n draft.push(columnId);\n return draft;\n });\n emitTableEvent('columnVisibilityChange', newVisibleColumnIds);\n }, [emitTableEvent, visibleColumnIds]);\n\n const toggleDimension = useCallback((dimensionColumnIds: string[]): void => {\n const areAllVisible = dimensionColumnIds.every(columnId => visibleColumnIds.includes(columnId));\n const newVisibleColumnIds = produce(visibleColumnIds, (draft) => {\n if (areAllVisible) {\n return draft.filter(c => !dimensionColumnIds.includes(c));\n }\n dimensionColumnIds.forEach((columnId) => {\n if (!draft.includes(columnId)) {\n draft.push(columnId);\n }\n });\n return draft;\n });\n emitTableEvent('columnVisibilityChange', newVisibleColumnIds);\n }, [emitTableEvent, visibleColumnIds]);\n\n const onHideColumnsWithoutDataClick = useCallback(() => {\n emitTableEvent('columnVisibilityChange', TableUtil.getColumnIdsWithData<TRowData, TDataContext>({\n dataContext,\n hasCellData,\n sortedData,\n tableColumns,\n visibleColumnIds,\n }));\n\n }, [emitTableEvent, hasCellData, sortedData, tableColumns, visibleColumnIds, dataContext]);\n\n const onIsCondensedMenuItemClick = useCallback(() => {\n emitTableEvent('condensedChange', !isCondensed);\n }, [emitTableEvent, isCondensed]);\n\n const menuItemData: MenuItemData = useMemo(() => {\n const items: MenuItemData[] = [\n isCondensingSupported ? {\n autoCloseDisabled: true,\n callback: () => onIsCondensedMenuItemClick(),\n checked: isCondensed ? 'true' : 'false',\n divider: true,\n label: t`Condensed`,\n rightIcon: isCondensed ? <ToggleOnOutlinedIcon /> : <ToggleOffOutlinedIcon />,\n } : undefined,\n {\n callback: () => onColumnsEditorMenuItemClick(),\n divider: true,\n label: t`Change order / visibility`,\n },\n {\n autoCloseDisabled: true,\n callback: () => emitTableEvent('reset'),\n label: t`Reset`,\n },\n {\n autoCloseDisabled: true,\n callback: () => {\n emitTableEvent('columnVisibilityChange', [...tableColumns.map(c => c.id)]);\n },\n label: t`Show all`,\n },\n {\n autoCloseDisabled: true,\n callback: () => {\n emitTableEvent('columnVisibilityChange', [...tableColumns.filter(c => c.frozen).map(c => c.id)]);\n },\n label: t`Hide all`,\n },\n {\n autoCloseDisabled: true,\n callback: () => onHideColumnsWithoutDataClick(),\n divider: true,\n label: t`Hide columns without data`,\n },\n ].filter(x => x) as MenuItemData[];\n\n if (columnDimensions) {\n columnDimensions.forEach((columnDimension) => {\n const areAllVisible = columnDimension.columnIds.every(columnId => visibleColumnIds.includes(columnId));\n const areSomeVisible = columnDimension.columnIds.some(columnId => visibleColumnIds.includes(columnId));\n items.push({\n autoCloseDisabled: true,\n callback: () => toggleDimension(columnDimension.columnIds),\n // eslint-disable-next-line no-nested-ternary\n checked: areAllVisible ? 'true' : areSomeVisible ? 'mixed' : 'false',\n items: columnDimension.columnIds.map((columnId) => {\n const checked = visibleColumnIds.includes(columnId);\n return {\n autoCloseDisabled: true,\n callback: () => toggleItem(columnId),\n checked: checked ? 'true' : 'false',\n label: tableColumns.find(c => c.id === columnId)?.headerName ?? '',\n rightIcon: checked ? <CheckBoxOutlinedIcon /> : <CheckBoxOutlineBlankOutlinedIcon />,\n };\n }),\n label: columnDimension.label,\n // eslint-disable-next-line no-nested-ternary\n rightIcon: areAllVisible ? <CheckBoxOutlinedIcon /> : areSomeVisible ? <IndeterminateCheckBoxIcon /> : <CheckBoxOutlineBlankOutlinedIcon />,\n });\n });\n } else {\n tableColumns.filter(c => !c.frozen).forEach((column) => {\n const checked = visibleColumnIds.includes(column.id);\n items.push({\n autoCloseDisabled: true,\n callback: () => toggleItem(column.id),\n checked: checked ? 'true' : 'false',\n label: column.headerName,\n rightIcon: checked ? <CheckBoxOutlinedIcon /> : <CheckBoxOutlineBlankOutlinedIcon />,\n });\n });\n }\n\n return {\n items,\n label: t`Columns`,\n };\n }, [isCondensed, isCondensingSupported, t, columnDimensions, onIsCondensedMenuItemClick, onColumnsEditorMenuItemClick, emitTableEvent, tableColumns, onHideColumnsWithoutDataClick, visibleColumnIds, toggleDimension, toggleItem]);\n\n return menuItemData;\n};\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;;;;AAAA,IAAM,KAAc,MAAQ,OAAO,YAAY,GACzC,KAAsB,MAE1B,aAAa,GAET,KAAkB,GAAQ,MAAW;CACzC,IAAM,IAAO,aAAkB,MAAM,IAAS,IAAI,IAAI,EAAO,QAAQ,CAAC,GAChE,IAAO,aAAkB,MAAM,IAAS,IAAI,IAAI,EAAO,QAAQ,CAAC;CACtE,IAAI,EAAK,SAAS,EAAK,MACrB,OAAO;CAET,KAAK,IAAM,CAAC,GAAK,MAAU,GACzB,IAAI,CAAC,EAAK,IAAI,CAAG,KAAK,CAAC,OAAO,GAAG,GAAO,EAAK,IAAI,CAAG,CAAC,GACnD,OAAO;CAGX,OAAO;AACT,GACM,KAAoB,GAAQ,MAAW;CAC3C,IAAM,IAAY,EAAO,OAAO,SAAS,CAAC,GACpC,IAAY,EAAO,OAAO,SAAS,CAAC,GACtC,IAAQ,EAAU,KAAK,GACvB,IAAQ,EAAU,KAAK;CAC3B,OAAO,CAAC,EAAM,QAAQ,CAAC,EAAM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CAAC;IACD,OAAO,EAAgB;IAEvB,WAA2B,EAAhB,IAAiB,IAA0B,IAAkB,IAAgC,GAA7E,CAAuB,CAAwF;GAC5I,CAAC;EACH,CAAC,IAED,EAAa,QAAO,MAAK,CAAC,EAAE,MAAM,CAAC,CAAC,SAAS,MAAW;GACtD,IAAM,IAAU,EAAiB,SAAS,EAAO,EAAE;GACnD,EAAM,KAAK;IACT,mBAAmB;IACnB,gBAAgB,EAAW,EAAO,EAAE;IACpC,SAAS,IAAU,SAAS;IAC5B,OAAO,EAAO;IACd,WAAqB,EAAV,IAAW,IAA2B,GAA5B,CAAuB,CAAuC;GACrF,CAAC;EACH,CAAC,GAGI;GACL;GACA,OAAO,CAAC;EACV;CACF,GAAG;EAAC;EAAa;EAAuB;EAAG;EAAkB;EAA4B;EAA8B;EAAgB;EAAc;EAA+B;EAAkB;EAAiB;CAAU,CAE1N;AACT"}
1
+ {"version":3,"file":"useColumnsMenu.js","names":["TableUtil","produce","useTableStoreContext","React","IndeterminateCheckBoxIcon","CheckBoxOutlinedIcon","CheckBoxOutlineBlankOutlinedIcon","ToggleOffOutlinedIcon","ToggleOnOutlinedIcon","isIterable","obj","hasIterableEntries","value","compareEntries","mapA","valueA","mapB","valueB","key","compareIterables","iteratorA","iteratorB","nextA","nextB","shallow","useShallow","prev","next","selector","state","useColumnsMenu","tableStore","emitTableEvent","useStore","tableColumns","dataContext","visibleColumnIds","c","columnDimensions","isCondensed","sortedData","useTranslation","isCondensingSupported","useMemo","onColumnsEditorMenuItemClick","useCallback","hasCellData","toggleItem","newVisibleColumnIds","draft","columnId","toggleDimension","areAllVisible","dimensionColumnIds","onHideColumnsWithoutDataClick","onIsCondensedMenuItemClick","items","jsx","x","columnDimension","areSomeVisible","checked","column","t"],"sources":["../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.21_react@19.3.0_use-sync-external-store@1.7.0_react@19.3.0_/node_modules/zustand/esm/vanilla/shallow.mjs","../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.21_react@19.3.0_use-sync-external-store@1.7.0_react@19.3.0_/node_modules/zustand/esm/react/shallow.mjs","../../src/hooks/useColumnsMenu/useColumnsMenu.tsx"],"sourcesContent":["const isIterable = (obj) => Symbol.iterator in obj;\nconst hasIterableEntries = (value) => (\n // HACK: avoid checking entries type\n \"entries\" in value\n);\nconst compareEntries = (valueA, valueB) => {\n const mapA = valueA instanceof Map ? valueA : new Map(valueA.entries());\n const mapB = valueB instanceof Map ? valueB : new Map(valueB.entries());\n if (mapA.size !== mapB.size) {\n return false;\n }\n for (const [key, value] of mapA) {\n if (!mapB.has(key) || !Object.is(value, mapB.get(key))) {\n return false;\n }\n }\n return true;\n};\nconst compareIterables = (valueA, valueB) => {\n const iteratorA = valueA[Symbol.iterator]();\n const iteratorB = valueB[Symbol.iterator]();\n let nextA = iteratorA.next();\n let nextB = iteratorB.next();\n while (!nextA.done && !nextB.done) {\n if (!Object.is(nextA.value, nextB.value)) {\n return false;\n }\n nextA = iteratorA.next();\n nextB = iteratorB.next();\n }\n return !!nextA.done && !!nextB.done;\n};\nfunction shallow(valueA, valueB) {\n if (Object.is(valueA, valueB)) {\n return true;\n }\n if (typeof valueA !== \"object\" || valueA === null || typeof valueB !== \"object\" || valueB === null) {\n return false;\n }\n if (Object.getPrototypeOf(valueA) !== Object.getPrototypeOf(valueB)) {\n return false;\n }\n if (isIterable(valueA) && isIterable(valueB)) {\n if (hasIterableEntries(valueA) && hasIterableEntries(valueB)) {\n return compareEntries(valueA, valueB);\n }\n return compareIterables(valueA, valueB);\n }\n return compareEntries(\n { entries: () => Object.entries(valueA) },\n { entries: () => Object.entries(valueB) }\n );\n}\n\nexport { shallow };\n","import React from 'react';\nimport { shallow } from 'zustand/vanilla/shallow';\n\nfunction useShallow(selector) {\n const prev = React.useRef(void 0);\n return (state) => {\n const next = selector(state);\n return shallow(prev.current, next) ? prev.current : prev.current = next;\n };\n}\n\nexport { useShallow };\n","import { produce } from 'immer';\nimport { useStore } from 'zustand';\nimport { useShallow } from 'zustand/shallow';\nimport CheckBoxOutlinedIcon from '@mui/icons-material/CheckBoxOutlined';\nimport CheckBoxOutlineBlankOutlinedIcon from '@mui/icons-material/CheckBoxOutlineBlankOutlined';\nimport ToggleOffOutlinedIcon from '@mui/icons-material/ToggleOffOutlined';\nimport ToggleOnOutlinedIcon from '@mui/icons-material/ToggleOnOutlined';\nimport IndeterminateCheckBoxIcon from '@mui/icons-material/IndeterminateCheckBox';\nimport {\n useCallback,\n useMemo,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport type { MenuItemData } from '@gen-epix/ui-core-components/models/nested-menu.models';\n\nimport type { HasCellDataFn } from '../../models/table.models';\nimport { useTableStoreContext } from '../../stores/tableStore';\nimport { TableUtil } from '../../utils/TableUtil';\n\n\nexport type UseColumnsMenuProps<TRowData, TDataContext = null> = {\n readonly hasCellData?: HasCellDataFn<TRowData, TDataContext>;\n};\n\nexport const useColumnsMenu = <TRowData, TDataContext = null>({ hasCellData }: UseColumnsMenuProps<TRowData, TDataContext>): MenuItemData => {\n const tableStore = useTableStoreContext<TRowData, TDataContext>();\n const emitTableEvent = useStore(tableStore, useShallow((state) => state.emitEvent));\n const tableColumns = useStore(tableStore, useShallow((state) => state.columns));\n const dataContext = useStore(tableStore, useShallow((state) => state.dataContext));\n const visibleColumnIds = useStore(tableStore, useShallow((state) => state.getCurrentColumnVisualSettings().filter(c => c.isVisible).map(c => c.id)));\n const columnDimensions = useStore(tableStore, useShallow((state) => state.columnDimensions));\n const isCondensed = useStore(tableStore, useShallow((state) => state.isCondensed));\n const sortedData = useStore(tableStore, useShallow((state) => state.sortedData));\n const { t } = useTranslation();\n\n const isCondensingSupported = useMemo(() => {\n return tableColumns.some(c => c.cellColorGetter);\n }, [tableColumns]);\n\n const onColumnsEditorMenuItemClick = useCallback(() => {\n emitTableEvent('openColumnsEditorDialog', hasCellData);\n }, [emitTableEvent, hasCellData]);\n\n const toggleItem = useCallback((columnId: string): void => {\n const newVisibleColumnIds = produce(visibleColumnIds, (draft) => {\n if (draft.includes(columnId)) {\n return draft.filter(c => c !== columnId);\n }\n draft.push(columnId);\n return draft;\n });\n emitTableEvent('columnVisibilityChange', newVisibleColumnIds);\n }, [emitTableEvent, visibleColumnIds]);\n\n const toggleDimension = useCallback((dimensionColumnIds: string[]): void => {\n const areAllVisible = dimensionColumnIds.every(columnId => visibleColumnIds.includes(columnId));\n const newVisibleColumnIds = produce(visibleColumnIds, (draft) => {\n if (areAllVisible) {\n return draft.filter(c => !dimensionColumnIds.includes(c));\n }\n dimensionColumnIds.forEach((columnId) => {\n if (!draft.includes(columnId)) {\n draft.push(columnId);\n }\n });\n return draft;\n });\n emitTableEvent('columnVisibilityChange', newVisibleColumnIds);\n }, [emitTableEvent, visibleColumnIds]);\n\n const onHideColumnsWithoutDataClick = useCallback(() => {\n emitTableEvent('columnVisibilityChange', TableUtil.getColumnIdsWithData<TRowData, TDataContext>({\n dataContext,\n hasCellData,\n sortedData,\n tableColumns,\n visibleColumnIds,\n }));\n\n }, [emitTableEvent, hasCellData, sortedData, tableColumns, visibleColumnIds, dataContext]);\n\n const onIsCondensedMenuItemClick = useCallback(() => {\n emitTableEvent('condensedChange', !isCondensed);\n }, [emitTableEvent, isCondensed]);\n\n const menuItemData: MenuItemData = useMemo(() => {\n const items: MenuItemData[] = [\n isCondensingSupported ? {\n autoCloseDisabled: true,\n callback: () => onIsCondensedMenuItemClick(),\n checked: isCondensed ? 'true' : 'false',\n divider: true,\n label: t`Condensed`,\n rightIcon: isCondensed ? <ToggleOnOutlinedIcon /> : <ToggleOffOutlinedIcon />,\n } : undefined,\n {\n callback: () => onColumnsEditorMenuItemClick(),\n divider: true,\n label: t`Change order / visibility`,\n },\n {\n autoCloseDisabled: true,\n callback: () => emitTableEvent('reset'),\n label: t`Reset`,\n },\n {\n autoCloseDisabled: true,\n callback: () => {\n emitTableEvent('columnVisibilityChange', [...tableColumns.map(c => c.id)]);\n },\n label: t`Show all`,\n },\n {\n autoCloseDisabled: true,\n callback: () => {\n emitTableEvent('columnVisibilityChange', [...tableColumns.filter(c => c.frozen).map(c => c.id)]);\n },\n label: t`Hide all`,\n },\n {\n autoCloseDisabled: true,\n callback: () => onHideColumnsWithoutDataClick(),\n divider: true,\n label: t`Hide columns without data`,\n },\n ].filter(x => x) as MenuItemData[];\n\n if (columnDimensions) {\n columnDimensions.forEach((columnDimension) => {\n const areAllVisible = columnDimension.columnIds.every(columnId => visibleColumnIds.includes(columnId));\n const areSomeVisible = columnDimension.columnIds.some(columnId => visibleColumnIds.includes(columnId));\n items.push({\n autoCloseDisabled: true,\n callback: () => toggleDimension(columnDimension.columnIds),\n // eslint-disable-next-line no-nested-ternary\n checked: areAllVisible ? 'true' : areSomeVisible ? 'mixed' : 'false',\n items: columnDimension.columnIds.map((columnId) => {\n const checked = visibleColumnIds.includes(columnId);\n return {\n autoCloseDisabled: true,\n callback: () => toggleItem(columnId),\n checked: checked ? 'true' : 'false',\n label: tableColumns.find(c => c.id === columnId)?.headerName ?? '',\n rightIcon: checked ? <CheckBoxOutlinedIcon /> : <CheckBoxOutlineBlankOutlinedIcon />,\n };\n }),\n label: columnDimension.label,\n // eslint-disable-next-line no-nested-ternary\n rightIcon: areAllVisible ? <CheckBoxOutlinedIcon /> : areSomeVisible ? <IndeterminateCheckBoxIcon /> : <CheckBoxOutlineBlankOutlinedIcon />,\n });\n });\n } else {\n tableColumns.filter(c => !c.frozen).forEach((column) => {\n const checked = visibleColumnIds.includes(column.id);\n items.push({\n autoCloseDisabled: true,\n callback: () => toggleItem(column.id),\n checked: checked ? 'true' : 'false',\n label: column.headerName,\n rightIcon: checked ? <CheckBoxOutlinedIcon /> : <CheckBoxOutlineBlankOutlinedIcon />,\n });\n });\n }\n\n return {\n items,\n label: t`Columns`,\n };\n }, [isCondensed, isCondensingSupported, t, columnDimensions, onIsCondensedMenuItemClick, onColumnsEditorMenuItemClick, emitTableEvent, tableColumns, onHideColumnsWithoutDataCl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IACT,mBAAmB;IACnB,gBAAgBf,EAAWe,EAAO,EAAE;IACpC,SAASD,IAAU,SAAS;IAC5B,OAAOC,EAAO;IACd,WAAqBL,EAAVI,IAAWxD,IAA2BC,GAA5B,CAAuB,CAAuC;GACrF,CAAC;EACH,CAAC,GAGI;GACL;GACA,OAAO,CAAC;EACV;CACF,GAAG;EAACiC;EAAaG;EAAuBqB;EAAGzB;EAAkBiB;EAA4BX;EAA8BZ;EAAgBE;EAAcoB;EAA+BlB;EAAkBe;EAAiBJ;CAAU,CAE1N;AACT"}
@@ -1,9 +1,9 @@
1
- import { n as e } from "./QueryClientProvider.js";
2
- import { b as t, c as n, d as r, g as i, o as a, x as o } from "./query.js";
3
- import { n as s } from "./QueryClientService.js";
1
+ import { i as e } from "./QueryClientService.js";
2
+ import { n as t } from "./QueryClientProvider.js";
3
+ import { b as n, c as r, d as i, g as a, o, x as s } from "./query.js";
4
4
  import * as c from "react";
5
- //#region ../../node_modules/.pnpm/@tanstack+query-core@5.103.2/node_modules/@tanstack/query-core/build/modern/mutationObserver.js
6
- var l = class extends n {
5
+ //#region ../../node_modules/.pnpm/@tanstack+query-core@5.104.2/node_modules/@tanstack/query-core/build/modern/mutationObserver.js
6
+ var l = class extends r {
7
7
  #e;
8
8
  #t = void 0;
9
9
  #n;
@@ -15,12 +15,12 @@ var l = class extends n {
15
15
  this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
16
16
  }
17
17
  setOptions(e) {
18
- let n = this.options;
19
- this.options = this.#e.defaultMutationOptions(e), t(this.options, n) || this.#e.getMutationCache().notify({
18
+ let t = this.options;
19
+ this.options = this.#e.defaultMutationOptions(e), n(this.options, t) || this.#e.getMutationCache().notify({
20
20
  type: "observerOptionsUpdated",
21
21
  mutation: this.#n,
22
22
  observer: this
23
- }), n?.mutationKey && this.options.mutationKey && r(n.mutationKey) !== r(this.options.mutationKey) ? this.reset() : this.#n?.state.status === "pending" && this.#n.setOptions(this.options);
23
+ }), t?.mutationKey && this.options.mutationKey && i(t.mutationKey) !== i(this.options.mutationKey) ? this.reset() : this.#n?.state.status === "pending" && this.#n.setOptions(this.options);
24
24
  }
25
25
  onSubscribe() {
26
26
  this.listeners.size === 1 && this.#n && (this.#n.addObserver(this), this.#i());
@@ -41,44 +41,45 @@ var l = class extends n {
41
41
  return this.#r = t, this.#n?.removeObserver(this), this.#n = this.#e.getMutationCache().build(this.#e, this.options), this.#n.addObserver(this), this.#n.execute(e);
42
42
  }
43
43
  #i() {
44
- let e = this.#n?.state ?? s();
44
+ let t = this.#n?.state ?? e();
45
45
  this.#t = {
46
- ...e,
47
- isPending: e.status === "pending",
48
- isSuccess: e.status === "success",
49
- isError: e.status === "error",
50
- isIdle: e.status === "idle",
46
+ ...t,
47
+ isPending: t.status === "pending",
48
+ isSuccess: t.status === "success",
49
+ isError: t.status === "error",
50
+ isIdle: t.status === "idle",
51
51
  mutate: this.mutate,
52
52
  reset: this.reset
53
53
  };
54
54
  }
55
55
  #a(e) {
56
- a.batch(() => {
57
- if (this.#r && this.hasListeners()) {
58
- let t = this.#t.variables, n = this.#t.context, r = {
56
+ o.batch(() => {
57
+ let t = this.#r;
58
+ if (t && this.hasListeners()) {
59
+ let n = this.#t.variables, r = this.#t.context, i = {
59
60
  client: this.#e,
60
61
  meta: this.options.meta,
61
62
  mutationKey: this.options.mutationKey
62
63
  };
63
64
  if (e?.type === "success") {
64
65
  try {
65
- this.#r.onSuccess?.(e.data, t, n, r);
66
+ t.onSuccess?.(e.data, n, r, i);
66
67
  } catch (e) {
67
68
  Promise.reject(e);
68
69
  }
69
70
  try {
70
- this.#r.onSettled?.(e.data, null, t, n, r);
71
+ t.onSettled?.(e.data, null, n, r, i);
71
72
  } catch (e) {
72
73
  Promise.reject(e);
73
74
  }
74
75
  } else if (e?.type === "error") {
75
76
  try {
76
- this.#r.onError?.(e.error, t, n, r);
77
+ t.onError?.(e.error, n, r, i);
77
78
  } catch (e) {
78
79
  Promise.reject(e);
79
80
  }
80
81
  try {
81
- this.#r.onSettled?.(void 0, e.error, t, n, r);
82
+ t.onSettled?.(void 0, e.error, n, r, i);
82
83
  } catch (e) {
83
84
  Promise.reject(e);
84
85
  }
@@ -91,16 +92,16 @@ var l = class extends n {
91
92
  }
92
93
  };
93
94
  //#endregion
94
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.103.2_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useMutation.js
95
- function u(t, n) {
96
- let r = e(n), [s] = c.useState(() => new l(r, t));
95
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.2_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useMutation.js
96
+ function u(e, n) {
97
+ let r = t(n), [i] = c.useState(() => new l(r, e));
97
98
  c.useEffect(() => {
98
- s.setOptions(t);
99
- }, [s, t]);
100
- let u = c.useSyncExternalStore(c.useCallback((e) => s.subscribe(a.batchCalls(e)), [s]), () => s.getCurrentResult(), () => s.getCurrentResult()), d = c.useCallback((...e) => {
101
- s.mutate(e[0], e[1]).catch(i);
102
- }, [s]);
103
- if (u.error && o(s.options.throwOnError, [u.error])) throw u.error;
99
+ i.setOptions(e);
100
+ }, [i, e]);
101
+ let u = c.useSyncExternalStore(c.useCallback((e) => i.subscribe(o.batchCalls(e)), [i]), () => i.getCurrentResult(), () => i.getCurrentResult()), d = c.useCallback((...e) => {
102
+ i.mutate(e[0], e[1]).catch(a);
103
+ }, [i]);
104
+ if (u.error && s(i.options.throwOnError, [u.error])) throw u.error;
104
105
  return {
105
106
  ...u,
106
107
  mutate: d,
@@ -1 +1 @@
1
- {"version":3,"file":"useMutation.js","names":["React"],"sources":["../../../../node_modules/.pnpm/@tanstack+query-core@5.103.2/node_modules/@tanstack/query-core/build/modern/mutationObserver.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.103.2_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useMutation.js"],"sourcesContent":["import { hashKey, shallowEqualObjects } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { getDefaultState } from \"./mutation.js\";\n//#region src/mutationObserver.ts\n/**\n* Observes a single mutation and derives a `MutationObserverResult` from it.\n* A framework hook like `useMutation` creates one `MutationObserver` per hook\n* call, keeps it stable across re-renders, calls `setOptions` when the options\n* passed to the hook change, subscribes to it to re-render on updates, and\n* reads `getCurrentResult()` for the value to return. Calling `mutate()`\n* builds a new underlying `Mutation` in the `MutationCache` and executes it.\n*\n* @example\n* ```ts\n* const observer = new MutationObserver(queryClient, {\n* mutationFn: (variables: { title: string }) => addPost(variables),\n* })\n* ```\n*/\nvar MutationObserver = class extends Subscribable {\n\t#client;\n\t#currentResult = void 0;\n\t#currentMutation;\n\t#mutateOptions;\n\tconstructor(client, options) {\n\t\tsuper();\n\t\tthis.#client = client;\n\t\tthis.setOptions(options);\n\t\tthis.bindMethods();\n\t\tthis.#updateResult();\n\t}\n\tbindMethods() {\n\t\tthis.mutate = this.mutate.bind(this);\n\t\tthis.reset = this.reset.bind(this);\n\t}\n\t/**\n\t* Updates the observer's options.\n\t*\n\t* If the new `mutationKey` differs from the previous one (and both were\n\t* defined), the observer is reset, detaching it from the mutation it was\n\t* observing. Otherwise, if the currently observed mutation is still\n\t* `pending`, its options are updated in place as well.\n\t*\n\t* @example\n\t* ```ts\n\t* observer.setOptions({\n\t* mutationFn: (variables: { title: string }) => addPost(variables),\n\t* onSuccess: (data) => console.log(data),\n\t* })\n\t* ```\n\t*/\n\tsetOptions(options) {\n\t\tconst prevOptions = this.options;\n\t\tthis.options = this.#client.defaultMutationOptions(options);\n\t\tif (!shallowEqualObjects(this.options, prevOptions)) this.#client.getMutationCache().notify({\n\t\t\ttype: \"observerOptionsUpdated\",\n\t\t\tmutation: this.#currentMutation,\n\t\t\tobserver: this\n\t\t});\n\t\tif (prevOptions?.mutationKey && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) this.reset();\n\t\telse if (this.#currentMutation?.state.status === \"pending\") this.#currentMutation.setOptions(this.options);\n\t}\n\tonSubscribe() {\n\t\tif (this.listeners.size === 1 && this.#currentMutation) {\n\t\t\tthis.#currentMutation.addObserver(this);\n\t\t\tthis.#updateResult();\n\t\t}\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) this.#currentMutation?.removeObserver(this);\n\t}\n\t/** @internal */\n\tonMutationUpdate(action) {\n\t\tthis.#updateResult();\n\t\tthis.#notify(action);\n\t}\n\t/**\n\t* Returns the observer's current result, derived from the observed\n\t* mutation's state (or the default, `idle` state if no mutation has been\n\t* built yet, e.g. before the first `mutate()` call or after `reset()`).\n\t*/\n\tgetCurrentResult() {\n\t\treturn this.#currentResult;\n\t}\n\t/**\n\t* Detaches the observer from the mutation it is currently observing (if\n\t* any) and resets the observed result back to its default, `idle` state.\n\t*\n\t* This does not cancel an in-flight mutation; the mutation itself keeps\n\t* running to completion and its own callbacks still fire, but this\n\t* observer stops reflecting its state and a subsequent `mutate()` call\n\t* will build a brand new mutation.\n\t*\n\t* @example\n\t* ```ts\n\t* observer.reset()\n\t* ```\n\t*\n\t* @see {@link MutationObserver#mutate}\n\t*/\n\treset() {\n\t\tthis.#currentMutation?.removeObserver(this);\n\t\tthis.#currentMutation = void 0;\n\t\tthis.#updateResult();\n\t\tthis.#notify();\n\t}\n\t/**\n\t* Builds a new `Mutation` in the `MutationCache` using the observer's\n\t* current options, detaches this observer from any previously observed\n\t* mutation, attaches it to the new one, and executes it with the given\n\t* variables.\n\t*\n\t* The optional per-call `options` (`onSuccess`/`onError`/`onSettled`) are\n\t* invoked once the mutation settles, in addition to any callbacks defined\n\t* on the observer's own options.\n\t*\n\t* @example\n\t* ```ts\n\t* await observer.mutate(\n\t* { title: 'New post' },\n\t* { onSuccess: (data) => console.log(data) },\n\t* )\n\t* ```\n\t*/\n\tmutate(variables, options) {\n\t\tthis.#mutateOptions = options;\n\t\tthis.#currentMutation?.removeObserver(this);\n\t\tthis.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);\n\t\tthis.#currentMutation.addObserver(this);\n\t\treturn this.#currentMutation.execute(variables);\n\t}\n\t#updateResult() {\n\t\tconst state = this.#currentMutation?.state ?? getDefaultState();\n\t\tthis.#currentResult = {\n\t\t\t...state,\n\t\t\tisPending: state.status === \"pending\",\n\t\t\tisSuccess: state.status === \"success\",\n\t\t\tisError: state.status === \"error\",\n\t\t\tisIdle: state.status === \"idle\",\n\t\t\tmutate: this.mutate,\n\t\t\treset: this.reset\n\t\t};\n\t}\n\t#notify(action) {\n\t\tnotifyManager.batch(() => {\n\t\t\tif (this.#mutateOptions && this.hasListeners()) {\n\t\t\t\tconst variables = this.#currentResult.variables;\n\t\t\t\tconst onMutateResult = this.#currentResult.context;\n\t\t\t\tconst context = {\n\t\t\t\t\tclient: this.#client,\n\t\t\t\t\tmeta: this.options.meta,\n\t\t\t\t\tmutationKey: this.options.mutationKey\n\t\t\t\t};\n\t\t\t\tif (action?.type === \"success\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSuccess?.(action.data, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSettled?.(action.data, null, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t} else if (action?.type === \"error\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onError?.(action.error, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSettled?.(void 0, action.error, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\tlistener(this.#currentResult);\n\t\t\t});\n\t\t});\n\t}\n};\n//#endregion\nexport { MutationObserver };\n\n//# sourceMappingURL=mutationObserver.js.map","\"use client\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport * as React from \"react\";\nimport { MutationObserver, noop, notifyManager, shouldThrowError } from \"@tanstack/query-core\";\n//#region src/useMutation.ts\n/**\n* Unlike queries, mutations are typically used to create/update/delete data or perform server side-effects.\n* `useMutation` is the hook for that.\n*\n* @see {@link mutationOptions} to share these options across multiple `useMutation` call sites, or to look\n* the mutation up elsewhere via its `mutationKey` (e.g. with `useMutationState`).\n* @param options - The {@link UseMutationOptions} to use — everything you can pass to `useMutation`.\n* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will\n* be used.\n* @returns `mutate`/`mutateAsync` also accept per-call `onSuccess`/`onError`/`onSettled` callbacks as a second\n* argument, useful for triggering call-site side effects (e.g. navigation) without coupling them to the shared\n* mutation definition. Hook-level callbacks (passed to `options`) fire for every mutation; per-call callbacks\n* fire only for the latest call you've made, and only while the component is still mounted — unmounting before\n* the mutation settles removes the subscription and prevents them from firing.\n*\n* @example\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* return (\n* <button\n* onClick={() =>\n* addMutation.mutate('Item', {\n* onError: (error) => console.error('Failed to add item:', error),\n* })\n* }\n* >\n* Add\n* </button>\n* )\n* }\n* ```\n*\n* @example\n* Rendering the mutation's own state, rather than just firing it off:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* return (\n* <div>\n* {addMutation.isPending ? (\n* 'Adding todo...'\n* ) : (\n* <>\n* {addMutation.isError ? (\n* <div>An error occurred: {addMutation.error.message}</div>\n* ) : null}\n* <button onClick={() => addMutation.mutate('Item')}>Add</button>\n* </>\n* )}\n* </div>\n* )\n* }\n* ```\n*\n* @example\n* Optimistic update via `onMutate`, rolling back on `onError`:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onMutate: async (newTodo) => {\n* await queryClient.cancelQueries({ queryKey: ['todos'] })\n* const previousTodos = queryClient.getQueryData<Array<string>>(['todos'])\n*\n* queryClient.setQueryData<Array<string>>(['todos'], (old) => [\n* ...(old ?? []),\n* newTodo,\n* ])\n*\n* // Passed to `onError` as `onMutateResult` if the mutation fails.\n* return { previousTodos }\n* },\n* onError: (_err, _newTodo, onMutateResult) => {\n* queryClient.setQueryData(['todos'], onMutateResult?.previousTodos)\n* },\n* onSettled: () => {\n* queryClient.invalidateQueries({ queryKey: ['todos'] })\n* },\n* })\n*\n* return (\n* <button onClick={() => addMutation.mutate('Item')}>Add</button>\n* )\n* }\n* ```\n*\n* @example\n* Callbacks passed per call to `mutate` only fire for the last call — `mutateAsync` gives you a\n* promise per call instead, so you can wait for all of them when they succeed:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodos() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* async function handleAddAll(todos: Array<string>) {\n* try {\n* await Promise.all(todos.map((todo) => addMutation.mutateAsync(todo)))\n* } catch (error) {\n* console.error('Failed to add todos:', error)\n* }\n* }\n*\n* return (\n* <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>\n* Add all\n* </button>\n* )\n* }\n* ```\n*\n* @example\n* If some of the mutations above can fail independently of the others, and you want to know which ones\n* did — rather than losing that information the moment the first one rejects — swap `Promise.all` for\n* `Promise.allSettled`:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodos() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* async function handleAddAll(todos: Array<string>) {\n* const addResults = await Promise.allSettled(\n* todos.map((todo) => addMutation.mutateAsync(todo)),\n* )\n*\n* addResults.forEach((addResult, index) => {\n* if (addResult.status === 'rejected') {\n* console.error(`Failed to add \"${todos[index]}\":`, addResult.reason)\n* }\n* })\n* }\n*\n* return (\n* <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>\n* Add all\n* </button>\n* )\n* }\n* ```\n*/\nfunction useMutation(options, queryClient) {\n\tconst client = useQueryClient(queryClient);\n\tconst [observer] = React.useState(() => new MutationObserver(client, options));\n\tReact.useEffect(() => {\n\t\tobserver.setOptions(options);\n\t}, [observer, options]);\n\tconst result = React.useSyncExternalStore(React.useCallback((onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), [observer]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n\tconst mutate = React.useCallback((...args) => {\n\t\tobserver.mutate(args[0], args[1]).catch(noop);\n\t}, [observer]);\n\tif (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) throw result.error;\n\treturn {\n\t\t...result,\n\t\tmutate,\n\t\tmutateAsync: result.mutate\n\t};\n}\n//#endregion\nexport { useMutation };\n\n//# sourceMappingURL=useMutation.js.map"],"x_google_ignoreList":[0,1],"mappings":";;;;;AAoBA,IAAI,IAAmB,cAAc,EAAa;CACjD;CACA,KAAiB,KAAK;CACtB;CACA;CACA,YAAY,GAAQ,GAAS;EAK5B,AAJA,MAAM,GACN,KAAK,KAAU,GACf,KAAK,WAAW,CAAO,GACvB,KAAK,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;CAC5B,GAAG,CAAC,GAAU,CAAO,CAAC;CACtB,IAAM,IAASA,EAAM,qBAAqBA,EAAM,aAAa,MAAkB,EAAS,UAAU,EAAc,WAAW,CAAa,CAAC,GAAG,CAAC,CAAQ,CAAC,SAAS,EAAS,iBAAiB,SAAS,EAAS,iBAAiB,CAAC,GACvN,IAASA,EAAM,aAAa,GAAG,MAAS;EAC7C,EAAS,OAAO,EAAK,IAAI,EAAK,EAAE,CAAC,CAAC,MAAM,CAAI;CAC7C,GAAG,CAAC,CAAQ,CAAC;CACb,IAAI,EAAO,SAAS,EAAiB,EAAS,QAAQ,cAAc,CAAC,EAAO,KAAK,CAAC,GAAG,MAAM,EAAO;CAClG,OAAO;EACN,GAAG;EACH;EACA,aAAa,EAAO;CACrB;AACD"}
1
+ {"version":3,"file":"useMutation.js","names":["React","getDefaultState","useQueryClient","shallowEqualObjects","Subscribable","hashKey","noop","shouldThrowError","React$1","MutationObserver","#client","client","options","#updateResult","prevOptions","#currentMutation","#notify","action","#currentResult","#mutateOptions","variables","state","mutateOptions","onMutateResult","context","useMutation","queryClient","observer","result","notifyManager","onStoreChange","mutate","args"],"sources":["../../../../node_modules/.pnpm/@tanstack+query-core@5.104.2/node_modules/@tanstack/query-core/build/modern/mutationObserver.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.104.2_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useMutation.js"],"sourcesContent":["import { hashKey, shallowEqualObjects } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { getDefaultState } from \"./mutation.js\";\n//#region src/mutationObserver.ts\n/**\n* Observes a single mutation and derives a `MutationObserverResult` from it.\n* A framework hook like `useMutation` creates one `MutationObserver` per hook\n* call, keeps it stable across re-renders, calls `setOptions` when the options\n* passed to the hook change, subscribes to it to re-render on updates, and\n* reads `getCurrentResult()` for the value to return. Calling `mutate()`\n* builds a new underlying `Mutation` in the `MutationCache` and executes it.\n* @example\n* ```ts\n* const observer = new MutationObserver(queryClient, {\n* mutationFn: (variables: { title: string }) => addPost(variables),\n* })\n* ```\n*/\nvar MutationObserver = class extends Subscribable {\n\t#client;\n\t#currentResult = void 0;\n\t#currentMutation;\n\t#mutateOptions;\n\tconstructor(client, options) {\n\t\tsuper();\n\t\tthis.#client = client;\n\t\tthis.setOptions(options);\n\t\tthis.bindMethods();\n\t\tthis.#updateResult();\n\t}\n\t/**\n\t* Binds the methods of the result (`mutate` and `reset`) to the observer, so they keep working when\n\t* destructured from it.\n\t*/\n\tbindMethods() {\n\t\tthis.mutate = this.mutate.bind(this);\n\t\tthis.reset = this.reset.bind(this);\n\t}\n\t/**\n\t* Updates the observer's options.\n\t*\n\t* If the new `mutationKey` differs from the previous one (and both were\n\t* defined), the observer is reset, detaching it from the mutation it was\n\t* observing. Otherwise, if the currently observed mutation is still\n\t* `pending`, its options are updated in place as well.\n\t* @param options - The new mutation observer options. They are defaulted with {@link\n\t* QueryClient#defaultMutationOptions} before being applied.\n\t* @example\n\t* ```ts\n\t* observer.setOptions({\n\t* mutationFn: (variables: { title: string }) => addPost(variables),\n\t* onSuccess: (data) => console.log(data),\n\t* })\n\t* ```\n\t*/\n\tsetOptions(options) {\n\t\tconst prevOptions = this.options;\n\t\tthis.options = this.#client.defaultMutationOptions(options);\n\t\tif (!shallowEqualObjects(this.options, prevOptions)) this.#client.getMutationCache().notify({\n\t\t\ttype: \"observerOptionsUpdated\",\n\t\t\tmutation: this.#currentMutation,\n\t\t\tobserver: this\n\t\t});\n\t\tif (prevOptions?.mutationKey && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) this.reset();\n\t\telse if (this.#currentMutation?.state.status === \"pending\") this.#currentMutation.setOptions(this.options);\n\t}\n\tonSubscribe() {\n\t\tif (this.listeners.size === 1 && this.#currentMutation) {\n\t\t\tthis.#currentMutation.addObserver(this);\n\t\t\tthis.#updateResult();\n\t\t}\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) this.#currentMutation?.removeObserver(this);\n\t}\n\t/**\n\t* Updates the observer's result when the observed mutation changes, and notifies its listeners.\n\t* @internal\n\t* @param action - The action that updated the observed mutation, passed on to the observer's\n\t* callbacks.\n\t*/\n\tonMutationUpdate(action) {\n\t\tthis.#updateResult();\n\t\tthis.#notify(action);\n\t}\n\t/**\n\t* Returns the observer's current result, derived from the observed\n\t* mutation's state (or the default, `idle` state if no mutation has been\n\t* built yet, e.g. before the first `mutate()` call or after `reset()`).\n\t* @returns The observer's latest result.\n\t*/\n\tgetCurrentResult() {\n\t\treturn this.#currentResult;\n\t}\n\t/**\n\t* Detaches the observer from the mutation it is currently observing (if\n\t* any) and resets the observed result back to its default, `idle` state.\n\t*\n\t* This does not cancel an in-flight mutation; the mutation itself keeps\n\t* running to completion and its own callbacks still fire, but this\n\t* observer stops reflecting its state and a subsequent `mutate()` call\n\t* will build a brand new mutation.\n\t* @see {@link MutationObserver#mutate}\n\t* @example\n\t* ```ts\n\t* observer.reset()\n\t* ```\n\t*/\n\treset() {\n\t\tthis.#currentMutation?.removeObserver(this);\n\t\tthis.#currentMutation = void 0;\n\t\tthis.#updateResult();\n\t\tthis.#notify();\n\t}\n\t/**\n\t* Builds a new `Mutation` in the `MutationCache` using the observer's\n\t* current options, detaches this observer from any previously observed\n\t* mutation, attaches it to the new one, and executes it with the given\n\t* variables.\n\t*\n\t* The optional per-call `options` (`onSuccess`/`onError`/`onSettled`) are\n\t* invoked once the mutation settles, in addition to any callbacks defined\n\t* on the observer's own options.\n\t* @param variables - The variables passed to the `mutationFn`.\n\t* @param options - Per-call `onSuccess`, `onError`, and `onSettled` callbacks.\n\t* @returns A promise that resolves with the mutation's data, or rejects with its error.\n\t* @example\n\t* ```ts\n\t* await observer.mutate(\n\t* { title: 'New post' },\n\t* { onSuccess: (data) => console.log(data) },\n\t* )\n\t* ```\n\t*/\n\tmutate(variables, options) {\n\t\tthis.#mutateOptions = options;\n\t\tthis.#currentMutation?.removeObserver(this);\n\t\tthis.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);\n\t\tthis.#currentMutation.addObserver(this);\n\t\treturn this.#currentMutation.execute(variables);\n\t}\n\t#updateResult() {\n\t\tconst state = this.#currentMutation?.state ?? getDefaultState();\n\t\tthis.#currentResult = {\n\t\t\t...state,\n\t\t\tisPending: state.status === \"pending\",\n\t\t\tisSuccess: state.status === \"success\",\n\t\t\tisError: state.status === \"error\",\n\t\t\tisIdle: state.status === \"idle\",\n\t\t\tmutate: this.mutate,\n\t\t\treset: this.reset\n\t\t};\n\t}\n\t#notify(action) {\n\t\tnotifyManager.batch(() => {\n\t\t\tconst mutateOptions = this.#mutateOptions;\n\t\t\tif (mutateOptions && this.hasListeners()) {\n\t\t\t\tconst variables = this.#currentResult.variables;\n\t\t\t\tconst onMutateResult = this.#currentResult.context;\n\t\t\t\tconst context = {\n\t\t\t\t\tclient: this.#client,\n\t\t\t\t\tmeta: this.options.meta,\n\t\t\t\t\tmutationKey: this.options.mutationKey\n\t\t\t\t};\n\t\t\t\tif (action?.type === \"success\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmutateOptions.onSuccess?.(action.data, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmutateOptions.onSettled?.(action.data, null, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t} else if (action?.type === \"error\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmutateOptions.onError?.(action.error, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmutateOptions.onSettled?.(void 0, action.error, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\tlistener(this.#currentResult);\n\t\t\t});\n\t\t});\n\t}\n};\n//#endregion\nexport { MutationObserver };\n\n//# sourceMappingURL=mutationObserver.js.map","\"use client\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport * as React from \"react\";\nimport { MutationObserver, noop, notifyManager, shouldThrowError } from \"@tanstack/query-core\";\n//#region src/useMutation.ts\n/**\n* Unlike queries, mutations are typically used to create/update/delete data or perform server side-effects.\n* `useMutation` is the hook for that.\n* @param options - The {@link UseMutationOptions} to use — everything you can pass to `useMutation`.\n* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will\n* be used.\n* @returns `mutate`/`mutateAsync` also accept per-call `onSuccess`/`onError`/`onSettled` callbacks as a second\n* argument, useful for triggering call-site side effects (e.g. navigation) without coupling them to the shared\n* mutation definition. Hook-level callbacks (passed to `options`) fire for every mutation; per-call callbacks\n* fire only for the latest call you've made, and only while the component is still mounted — unmounting before\n* the mutation settles removes the subscription and prevents them from firing.\n* @throws {Error} The mutation error, when `throwOnError` is `true` or returns `true` for it, so that it is\n* thrown to the nearest error boundary.\n* @see {@link mutationOptions} to share these options across multiple `useMutation` call sites, or to look\n* the mutation up elsewhere via its `mutationKey` (e.g. with `useMutationState`).\n* @example\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* return (\n* <button\n* onClick={() =>\n* addMutation.mutate('Item', {\n* onError: (error) => console.error('Failed to add item:', error),\n* })\n* }\n* >\n* Add\n* </button>\n* )\n* }\n* ```\n* @example\n* Rendering the mutation's own state, rather than just firing it off:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* return (\n* <div>\n* {addMutation.isPending ? (\n* 'Adding todo...'\n* ) : (\n* <>\n* {addMutation.isError ? (\n* <div>An error occurred: {addMutation.error.message}</div>\n* ) : null}\n* <button onClick={() => addMutation.mutate('Item')}>Add</button>\n* </>\n* )}\n* </div>\n* )\n* }\n* ```\n* @example\n* Optimistic update via `onMutate`, rolling back on `onError`:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onMutate: async (newTodo) => {\n* await queryClient.cancelQueries({ queryKey: ['todos'] })\n* const previousTodos = queryClient.getQueryData<Array<string>>(['todos'])\n*\n* queryClient.setQueryData<Array<string>>(['todos'], (old) => [\n* ...(old ?? []),\n* newTodo,\n* ])\n*\n* // Passed to `onError` as `onMutateResult` if the mutation fails.\n* return { previousTodos }\n* },\n* onError: (_err, _newTodo, onMutateResult) => {\n* queryClient.setQueryData(['todos'], onMutateResult?.previousTodos)\n* },\n* onSettled: () => {\n* queryClient.invalidateQueries({ queryKey: ['todos'] })\n* },\n* })\n*\n* return (\n* <button onClick={() => addMutation.mutate('Item')}>Add</button>\n* )\n* }\n* ```\n* @example\n* Callbacks passed per call to `mutate` only fire for the last call — `mutateAsync` gives you a\n* promise per call instead, so you can wait for all of them when they succeed:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodos() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* async function handleAddAll(todos: Array<string>) {\n* try {\n* await Promise.all(todos.map((todo) => addMutation.mutateAsync(todo)))\n* } catch (error) {\n* console.error('Failed to add todos:', error)\n* }\n* }\n*\n* return (\n* <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>\n* Add all\n* </button>\n* )\n* }\n* ```\n* @example\n* If some of the mutations above can fail independently of the others, and you want to know which ones\n* did — rather than losing that information the moment the first one rejects — swap `Promise.all` for\n* `Promise.allSettled`:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodos() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* async function handleAddAll(todos: Array<string>) {\n* const addResults = await Promise.allSettled(\n* todos.map((todo) => addMutation.mutateAsync(todo)),\n* )\n*\n* addResults.forEach((addResult, index) => {\n* if (addResult.status === 'rejected') {\n* console.error(`Failed to add \"${todos[index]}\":`, addResult.reason)\n* }\n* })\n* }\n*\n* return (\n* <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>\n* Add all\n* </button>\n* )\n* }\n* ```\n*/\nfunction useMutation(options, queryClient) {\n\tconst client = useQueryClient(queryClient);\n\tconst [observer] = React.useState(() => new MutationObserver(client, options));\n\tReact.useEffect(() => {\n\t\tobserver.setOptions(options);\n\t}, [observer, options]);\n\tconst result = React.useSyncExternalStore(React.useCallback((onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), [observer]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n\tconst mutate = React.useCallback((...args) => {\n\t\tobserver.mutate(args[0], args[1]).catch(noop);\n\t}, [observer]);\n\tif (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) throw result.error;\n\treturn {\n\t\t...result,\n\t\tmutate,\n\t\tmutateAsync: result.mutate\n\t};\n}\n//#endregion\nexport { useMutation };\n\n//# sourceMappingURL=useMutation.js.map"],"ignoreList":[0,1],"mappings":";;;;;AAmBA,IAAIS,IAAmB,cAAcL,EAAa;CACjD;CACA,KAAiB,KAA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,CAAC;CACF;AACD;;;ACrBA,SAASO,EAAY,GAAS,GAAa;CAC1C,IAAMd,IAAST,EAAewB,CAAW,GACnC,CAACC,KAAY3B,EAAM,eAAe,IAAIS,EAAiBE,GAAQC,CAAO,CAAC;CAC7E,EAAM,gBAAgB;EACrB,EAAS,WAAWA,CAAO;CAC5B,GAAG,CAACe,GAAUf,CAAO,CAAC;CACtB,IAAMgB,IAAS5B,EAAM,qBAAqBA,EAAM,aAAa,MAAkB2B,EAAS,UAAUE,EAAc,WAAWC,CAAa,CAAC,GAAG,CAACH,CAAQ,CAAC,SAASA,EAAS,iBAAiB,SAASA,EAAS,iBAAiB,CAAC,GACvNI,IAAS/B,EAAM,aAAa,GAAGgC,MAAS;EAC7C,EAAS,OAAOA,EAAK,IAAIA,EAAK,EAAE,CAAC,CAAC,MAAM1B,CAAI;CAC7C,GAAG,CAACqB,CAAQ,CAAC;CACb,IAAIC,EAAO,SAASrB,EAAiBoB,EAAS,QAAQ,cAAc,CAACC,EAAO,KAAK,CAAC,GAAG,MAAMA,EAAO;CAClG,OAAO;EACN,GAAGA;EACH;EACA,aAAaA,EAAO;CACrB;AACD"}
@@ -3,7 +3,7 @@ import { C as t, b as n, c as r, g as i, l as a, n as o, o as s, p as c, s as l,
3
3
  import * as m from "react";
4
4
  import { useMemo as h } from "react";
5
5
  import "react/jsx-runtime";
6
- //#region ../../node_modules/.pnpm/@tanstack+query-core@5.103.2/node_modules/@tanstack/query-core/build/modern/queryObserver.js
6
+ //#region ../../node_modules/.pnpm/@tanstack+query-core@5.104.2/node_modules/@tanstack/query-core/build/modern/queryObserver.js
7
7
  var g = class extends r {
8
8
  #e;
9
9
  #t = void 0;
@@ -232,11 +232,11 @@ function x(e, t) {
232
232
  return p(t.enabled, e) !== !1 && e.isStaleByTime(p(t.staleTime, e));
233
233
  }
234
234
  //#endregion
235
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.103.2_react@19.3.0/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
235
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.2_react@19.3.0/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
236
236
  var S = m.createContext(!1), C = () => m.useContext(S);
237
237
  S.Provider;
238
238
  //#endregion
239
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.103.2_react@19.3.0/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
239
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.2_react@19.3.0/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
240
240
  function w() {
241
241
  let e = !1;
242
242
  return {
@@ -265,7 +265,7 @@ var T = m.createContext(w()), E = () => m.useContext(T), D = (e, t, n) => {
265
265
  n.clearReset();
266
266
  });
267
267
  //#endregion
268
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.103.2_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
268
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.2_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
269
269
  function N(t, n, r) {
270
270
  if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t))) throw Error("Bad argument type. Starting with v5, only the \"Object\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object");
271
271
  let a = C(), o = E(), c = e(r), l = c.defaultQueryOptions(t), u = c.getQueryCache().get(l.queryHash);
@@ -289,7 +289,7 @@ function N(t, n, r) {
289
289
  return l.notifyOnChangeProps ? p : f.trackResult(p);
290
290
  }
291
291
  //#endregion
292
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.103.2_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useQuery.js
292
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.2_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useQuery.js
293
293
  function P(e, t) {
294
294
  return N(e, g, t);
295
295
  }