@gen-epix/ui-client-casedb 4.3.0 → 4.3.2

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 (170) hide show
  1. package/dist/_chunks/Dashboard.js +613 -666
  2. package/dist/_chunks/Dashboard.js.map +1 -1
  3. package/dist/_chunks/LegendaItem.js.map +1 -1
  4. package/dist/_chunks/UploadUtil.js +4 -6
  5. package/dist/_chunks/UploadUtil.js.map +1 -1
  6. package/dist/_chunks/_baseClone.js +1 -1
  7. package/dist/_chunks/_baseClone.js.map +1 -1
  8. package/dist/_chunks/cloneDeep.js +1 -1
  9. package/dist/_chunks/cloneDeep.js.map +1 -1
  10. package/dist/_chunks/esm.js +93 -101
  11. package/dist/_chunks/esm.js.map +1 -1
  12. package/dist/_chunks/react.js +1 -1
  13. package/dist/_chunks/react.js.map +1 -1
  14. package/dist/_chunks/shallow.js +2 -2
  15. package/dist/_chunks/shallow.js.map +1 -1
  16. package/dist/_chunks/sync.js +4 -4
  17. package/dist/_chunks/sync.js.map +1 -1
  18. package/dist/_chunks/vanilla.js +1 -1
  19. package/dist/_chunks/vanilla.js.map +1 -1
  20. package/dist/_chunks/yup.js +2 -2
  21. package/dist/_chunks/yup.js.map +1 -1
  22. package/dist/components/app/CaseDbApp/CaseDbApp.d.ts +1 -1
  23. package/dist/components/ui/AddCasesToEventDialog/AddCasesToEventDialogSuccessNotificationMessage.d.ts +1 -1
  24. package/dist/components/ui/CaseContentForm/CaseContentForm.d.ts +1 -1
  25. package/dist/components/ui/CaseInfoDialog/CaseCaseSetInfo.d.ts +1 -1
  26. package/dist/components/ui/CaseInfoDialog/CaseContent.d.ts +1 -1
  27. package/dist/components/ui/CaseInfoDialog/CaseInfoForm.d.ts +1 -1
  28. package/dist/components/ui/CaseInfoDialog/CaseSharingForm.d.ts +1 -1
  29. package/dist/components/ui/CaseInfoDialog/CaseSharingInfo.d.ts +1 -1
  30. package/dist/components/ui/CaseInfoDialog/ReadOnlyCaseContent.d.ts +1 -1
  31. package/dist/components/ui/CaseSetInfoDialog/CaseSetContent.d.ts +1 -1
  32. package/dist/components/ui/CaseSetInfoDialog/CaseSetDescription.d.ts +1 -1
  33. package/dist/components/ui/CaseSetInfoDialog/CaseSetForm.d.ts +1 -1
  34. package/dist/components/ui/CaseSetInfoDialog/CaseSetSharingForm.d.ts +1 -1
  35. package/dist/components/ui/CaseSetInfoDialog/CaseSetSharingInfo.d.ts +1 -1
  36. package/dist/components/ui/CaseSummary/CaseSummary.d.ts +1 -1
  37. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoAccessRights.d.ts +1 -1
  38. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoColAccessRights.d.ts +1 -1
  39. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoData.d.ts +1 -1
  40. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoDialogContent.d.ts +1 -1
  41. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoRegions.d.ts +1 -1
  42. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoTrees.d.ts +1 -1
  43. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoValues.d.ts +1 -1
  44. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoVariableDetails.d.ts +1 -1
  45. package/dist/components/ui/CasesAlreadyInCaseSetWarning/CasesAlreadyInCaseSetWarning.d.ts +1 -1
  46. package/dist/components/ui/CasesAlreadyInCaseSetWarning/CasesAlreadyInCaseSetWarningCaseSetLink.d.ts +1 -1
  47. package/dist/components/ui/CompletCaseTypeLoader/CompletCaseTypeLoader.d.ts +1 -1
  48. package/dist/components/ui/ContextMenu/ContextMenu.d.ts +1 -1
  49. package/dist/components/ui/ContextMenu/index.js +1 -1
  50. package/dist/components/ui/ContextMenu/index.js.map +1 -1
  51. package/dist/components/ui/CreateEventDialog/CreateEventDialogSuccessNotificationMessage.d.ts +1 -1
  52. package/dist/components/ui/CreateEventDialog/index.js +1 -1
  53. package/dist/components/ui/CreateEventDialog/index.js.map +1 -1
  54. package/dist/components/ui/CustomTabPanel/CustomTabPanel.d.ts +1 -1
  55. package/dist/components/ui/Dashboard/DashboardContent.d.ts +1 -1
  56. package/dist/components/ui/Dashboard/DashboardDownloadSidebarItem.d.ts +1 -1
  57. package/dist/components/ui/Dashboard/DashboardGeneralSettingsForm.d.ts +1 -1
  58. package/dist/components/ui/Dashboard/DashboardLayoutRenderer.d.ts +1 -1
  59. package/dist/components/ui/Dashboard/DashboardLayoutSettingsForm.d.ts +1 -1
  60. package/dist/components/ui/Dashboard/DashboardSearch.d.ts +1 -1
  61. package/dist/components/ui/Dashboard/DashboardSearchSettings.d.ts +1 -1
  62. package/dist/components/ui/Dashboard/DashboardSettingsSidebarItem.d.ts +1 -1
  63. package/dist/components/ui/Dashboard/DashboardWidget.d.ts +1 -1
  64. package/dist/components/ui/Dashboard/DashboardWidgetPlaceHolder.d.ts +1 -1
  65. package/dist/components/ui/Dashboard/DashboardWidgetSettingsForm.d.ts +1 -1
  66. package/dist/components/ui/Dashboard/context/DashboardContextProvider.d.ts +1 -1
  67. package/dist/components/ui/DashboardEditCases/DashboardEditCases.d.ts +1 -1
  68. package/dist/components/ui/DashboardStoreLoader/DashboardStoreLoader.d.ts +1 -1
  69. package/dist/components/ui/DashboardStoreLoader/DashboardStoreLoaderContent.d.ts +1 -1
  70. package/dist/components/ui/DataCollectionAccessInfo/DataCollectionAccessInfo.d.ts +1 -1
  71. package/dist/components/ui/EpiCurveWidget/EpiCurveBarChart.d.ts +1 -1
  72. package/dist/components/ui/EpiCurveWidget/EpiCurveStackedAreaChart.d.ts +1 -1
  73. package/dist/components/ui/EpiCurveWidget/EpiCurveWidget.d.ts +1 -1
  74. package/dist/components/ui/Grouping/Grouping.d.ts +1 -1
  75. package/dist/components/ui/HistogramWidget/HistogramWidget.d.ts +1 -1
  76. package/dist/components/ui/HistogramWidget/index.js +1 -1
  77. package/dist/components/ui/HistogramWidget/index.js.map +1 -1
  78. package/dist/components/ui/HomePageTrends/HomePageTrendCard.d.ts +1 -1
  79. package/dist/components/ui/HomePageTrends/HomePageTrends.d.ts +1 -1
  80. package/dist/components/ui/LegendaItem/LegendaItem.d.ts +1 -1
  81. package/dist/components/ui/LineListWidget/LineListWidget.d.ts +1 -1
  82. package/dist/components/ui/LineListWidget/LineListWidgetIsInEventCell.d.ts +1 -1
  83. package/dist/components/ui/LineListWidget/LineListWidgetIsOwnCaseCell.d.ts +1 -1
  84. package/dist/components/ui/LineListWidget/LineListWidgetPrimaryMenu.d.ts +1 -1
  85. package/dist/components/ui/LineListWidget/LineListWidgetSecondaryMenu.d.ts +1 -1
  86. package/dist/components/ui/LineListWidget/LineListWidgetTitle.d.ts +1 -1
  87. package/dist/components/ui/MapWidget/MapWidget.d.ts +1 -1
  88. package/dist/components/ui/PanelSeparator/PanelSeparatorHorizontal.d.ts +1 -1
  89. package/dist/components/ui/PanelSeparator/PanelSeparatorVertical.d.ts +1 -1
  90. package/dist/components/ui/PanelSeparator/index.js +50 -2
  91. package/dist/components/ui/PanelSeparator/index.js.map +1 -0
  92. package/dist/components/ui/TreeDescription/TreeDescription.d.ts +1 -1
  93. package/dist/components/ui/TreeWidget/TreeWidget.d.ts +1 -1
  94. package/dist/components/ui/Upload/Upload.d.ts +1 -1
  95. package/dist/components/ui/Upload/UploadCaseResultTable.d.ts +1 -1
  96. package/dist/components/ui/Upload/UploadCreateCases.d.ts +1 -1
  97. package/dist/components/ui/Upload/UploadMapColumns.d.ts +1 -1
  98. package/dist/components/ui/Upload/UploadMapSequences.d.ts +1 -1
  99. package/dist/components/ui/Upload/UploadNavigation.d.ts +1 -1
  100. package/dist/components/ui/Upload/UploadPreviewNavigation.d.ts +1 -1
  101. package/dist/components/ui/Upload/UploadSelectFile.d.ts +1 -1
  102. package/dist/components/ui/Upload/UploadSelectSequenceFiles.d.ts +1 -1
  103. package/dist/components/ui/UserRightsDialog/UserRightsDialogCaseAccessPolicy.d.ts +1 -1
  104. package/dist/components/ui/Warning/Warning.d.ts +1 -1
  105. package/dist/components/ui/WidgetHeaderIconButton/WidgetHeaderIconButton.d.ts +1 -1
  106. package/dist/components/ui/WidgetMenu/WidgetMenu.d.ts +1 -1
  107. package/dist/components/ui/WidgetUnavailable/WidgetUnavailable.d.ts +1 -1
  108. package/dist/context/caseAbac/CaseAbacContextProvider.d.ts +1 -1
  109. package/dist/context/caseTypeAbac/CaseTypeAbacContextProvider.d.ts +1 -1
  110. package/dist/pages/CaseDbUsersAdminPage/CaseDbUsersAdminPage.d.ts +1 -1
  111. package/dist/pages/CaseSetCategoryAdminPage/CaseSetCategoryAdminPage.d.ts +1 -1
  112. package/dist/pages/CaseSetStatusAdminPage/CaseSetStatusAdminPage.d.ts +1 -1
  113. package/dist/pages/CaseTypeSetCategoriesAdminPage/CaseTypeSetCategoriesAdminPage.d.ts +1 -1
  114. package/dist/pages/CaseTypeSetsAdminPage/CaseTypeSetsAdminPage.d.ts +1 -1
  115. package/dist/pages/CaseTypesAdminPage/CaseTypesAdminPage.d.ts +1 -1
  116. package/dist/pages/CasesDetailPage/CasesDetailPage.d.ts +1 -1
  117. package/dist/pages/CasesDetailPage/index.js +16 -16
  118. package/dist/pages/CasesPage/CasesPage.d.ts +1 -1
  119. package/dist/pages/ColSetsAdminPage/ColSetsAdminPage.d.ts +1 -1
  120. package/dist/pages/ColsAdminPage/ColsAdminPage.d.ts +1 -1
  121. package/dist/pages/ColsAdminPage/index.js +77 -77
  122. package/dist/pages/ColsAdminPage/index.js.map +1 -1
  123. package/dist/pages/ConceptRelationsAdminPage/ConceptRelationsAdminPage.d.ts +1 -1
  124. package/dist/pages/ConceptSetsAdminPage/ConceptSetsAdminPage.d.ts +1 -1
  125. package/dist/pages/ConceptsAdminPage/ConceptsAdminPage.d.ts +1 -1
  126. package/dist/pages/ConceptsAdminPage/index.js +31 -31
  127. package/dist/pages/DataCollectionSetsAdminPage/DataCollectionSetsAdminPage.d.ts +1 -1
  128. package/dist/pages/DataCollectionVisualizationPage/DataCollectionVisualizationPage.d.ts +1 -1
  129. package/dist/pages/DataCollectionVisualizationPage/index.js +1 -1
  130. package/dist/pages/DataCollectionVisualizationPage/index.js.map +1 -1
  131. package/dist/pages/DataCollectionsAdminPage/DataCollectionsAdminPage.d.ts +1 -1
  132. package/dist/pages/DimsAdminPage/DimsAdminPage.d.ts +1 -1
  133. package/dist/pages/DimsAdminPage/index.js +46 -46
  134. package/dist/pages/DiseasesAdminPage/DiseasesAdminPage.d.ts +1 -1
  135. package/dist/pages/EtiologicalAgentsAdminPage/EtiologicalAgentsAdminPage.d.ts +1 -1
  136. package/dist/pages/EtiologiesAdminPage/EtiologiesAdminPage.d.ts +1 -1
  137. package/dist/pages/EventsDetailPage/EventsDetailPage.d.ts +1 -1
  138. package/dist/pages/EventsDetailPage/index.js +18 -18
  139. package/dist/pages/EventsPage/EventsPage.d.ts +1 -1
  140. package/dist/pages/HomePage/HomePage.d.ts +1 -1
  141. package/dist/pages/OrganizationAccessCasePoliciesAdminPage/OrganizationAccessCasePoliciesAdminPage.d.ts +1 -1
  142. package/dist/pages/OrganizationShareCasePoliciesAdminPage/OrganizationShareCasePoliciesAdminPage.d.ts +1 -1
  143. package/dist/pages/RefColsAdminPage/RefColsAdminPage.d.ts +1 -1
  144. package/dist/pages/RefColsAdminPage/index.js +94 -94
  145. package/dist/pages/RefDimsAdminPage/RefDimsAdminPage.d.ts +1 -1
  146. package/dist/pages/RegionRelationsAdminPage/RegionRelationsAdminPage.d.ts +1 -1
  147. package/dist/pages/RegionSetShapesAdminPage/RegionSetShapesAdminPage.d.ts +1 -1
  148. package/dist/pages/RegionSetShapesAdminPage/index.js +26 -26
  149. package/dist/pages/RegionSetsAdminPage/RegionSetsAdminPage.d.ts +1 -1
  150. package/dist/pages/RegionsAdminPage/RegionsAdminPage.d.ts +1 -1
  151. package/dist/pages/RegionsAdminPage/index.js +33 -33
  152. package/dist/pages/TrendsPage/TrendsPage.d.ts +1 -1
  153. package/dist/pages/UploadPage/UploadPage.d.ts +1 -1
  154. package/dist/pages/UserAccessCasePoliciesAdminPage/UserAccessCasePoliciesAdminPage.d.ts +1 -1
  155. package/dist/pages/UserEffectiveRightsAdminPage/UserEffectiveRightsAdminPage.d.ts +1 -1
  156. package/dist/pages/UserEffectiveRightsAdminPage/index.js +56 -56
  157. package/dist/pages/UserEffectiveRightsAdminPage/index.js.map +1 -1
  158. package/dist/pages/UserEffectiveRightsTesterAdminPage/UserEffectiveRightsTesterAdminPage.d.ts +1 -1
  159. package/dist/pages/UserEffectiveRightsTesterAdminPage/index.js +45 -45
  160. package/dist/pages/UserEffectiveRightsTesterAdminPage/index.js.map +1 -1
  161. package/dist/pages/UserShareCasePoliciesAdminPage/UserShareCasePoliciesAdminPage.d.ts +1 -1
  162. package/dist/utils/CaseDbStandardConfigUtil/index.js +1 -5
  163. package/dist/utils/CaseDbStandardConfigUtil/index.js.map +1 -1
  164. package/dist/utils/MapUtil/index.js +1 -1
  165. package/dist/utils/MapUtil/index.js.map +1 -1
  166. package/package.json +33 -28
  167. package/dist/_chunks/PanelSeparator.js +0 -1666
  168. package/dist/_chunks/PanelSeparator.js.map +0 -1
  169. package/dist/_chunks/chunk-OB3PAWPO.js +0 -1162
  170. package/dist/_chunks/chunk-OB3PAWPO.js.map +0 -1
@@ -1,4 +1,4 @@
1
- //#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.6.0_react@19.3.0_/node_modules/zustand/esm/vanilla.mjs
1
+ //#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.mjs
2
2
  var e = (e) => {
3
3
  let t, n = /* @__PURE__ */ new Set(), r = (e, r) => {
4
4
  let i = typeof e == "function" ? e(t) : e;
@@ -1 +1 @@
1
- {"version":3,"file":"vanilla.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.6.0_react@19.3.0_/node_modules/zustand/esm/vanilla.mjs"],"sourcesContent":["const createStoreImpl = (createState) => {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (!Object.is(nextState, state)) {\n const previousState = state;\n state = (replace != null ? replace : typeof nextState !== \"object\" || nextState === null) ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const getInitialState = () => initialState;\n const subscribe = (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const api = { setState, getState, getInitialState, subscribe };\n const initialState = state = createState(setState, getState, api);\n return api;\n};\nconst createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);\n\nexport { createStore };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAM,KAAmB,MAAgB;CACvC,IAAI,GACE,oBAA4B,IAAI,IAAI,GACpC,KAAY,GAAS,MAAY;EACrC,IAAM,IAAY,OAAO,KAAY,aAAa,EAAQ,CAAK,IAAI;EACnE,IAAI,CAAC,OAAO,GAAG,GAAW,CAAK,GAAG;GAChC,IAAM,IAAgB;GAEtB,AADA,IAAS,MAA4B,OAAO,KAAc,aAAY,KAAsB,IAAY,OAAO,OAAO,CAAC,GAAG,GAAO,CAAS,GAC1I,EAAU,SAAS,MAAa,EAAS,GAAO,CAAa,CAAC;EAChE;CACF,GACM,UAAiB,GAMjB,IAAM;EAAE;EAAU;EAAU,uBALJ;EAKqB,YAJhC,OACjB,EAAU,IAAI,CAAQ,SACT,EAAU,OAAO,CAAQ;CAEqB,GACvD,IAAe,IAAQ,EAAY,GAAU,GAAU,CAAG;CAChE,OAAO;AACT,GACM,MAAgB,MAAgB,IAAc,EAAgB,CAAW,IAAI"}
1
+ {"version":3,"file":"vanilla.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.mjs"],"sourcesContent":["const createStoreImpl = (createState) => {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (!Object.is(nextState, state)) {\n const previousState = state;\n state = (replace != null ? replace : typeof nextState !== \"object\" || nextState === null) ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const getInitialState = () => initialState;\n const subscribe = (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const api = { setState, getState, getInitialState, subscribe };\n const initialState = state = createState(setState, getState, api);\n return api;\n};\nconst createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);\n\nexport { createStore };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAM,KAAmB,MAAgB;CACvC,IAAI,GACE,oBAA4B,IAAI,IAAI,GACpC,KAAY,GAAS,MAAY;EACrC,IAAM,IAAY,OAAO,KAAY,aAAa,EAAQ,CAAK,IAAI;EACnE,IAAI,CAAC,OAAO,GAAG,GAAW,CAAK,GAAG;GAChC,IAAM,IAAgB;GAEtB,AADA,IAAS,MAA4B,OAAO,KAAc,aAAY,KAAsB,IAAY,OAAO,OAAO,CAAC,GAAG,GAAO,CAAS,GAC1I,EAAU,SAAS,MAAa,EAAS,GAAO,CAAa,CAAC;EAChE;CACF,GACM,UAAiB,GAMjB,IAAM;EAAE;EAAU;EAAU,uBALJ;EAKqB,YAJhC,OACjB,EAAU,IAAI,CAAQ,SACT,EAAU,OAAO,CAAQ;CAEqB,GACvD,IAAe,IAAQ,EAAY,GAAU,GAAU,CAAG;CAChE,OAAO;AACT,GACM,MAAgB,MAAgB,IAAc,EAAgB,CAAW,IAAI"}
@@ -1,5 +1,5 @@
1
1
  import { appendErrors as e, get as t, set as n } from "react-hook-form";
2
- //#region ../../node_modules/.pnpm/@hookform+resolvers@5.9.1_@sinclair+typebox@0.34.49_@standard-schema+spec@1.1.0_ajv@8.2_26d561451bcf52899bfb24d45cfb94ee/node_modules/@hookform/resolvers/dist/resolvers.mjs
2
+ //#region ../../node_modules/.pnpm/@hookform+resolvers@5.9.1_ajv@8.20.0_react-hook-form@7.88.0_react@19.3.0__yup@1.7.1_zod@4.6.5/node_modules/@hookform/resolvers/dist/resolvers.mjs
3
3
  var r = (e, n, r) => {
4
4
  if (e && "reportValidity" in e) {
5
5
  let i = t(r, n);
@@ -29,7 +29,7 @@ function s(e) {
29
29
  return e.replace(/\[(\d+)]/g, ".$1").replace(/[[\]]/g, "");
30
30
  }
31
31
  //#endregion
32
- //#region ../../node_modules/.pnpm/@hookform+resolvers@5.9.1_@sinclair+typebox@0.34.49_@standard-schema+spec@1.1.0_ajv@8.2_26d561451bcf52899bfb24d45cfb94ee/node_modules/@hookform/resolvers/yup/dist/yup.mjs
32
+ //#region ../../node_modules/.pnpm/@hookform+resolvers@5.9.1_ajv@8.20.0_react-hook-form@7.88.0_react@19.3.0__yup@1.7.1_zod@4.6.5/node_modules/@hookform/resolvers/yup/dist/yup.mjs
33
33
  function c(t, n, r) {
34
34
  return r === void 0 && (r = {}), function(o, s, c) {
35
35
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"yup.js","names":["e","o","r","s","e","t","r"],"sources":["../../../../node_modules/.pnpm/@hookform+resolvers@5.9.1_@sinclair+typebox@0.34.49_@standard-schema+spec@1.1.0_ajv@8.2_26d561451bcf52899bfb24d45cfb94ee/node_modules/@hookform/resolvers/dist/resolvers.mjs","../../../../node_modules/.pnpm/@hookform+resolvers@5.9.1_@sinclair+typebox@0.34.49_@standard-schema+spec@1.1.0_ajv@8.2_26d561451bcf52899bfb24d45cfb94ee/node_modules/@hookform/resolvers/yup/dist/yup.mjs"],"sourcesContent":["import{get as e,set as r}from\"react-hook-form\";const t=(r,t,s)=>{if(r&&\"reportValidity\"in r){const o=e(s,t);r.setCustomValidity(o&&o.message||\"\"),r.reportValidity()}},s=(e,r)=>{for(const s in r.fields){const o=r.fields[s];o&&o.ref&&\"reportValidity\"in o.ref?t(o.ref,s,e):o&&o.refs&&o.refs.forEach(r=>t(r,s,e))}},o=(t,o)=>{o.shouldUseNativeValidation&&s(t,o);const n={};for(const s in t){const f=e(o.fields,s),c=Object.assign(t[s]||{},{ref:f&&f.refs?f.refs[0]:f&&f.ref});if(i(o.names||Object.keys(t),s)){const t=Object.assign({},e(n,s));r(t,\"root\",c),r(n,s,t)}else r(n,s,c)}return n},i=(e,r)=>{const t=n(r).replace(/[.*+?^${}()|\\\\]/g,\"\\\\$&\");return e.some(e=>n(e).match(`^${t}\\\\.\\\\d+`))};function n(e){return e.replace(/\\[(\\d+)]/g,\".$1\").replace(/[[\\]]/g,\"\")}export{o as toNestErrors,s as validateFieldsNatively};\n//# sourceMappingURL=resolvers.mjs.map\n","import{validateFieldsNatively as e,toNestErrors as t}from\"@hookform/resolvers\";import{appendErrors as r}from\"react-hook-form\";function o(o,n,a){return void 0===a&&(a={}),function(s,i,c){try{return Promise.resolve(function(t,r){try{var u=(null!=n&&n.context&&\"development\"===process.env.NODE_ENV&&console.warn(\"You should not used the yup options context. Please, use the 'useForm' context object instead\"),Promise.resolve(o[\"sync\"===a.mode?\"validateSync\":\"validate\"](s,Object.assign({abortEarly:!1},n,{context:i}))).then(function(t){return c.shouldUseNativeValidation&&e({},c),{values:a.raw?Object.assign({},s):t,errors:{}}}))}catch(e){return r(e)}return u&&u.then?u.then(void 0,r):u}(0,function(e){if(!e.inner)throw e;return{values:{},errors:t((o=e,n=!c.shouldUseNativeValidation&&\"all\"===c.criteriaMode,(o.inner||[]).reduce(function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),n){var o=e[t.path].types,a=o&&o[t.type];e[t.path]=r(t.path,n,e,t.type,a?[].concat(a,t.message):t.message)}return e},Object.create(null))),c)};var o,n}))}catch(e){return Promise.reject(e)}}}export{o as y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AAE,QAAMC,EAAE,EAAE,MAAK,GAAE,GAAE,EAAE,MAAK,IAAE,CAAC,CAAC,CAAC,OAAO,GAAE,EAAE,OAAO,IAAE,EAAE,OAAO;MAAC;MAAC,OAAO;KAAC,GAAE,OAAO,OAAO,IAAI,CAAC,IAAG,CAAC;IAAC;QAAM,GAAE;GAAC,CAAC,CAAC;EAAC,SAAO,GAAE;GAAC,OAAO,QAAQ,OAAO,CAAC;EAAC;CAAC;AAAC"}
1
+ {"version":3,"file":"yup.js","names":["e","o","r","s","e","t","r"],"sources":["../../../../node_modules/.pnpm/@hookform+resolvers@5.9.1_ajv@8.20.0_react-hook-form@7.88.0_react@19.3.0__yup@1.7.1_zod@4.6.5/node_modules/@hookform/resolvers/dist/resolvers.mjs","../../../../node_modules/.pnpm/@hookform+resolvers@5.9.1_ajv@8.20.0_react-hook-form@7.88.0_react@19.3.0__yup@1.7.1_zod@4.6.5/node_modules/@hookform/resolvers/yup/dist/yup.mjs"],"sourcesContent":["import{get as e,set as r}from\"react-hook-form\";const t=(r,t,s)=>{if(r&&\"reportValidity\"in r){const o=e(s,t);r.setCustomValidity(o&&o.message||\"\"),r.reportValidity()}},s=(e,r)=>{for(const s in r.fields){const o=r.fields[s];o&&o.ref&&\"reportValidity\"in o.ref?t(o.ref,s,e):o&&o.refs&&o.refs.forEach(r=>t(r,s,e))}},o=(t,o)=>{o.shouldUseNativeValidation&&s(t,o);const n={};for(const s in t){const f=e(o.fields,s),c=Object.assign(t[s]||{},{ref:f&&f.refs?f.refs[0]:f&&f.ref});if(i(o.names||Object.keys(t),s)){const t=Object.assign({},e(n,s));r(t,\"root\",c),r(n,s,t)}else r(n,s,c)}return n},i=(e,r)=>{const t=n(r).replace(/[.*+?^${}()|\\\\]/g,\"\\\\$&\");return e.some(e=>n(e).match(`^${t}\\\\.\\\\d+`))};function n(e){return e.replace(/\\[(\\d+)]/g,\".$1\").replace(/[[\\]]/g,\"\")}export{o as toNestErrors,s as validateFieldsNatively};\n//# sourceMappingURL=resolvers.mjs.map\n","import{validateFieldsNatively as e,toNestErrors as t}from\"@hookform/resolvers\";import{appendErrors as r}from\"react-hook-form\";function o(o,n,a){return void 0===a&&(a={}),function(s,i,c){try{return Promise.resolve(function(t,r){try{var u=(null!=n&&n.context&&\"development\"===process.env.NODE_ENV&&console.warn(\"You should not used the yup options context. Please, use the 'useForm' context object instead\"),Promise.resolve(o[\"sync\"===a.mode?\"validateSync\":\"validate\"](s,Object.assign({abortEarly:!1},n,{context:i}))).then(function(t){return c.shouldUseNativeValidation&&e({},c),{values:a.raw?Object.assign({},s):t,errors:{}}}))}catch(e){return r(e)}return u&&u.then?u.then(void 0,r):u}(0,function(e){if(!e.inner)throw e;return{values:{},errors:t((o=e,n=!c.shouldUseNativeValidation&&\"all\"===c.criteriaMode,(o.inner||[]).reduce(function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),n){var o=e[t.path].types,a=o&&o[t.type];e[t.path]=r(t.path,n,e,t.type,a?[].concat(a,t.message):t.message)}return e},Object.create(null))),c)};var o,n}))}catch(e){return Promise.reject(e)}}}export{o as yupResolver};\n//# sourceMappingURL=yup.module.js.map\n"],"x_google_ignoreList":[0,1],"mappings":";;AAA+C,IAAM,KAAG,GAAE,GAAE,MAAI;CAAC,IAAG,KAAG,oBAAmB,GAAE;EAAC,IAAM,IAAEA,EAAE,GAAE,CAAC;EAAE,EAAE,kBAAkB,KAAG,EAAE,WAAS,EAAE,GAAE,EAAE,eAAe;CAAC;AAAC,GAAE,KAAG,GAAE,MAAI;CAAC,KAAI,IAAM,KAAK,EAAE,QAAO;EAAC,IAAM,IAAE,EAAE,OAAO;EAAG,KAAG,EAAE,OAAK,oBAAmB,EAAE,MAAI,EAAE,EAAE,KAAI,GAAE,CAAC,IAAE,KAAG,EAAE,QAAM,EAAE,KAAK,SAAQ,MAAG,EAAE,GAAE,GAAE,CAAC,CAAC;CAAC;AAAC,GAAEC,KAAG,GAAE,MAAI;CAAC,EAAE,6BAA2B,EA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OAAO,EAAE,6BAA2BC,EAAE,CAAC,GAAE,CAAC,GAAE;OAAC,QAAO,EAAE,MAAI,OAAO,OAAO,CAAC,GAAED,CAAC,IAAE;OAAE,QAAO,CAAC;MAAC;KAAC,CAAC;IAAE,SAAO,GAAE;KAAC,OAAO,EAAE,CAAC;IAAC;IAAC,OAAO,KAAG,EAAE,OAAK,EAAE,KAAK,KAAK,GAAE,CAAC,IAAE;GAAC,EAAE,GAAE,SAAS,GAAE;IAAC,IAAG,CAAC,EAAE,OAAM,MAAM;IAAE,OAAM;KAAC,QAAO,CAAC;KAAE,QAAOE,GAAG,IAAE,GAAE,IAAE,CAAC,EAAE,6BAAmC,EAAE,iBAAV,QAAwB,EAAE,SAAO,CAAC,EAAA,CAAG,OAAO,SAAS,GAAE,GAAE;MAAC,IAAG,EAAE,EAAE,UAAQ,EAAE,EAAE,QAAM;OAAC,SAAQ,EAAE;OAAQ,MAAK,EAAE;MAAI,IAAG,GAAE;OAAC,IAAI,IAAE,EAAE,EAAE,KAAK,CAAC,OAAM,IAAE,KAAG,EAAE,EAAE;OAAM,EAAE,EAAE,QAAMC,EAAE,EAAE,MAAK,GAAE,GAAE,EAAE,MAAK,IAAE,CAAC,CAAC,CAAC,OAAO,GAAE,EAAE,OAAO,IAAE,EAAE,OAAO;MAAC;MAAC,OAAO;KAAC,GAAE,OAAO,OAAO,IAAI,CAAC,IAAG,CAAC;IAAC;QAAM,GAAE;GAAC,CAAC,CAAC;EAAC,SAAO,GAAE;GAAC,OAAO,QAAQ,OAAO,CAAC;EAAC;CAAC;AAAC"}
@@ -1 +1 @@
1
- export declare const CaseDbApp: () => import("react").JSX.Element;
1
+ export declare const CaseDbApp: () => import('react').JSX.Element;
@@ -3,4 +3,4 @@ export type AddCasesToEventDialogSuccessNotificationMessageProps = {
3
3
  readonly caseSet: CaseDbCaseSet;
4
4
  readonly numAddedCases: number;
5
5
  };
6
- export declare const AddCasesToEventDialogSuccessNotificationMessage: ({ caseSet, numAddedCases }: AddCasesToEventDialogSuccessNotificationMessageProps) => import("react").JSX.Element;
6
+ export declare const AddCasesToEventDialogSuccessNotificationMessage: ({ caseSet, numAddedCases }: AddCasesToEventDialogSuccessNotificationMessageProps) => import('react').JSX.Element;
@@ -7,4 +7,4 @@ export type CaseContentFormProps = {
7
7
  readonly formId: string;
8
8
  readonly onSubmit: (caseId: string, content: CaseDbCase['content']) => void;
9
9
  };
10
- export declare const CaseContentForm: ({ caseContent, caseId, completeCaseType, enabledColIds, formId, onSubmit }: CaseContentFormProps) => import("react").JSX.Element;
10
+ export declare const CaseContentForm: ({ caseContent, caseId, completeCaseType, enabledColIds, formId, onSubmit }: CaseContentFormProps) => import('react').JSX.Element;
@@ -3,4 +3,4 @@ import { CaseDbCase } from '@gen-epix/api-casedb';
3
3
  export type CaseCaseSetInfoProps = {
4
4
  readonly caseDbCase: CaseDbCase;
5
5
  } & BoxProps;
6
- export declare const CaseCaseSetInfo: ({ caseDbCase, ...boxProps }: CaseCaseSetInfoProps) => import("react").JSX.Element;
6
+ export declare const CaseCaseSetInfo: ({ caseDbCase, ...boxProps }: CaseCaseSetInfoProps) => import('react').JSX.Element;
@@ -3,4 +3,4 @@ import { CaseDbCase } from '@gen-epix/api-casedb';
3
3
  export type CaseContentProps = {
4
4
  readonly caseDbCase: CaseDbCase;
5
5
  } & BoxProps;
6
- export declare const CaseContent: ({ caseDbCase, ...boxProps }: CaseContentProps) => import("react").JSX.Element;
6
+ export declare const CaseContent: ({ caseDbCase, ...boxProps }: CaseContentProps) => import('react').JSX.Element;
@@ -7,4 +7,4 @@ export type CaseInfoFormProps = {
7
7
  readonly onFinish: () => void;
8
8
  readonly onIsSavingChange: (isSaving: boolean) => void;
9
9
  } & BoxProps;
10
- export declare const CaseInfoForm: ({ caseDbCase, caseRights, formId, onFinish, onIsSavingChange, ...boxProps }: CaseInfoFormProps) => import("react").JSX.Element;
10
+ export declare const CaseInfoForm: ({ caseDbCase, caseRights, formId, onFinish, onIsSavingChange, ...boxProps }: CaseInfoFormProps) => import('react').JSX.Element;
@@ -6,4 +6,4 @@ export type CaseSharingFormProps = {
6
6
  readonly onFinish: () => void;
7
7
  readonly onIsSavingChange: (isSaving: boolean) => void;
8
8
  } & BoxProps;
9
- export declare const CaseSharingForm: ({ caseDbCase, formId, onFinish, onIsSavingChange, ...boxProps }: CaseSharingFormProps) => import("react").JSX.Element;
9
+ export declare const CaseSharingForm: ({ caseDbCase, formId, onFinish, onIsSavingChange, ...boxProps }: CaseSharingFormProps) => import('react').JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { BoxProps } from '@mui/material';
2
2
  export type CaseSharingInfoProps = BoxProps;
3
- export declare const CaseSharingInfo: ({ ...boxProps }: CaseSharingInfoProps) => import("react").JSX.Element;
3
+ export declare const CaseSharingInfo: ({ ...boxProps }: CaseSharingInfoProps) => import('react').JSX.Element;
@@ -3,4 +3,4 @@ import { CaseDbCase } from '@gen-epix/api-casedb';
3
3
  export type ReadOnlyCaseContentProps = {
4
4
  readonly caseDbCase: CaseDbCase;
5
5
  } & BoxProps;
6
- export declare const ReadOnlyCaseContent: ({ caseDbCase, ...boxProps }: ReadOnlyCaseContentProps) => import("react").JSX.Element;
6
+ export declare const ReadOnlyCaseContent: ({ caseDbCase, ...boxProps }: ReadOnlyCaseContentProps) => import('react').JSX.Element;
@@ -3,4 +3,4 @@ import { CaseDbCaseSet } from '@gen-epix/api-casedb';
3
3
  export type CaseSetContentProps = {
4
4
  readonly caseSet: CaseDbCaseSet;
5
5
  } & BoxProps;
6
- export declare const CaseSetContent: ({ caseSet, ...boxProps }: CaseSetContentProps) => import("react").JSX.Element;
6
+ export declare const CaseSetContent: ({ caseSet, ...boxProps }: CaseSetContentProps) => import('react').JSX.Element;
@@ -3,4 +3,4 @@ import { CaseDbCaseSet } from '@gen-epix/api-casedb';
3
3
  export type CaseSetDescriptionProps = {
4
4
  readonly caseSet: CaseDbCaseSet;
5
5
  } & BoxProps;
6
- export declare const CaseSetDescription: ({ caseSet, ...boxProps }: CaseSetDescriptionProps) => import("react").JSX.Element;
6
+ export declare const CaseSetDescription: ({ caseSet, ...boxProps }: CaseSetDescriptionProps) => import('react').JSX.Element;
@@ -5,4 +5,4 @@ export type CaseSetFormProps = {
5
5
  readonly onFinish: () => void;
6
6
  readonly onIsSavingChange: (isSaving: boolean) => void;
7
7
  };
8
- export declare const CaseSetForm: ({ caseSet, formId, onFinish, onIsSavingChange }: CaseSetFormProps) => import("react").JSX.Element;
8
+ export declare const CaseSetForm: ({ caseSet, formId, onFinish, onIsSavingChange }: CaseSetFormProps) => import('react').JSX.Element;
@@ -7,4 +7,4 @@ export type CaseSetSharingFormProps = {
7
7
  readonly onFinish: () => void;
8
8
  readonly onIsSavingChange: (isSaving: boolean) => void;
9
9
  } & BoxProps;
10
- export declare const CaseSetSharingForm: ({ caseSet, caseTypeId, formId, onFinish, onIsSavingChange, ...boxProps }: CaseSetSharingFormProps) => import("react").JSX.Element;
10
+ export declare const CaseSetSharingForm: ({ caseSet, caseTypeId, formId, onFinish, onIsSavingChange, ...boxProps }: CaseSetSharingFormProps) => import('react').JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { BoxProps } from '@mui/material';
2
2
  export type CaseSetSharingInfoProps = BoxProps;
3
- export declare const CaseSetSharingInfo: ({ ...boxProps }: CaseSetSharingInfoProps) => import("react").JSX.Element;
3
+ export declare const CaseSetSharingInfo: ({ ...boxProps }: CaseSetSharingInfoProps) => import('react').JSX.Element;
@@ -2,4 +2,4 @@ import { CaseDbCase } from '@gen-epix/api-casedb';
2
2
  export type CaseSummaryProps = {
3
3
  readonly caseDbCase: CaseDbCase;
4
4
  };
5
- export declare const CaseSummary: ({ caseDbCase }: CaseSummaryProps) => import("react").JSX.Element;
5
+ export declare const CaseSummary: ({ caseDbCase }: CaseSummaryProps) => import('react').JSX.Element;
@@ -2,4 +2,4 @@ import { CaseDbCompleteCaseType } from '@gen-epix/api-casedb';
2
2
  export type CaseTypeInfoAccessRightsProps = {
3
3
  readonly completeCaseType: CaseDbCompleteCaseType;
4
4
  };
5
- export declare const CaseTypeInfoAccessRights: ({ completeCaseType }: CaseTypeInfoAccessRightsProps) => import("react").JSX.Element;
5
+ export declare const CaseTypeInfoAccessRights: ({ completeCaseType }: CaseTypeInfoAccessRightsProps) => import('react').JSX.Element;
@@ -1,4 +1,4 @@
1
1
  export type CaseTypeInfoColAccessRightsProps = {
2
2
  readonly colId: string;
3
3
  };
4
- export declare const CaseTypeInfoColAccessRights: ({ colId }: CaseTypeInfoColAccessRightsProps) => import("react").JSX.Element;
4
+ export declare const CaseTypeInfoColAccessRights: ({ colId }: CaseTypeInfoColAccessRightsProps) => import('react').JSX.Element;
@@ -2,4 +2,4 @@ export type CaseTypeInfoDataProps = {
2
2
  readonly name: string;
3
3
  readonly title: string;
4
4
  };
5
- export declare const CaseTypeInfoData: ({ name, title }: CaseTypeInfoDataProps) => import("react").JSX.Element;
5
+ export declare const CaseTypeInfoData: ({ name, title }: CaseTypeInfoDataProps) => import('react').JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { WithDialogRenderProps } from '@gen-epix/ui-core-components/hoc/withDialog';
2
2
  export type CaseTypeInfoDialogContentProps = Pick<WithDialogRenderProps, 'onPermalinkChange' | 'onTitleChange'>;
3
- export declare const CaseTypeInfoDialogContent: ({ onPermalinkChange, onTitleChange }: CaseTypeInfoDialogContentProps) => import("react").JSX.Element;
3
+ export declare const CaseTypeInfoDialogContent: ({ onPermalinkChange, onTitleChange }: CaseTypeInfoDialogContentProps) => import('react').JSX.Element;
@@ -2,4 +2,4 @@ import { CaseDbCompleteCaseType } from '@gen-epix/api-casedb';
2
2
  export type CaseTypeInfoRegionsProps = {
3
3
  readonly completeCaseType: CaseDbCompleteCaseType;
4
4
  };
5
- export declare const CaseTypeInfoRegions: ({ completeCaseType }: CaseTypeInfoRegionsProps) => import("react").JSX.Element;
5
+ export declare const CaseTypeInfoRegions: ({ completeCaseType }: CaseTypeInfoRegionsProps) => import('react').JSX.Element;
@@ -2,4 +2,4 @@ import { CaseDbCompleteCaseType } from '@gen-epix/api-casedb';
2
2
  export type CaseTypeInfoTreesProps = {
3
3
  readonly completeCaseType: CaseDbCompleteCaseType;
4
4
  };
5
- export declare const CaseTypeInfoTrees: ({ completeCaseType }: CaseTypeInfoTreesProps) => import("react").JSX.Element;
5
+ export declare const CaseTypeInfoTrees: ({ completeCaseType }: CaseTypeInfoTreesProps) => import('react').JSX.Element;
@@ -2,4 +2,4 @@ import { CaseDbCompleteCaseType } from '@gen-epix/api-casedb';
2
2
  export type CaseTypeInfoValuesProps = {
3
3
  readonly completeCaseType: CaseDbCompleteCaseType;
4
4
  };
5
- export declare const CaseTypeInfoValues: ({ completeCaseType }: CaseTypeInfoValuesProps) => import("react").JSX.Element;
5
+ export declare const CaseTypeInfoValues: ({ completeCaseType }: CaseTypeInfoValuesProps) => import('react').JSX.Element;
@@ -3,4 +3,4 @@ export type CaseTypeInfoVariableDetailsProps = {
3
3
  readonly completeCaseType: CaseDbCompleteCaseType;
4
4
  readonly dim: CaseDbDim;
5
5
  };
6
- export declare const CaseTypeInfoVariableDetails: ({ completeCaseType, dim }: CaseTypeInfoVariableDetailsProps) => import("react").JSX.Element;
6
+ export declare const CaseTypeInfoVariableDetails: ({ completeCaseType, dim }: CaseTypeInfoVariableDetailsProps) => import('react').JSX.Element;
@@ -2,4 +2,4 @@ import { CaseDbCase } from '@gen-epix/api-casedb';
2
2
  export type CasesAlreadyInCaseSetWarningProps = {
3
3
  readonly cases: CaseDbCase[];
4
4
  };
5
- export declare const CasesAlreadyInCaseSetWarning: ({ cases }: CasesAlreadyInCaseSetWarningProps) => import("react").JSX.Element;
5
+ export declare const CasesAlreadyInCaseSetWarning: ({ cases }: CasesAlreadyInCaseSetWarningProps) => import('react').JSX.Element;
@@ -2,4 +2,4 @@ import { CaseDbCaseSet } from '@gen-epix/api-casedb';
2
2
  export type CasesAlreadyInCaseSetWarningCaseSetLinkProps = {
3
3
  readonly caseSet: CaseDbCaseSet;
4
4
  };
5
- export declare const CasesAlreadyInCaseSetWarningCaseSetLink: ({ caseSet }: CasesAlreadyInCaseSetWarningCaseSetLinkProps) => import("react").JSX.Element;
5
+ export declare const CasesAlreadyInCaseSetWarningCaseSetLink: ({ caseSet }: CasesAlreadyInCaseSetWarningCaseSetLinkProps) => import('react').JSX.Element;
@@ -4,4 +4,4 @@ export type CompletCaseTypeLoaderProps = PropsWithChildren<{
4
4
  readonly caseTypeId: string;
5
5
  readonly onCompleteCaseTypeLoaded?: (completeCaseType: CaseDbCompleteCaseType) => void;
6
6
  }>;
7
- export declare const CompletCaseTypeLoader: ({ caseTypeId, children, onCompleteCaseTypeLoaded }: CompletCaseTypeLoaderProps) => import("react").JSX.Element;
7
+ export declare const CompletCaseTypeLoader: ({ caseTypeId, children, onCompleteCaseTypeLoaded }: CompletCaseTypeLoaderProps) => import('react').JSX.Element;
@@ -16,5 +16,5 @@ export type ContextMenuProps = {
16
16
  readonly onMenuClose: () => void;
17
17
  };
18
18
  type ContextMenuConfig = ContextMenuConfigWithAnchor & ContextMenuConfigWithPosition;
19
- export declare const ContextMenu: ({ config, getExtraItems, onMenuClose }: ContextMenuProps) => import("react").JSX.Element;
19
+ export declare const ContextMenu: ({ config, getExtraItems, onMenuClose }: ContextMenuProps) => import('react').JSX.Element;
20
20
  export {};
@@ -14,7 +14,7 @@ var v = ({ config: v, getExtraItems: y, onMenuClose: b }) => {
14
14
  let { t: x } = d(), S = s(n), C = t(S, (e) => e.selectedIds), w = t(S, (e) => e.setSelectedIds), T = u(() => v?.parseIdsFromAnchorElement ? v.parseIdsFromAnchorElement(v.anchorElement) : v?.caseIds ? v.caseIds : [], [v]);
15
15
  l(() => {
16
16
  let t = v?.mouseEvent;
17
- if (!(!t || !t.metaKey && !t.ctrlKey)) {
17
+ if (t && (t.metaKey || t.ctrlKey)) {
18
18
  if (e.canAddToSelection(T, C)) {
19
19
  w(e.addComponentCaseIdsToSelection(T, C)), b();
20
20
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/ui/ContextMenu/ContextMenu.tsx"],"sourcesContent":["import type { PopoverPosition } from '@mui/material';\nimport {\n ListItemIcon,\n ListItemText,\n Menu,\n MenuItem,\n} from '@mui/material';\nimport PlaylistAddCheckIcon from '@mui/icons-material/PlaylistAddCheck';\nimport PlaylistAddIcon from '@mui/icons-material/PlaylistAdd';\nimport PlaylistRemoveIcon from '@mui/icons-material/PlaylistRemove';\nimport PlaylistPlayIcon from '@mui/icons-material/PlaylistPlay';\nimport type { ReactElement } from 'react';\nimport {\n use,\n useCallback,\n useEffect,\n useMemo,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useStore } from 'zustand';\n\nimport { DashboardStoreContext } from '../../../stores/dashboardStore';\nimport { CaseSelectionUtil } from '../../../utils/CaseSelectionUtil';\n\nexport type ContextMenuConfigWithAnchor = {\n anchorElement?: Element;\n mouseEvent?: MouseEvent;\n parseIdsFromAnchorElement?: (element: Element) => string[];\n};\n\nexport type ContextMenuConfigWithPosition = {\n caseIds?: string[];\n mouseEvent?: MouseEvent;\n position?: PopoverPosition;\n};\n\nexport type ContextMenuProps = {\n readonly config: ContextMenuConfig;\n readonly getExtraItems?: (onMenuClose?: () => void) => ReactElement;\n readonly onMenuClose: () => void;\n};\n\ntype ContextMenuConfig = ContextMenuConfigWithAnchor & ContextMenuConfigWithPosition;\n\nexport const ContextMenu = ({ config, getExtraItems, onMenuClose }: ContextMenuProps) => {\n const { t } = useTranslation();\n const dashboardStore = use(DashboardStoreContext);\n const selectedIds = useStore(dashboardStore, (state) => state.selectedIds);\n const setSelectedIds = useStore(dashboardStore, (state) => state.setSelectedIds);\n\n const componentCaseIds = useMemo(() => {\n if (config?.parseIdsFromAnchorElement) {\n return config.parseIdsFromAnchorElement(config.anchorElement);\n }\n if (config?.caseIds) {\n return config.caseIds;\n }\n return [];\n }, [config]);\n\n useEffect(() => {\n const mouseEvent = config?.mouseEvent;\n if (!mouseEvent || (!mouseEvent.metaKey && !mouseEvent.ctrlKey)) {\n return;\n }\n if (CaseSelectionUtil.canAddToSelection(componentCaseIds, selectedIds)) {\n setSelectedIds(CaseSelectionUtil.addComponentCaseIdsToSelection(componentCaseIds, selectedIds));\n onMenuClose();\n return;\n }\n if (CaseSelectionUtil.canRemoveFromSelection(componentCaseIds, selectedIds)) {\n setSelectedIds(CaseSelectionUtil.removeComponentCaseIdsFromSelection(componentCaseIds, selectedIds));\n onMenuClose();\n return;\n }\n }, [componentCaseIds, config?.mouseEvent, selectedIds, setSelectedIds, onMenuClose]);\n\n\n const onMenuSelectClick = useCallback(() => {\n setSelectedIds(componentCaseIds);\n onMenuClose();\n }, [componentCaseIds, onMenuClose, setSelectedIds]);\n\n const onAddToSelectionMenuItemClick = useCallback(() => {\n setSelectedIds(CaseSelectionUtil.addComponentCaseIdsToSelection(componentCaseIds, selectedIds));\n onMenuClose();\n }, [componentCaseIds, onMenuClose, setSelectedIds, selectedIds]);\n\n const onRemoveFromSelectionMenuItemClick = useCallback(() => {\n setSelectedIds(CaseSelectionUtil.removeComponentCaseIdsFromSelection(componentCaseIds, selectedIds));\n onMenuClose();\n }, [componentCaseIds, onMenuClose, setSelectedIds, selectedIds]);\n\n const onRefineSelectionMenuItemClick = useCallback(() => {\n setSelectedIds(CaseSelectionUtil.refineSelectionWithComponentCaseIds(componentCaseIds, selectedIds));\n onMenuClose();\n }, [componentCaseIds, onMenuClose, setSelectedIds, selectedIds]);\n\n const extraItems = getExtraItems ? getExtraItems(onMenuClose) : null;\n\n return (\n <Menu\n anchorEl={config?.anchorElement}\n anchorPosition={config?.position}\n anchorReference={config?.anchorElement ? 'anchorEl' : 'anchorPosition'}\n onClose={onMenuClose}\n open={!!config}\n >\n {extraItems}\n <MenuItem\n disabled={componentCaseIds.length === 0}\n onClick={onMenuSelectClick}\n >\n <ListItemIcon>\n <PlaylistAddCheckIcon fontSize={'small'} />\n </ListItemIcon>\n <ListItemText>\n {t`Select rows`}\n </ListItemText>\n </MenuItem>\n <MenuItem\n disabled={!CaseSelectionUtil.canAddToSelection(componentCaseIds, selectedIds)}\n onClick={onAddToSelectionMenuItemClick}\n >\n <ListItemIcon>\n <PlaylistAddIcon fontSize={'small'} />\n </ListItemIcon>\n <ListItemText>\n {t`Add to selected rows`}\n </ListItemText>\n </MenuItem>\n <MenuItem\n disabled={!CaseSelectionUtil.canRemoveFromSelection(componentCaseIds, selectedIds)}\n onClick={onRemoveFromSelectionMenuItemClick}\n >\n <ListItemIcon>\n <PlaylistRemoveIcon fontSize={'small'} />\n </ListItemIcon>\n <ListItemText>\n {t`Remove from selected rows`}\n </ListItemText>\n </MenuItem>\n <MenuItem\n disabled={!CaseSelectionUtil.canRefineSelection(componentCaseIds, selectedIds)}\n onClick={onRefineSelectionMenuItemClick}\n >\n <ListItemIcon>\n <PlaylistPlayIcon fontSize={'small'} />\n </ListItemIcon>\n <ListItemText>\n {t`Refine selected rows (intersect)`}\n </ListItemText>\n </MenuItem>\n </Menu>\n );\n};\n"],"mappings":";;;;;;;;;;;;AA4CA,IAAa,KAAe,EAAE,WAAQ,kBAAe,qBAAoC;CACvF,IAAM,EAAE,SAAM,EAAe,GACvB,IAAiB,EAAI,CAAqB,GAC1C,IAAc,EAAS,IAAiB,MAAU,EAAM,WAAW,GACnE,IAAiB,EAAS,IAAiB,MAAU,EAAM,cAAc,GAEzE,IAAmB,QACnB,GAAQ,4BACH,EAAO,0BAA0B,EAAO,aAAa,IAE1D,GAAQ,UACH,EAAO,UAET,CAAC,GACP,CAAC,CAAM,CAAC;CAEX,QAAgB;EACd,IAAM,IAAa,GAAQ;EACvB,OAAC,KAAe,CAAC,EAAW,WAAW,CAAC,EAAW,UAGvD;OAAI,EAAkB,kBAAkB,GAAkB,CAAW,GAAG;IAEtE,AADA,EAAe,EAAkB,+BAA+B,GAAkB,CAAW,CAAC,GAC9F,EAAY;IACZ;GACF;GACA,IAAI,EAAkB,uBAAuB,GAAkB,CAAW,GAAG;IAE3E,AADA,EAAe,EAAkB,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uBACU,CAAA,CACN;;GACV,kBAAC,GAAD;IACE,UAAU,CAAC,EAAkB,uBAAuB,GAAkB,CAAW;IACjF,SAAS;IAFX,UAAA,CAIE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAoB,UAAU,QAAU,CAAA,EAC5B,CAAA,GACd,kBAAC,GAAD,EAAA,UACG,CAAC,4BACU,CAAA,CACN;;GACV,kBAAC,GAAD;IACE,UAAU,CAAC,EAAkB,mBAAmB,GAAkB,CAAW;IAC7E,SAAS;IAFX,UAAA,CAIE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAkB,UAAU,QAAU,CAAA,EAC1B,CAAA,GACd,kBAAC,GAAD,EAAA,UACG,CAAC,mCACU,CAAA,CACN;;EACN;;AAEV"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/ui/ContextMenu/ContextMenu.tsx"],"sourcesContent":["import type { PopoverPosition } from '@mui/material';\nimport {\n ListItemIcon,\n ListItemText,\n Menu,\n MenuItem,\n} from '@mui/material';\nimport PlaylistAddCheckIcon from '@mui/icons-material/PlaylistAddCheck';\nimport PlaylistAddIcon from '@mui/icons-material/PlaylistAdd';\nimport PlaylistRemoveIcon from '@mui/icons-material/PlaylistRemove';\nimport PlaylistPlayIcon from '@mui/icons-material/PlaylistPlay';\nimport type { ReactElement } from 'react';\nimport {\n use,\n useCallback,\n useEffect,\n useMemo,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useStore } from 'zustand';\n\nimport { DashboardStoreContext } from '../../../stores/dashboardStore';\nimport { CaseSelectionUtil } from '../../../utils/CaseSelectionUtil';\n\nexport type ContextMenuConfigWithAnchor = {\n anchorElement?: Element;\n mouseEvent?: MouseEvent;\n parseIdsFromAnchorElement?: (element: Element) => string[];\n};\n\nexport type ContextMenuConfigWithPosition = {\n caseIds?: string[];\n mouseEvent?: MouseEvent;\n position?: PopoverPosition;\n};\n\nexport type ContextMenuProps = {\n readonly config: ContextMenuConfig;\n readonly getExtraItems?: (onMenuClose?: () => void) => ReactElement;\n readonly onMenuClose: () => void;\n};\n\ntype ContextMenuConfig = ContextMenuConfigWithAnchor & ContextMenuConfigWithPosition;\n\nexport const ContextMenu = ({ config, getExtraItems, onMenuClose }: ContextMenuProps) => {\n const { t } = useTranslation();\n const dashboardStore = use(DashboardStoreContext);\n const selectedIds = useStore(dashboardStore, (state) => state.selectedIds);\n const setSelectedIds = useStore(dashboardStore, (state) => state.setSelectedIds);\n\n const componentCaseIds = useMemo(() => {\n if (config?.parseIdsFromAnchorElement) {\n return config.parseIdsFromAnchorElement(config.anchorElement);\n }\n if (config?.caseIds) {\n return config.caseIds;\n }\n return [];\n }, [config]);\n\n useEffect(() => {\n const mouseEvent = config?.mouseEvent;\n if (!mouseEvent || (!mouseEvent.metaKey && !mouseEvent.ctrlKey)) {\n return;\n }\n if (CaseSelectionUtil.canAddToSelection(componentCaseIds, selectedIds)) {\n setSelectedIds(CaseSelectionUtil.addComponentCaseIdsToSelection(componentCaseIds, selectedIds));\n onMenuClose();\n return;\n }\n if (CaseSelectionUtil.canRemoveFromSelection(componentCaseIds, selectedIds)) {\n setSelectedIds(CaseSelectionUtil.removeComponentCaseIdsFromSelection(componentCaseIds, selectedIds));\n onMenuClose();\n return;\n }\n }, [componentCaseIds, config?.mouseEvent, selectedIds, setSelectedIds, onMenuClose]);\n\n\n const onMenuSelectClick = useCallback(() => {\n setSelectedIds(componentCaseIds);\n onMenuClose();\n }, [componentCaseIds, onMenuClose, setSelectedIds]);\n\n const onAddToSelectionMenuItemClick = useCallback(() => {\n setSelectedIds(CaseSelectionUtil.addComponentCaseIdsToSelection(componentCaseIds, selectedIds));\n onMenuClose();\n }, [componentCaseIds, onMenuClose, setSelectedIds, selectedIds]);\n\n const onRemoveFromSelectionMenuItemClick = useCallback(() => {\n setSelectedIds(CaseSelectionUtil.removeComponentCaseIdsFromSelection(componentCaseIds, selectedIds));\n onMenuClose();\n }, [componentCaseIds, onMenuClose, setSelectedIds, selectedIds]);\n\n const onRefineSelectionMenuItemClick = useCallback(() => {\n setSelectedIds(CaseSelectionUtil.refineSelectionWithComponentCaseIds(componentCaseIds, selectedIds));\n onMenuClose();\n }, [componentCaseIds, onMenuClose, setSelectedIds, selectedIds]);\n\n const extraItems = getExtraItems ? getExtraItems(onMenuClose) : null;\n\n return (\n <Menu\n anchorEl={config?.anchorElement}\n anchorPosition={config?.position}\n anchorReference={config?.anchorElement ? 'anchorEl' : 'anchorPosition'}\n onClose={onMenuClose}\n open={!!config}\n >\n {extraItems}\n <MenuItem\n disabled={componentCaseIds.length === 0}\n onClick={onMenuSelectClick}\n >\n <ListItemIcon>\n <PlaylistAddCheckIcon fontSize={'small'} />\n </ListItemIcon>\n <ListItemText>\n {t`Select rows`}\n </ListItemText>\n </MenuItem>\n <MenuItem\n disabled={!CaseSelectionUtil.canAddToSelection(componentCaseIds, selectedIds)}\n onClick={onAddToSelectionMenuItemClick}\n >\n <ListItemIcon>\n <PlaylistAddIcon fontSize={'small'} />\n </ListItemIcon>\n <ListItemText>\n {t`Add to selected rows`}\n </ListItemText>\n </MenuItem>\n <MenuItem\n disabled={!CaseSelectionUtil.canRemoveFromSelection(componentCaseIds, selectedIds)}\n onClick={onRemoveFromSelectionMenuItemClick}\n >\n <ListItemIcon>\n <PlaylistRemoveIcon fontSize={'small'} />\n </ListItemIcon>\n <ListItemText>\n {t`Remove from selected rows`}\n </ListItemText>\n </MenuItem>\n <MenuItem\n disabled={!CaseSelectionUtil.canRefineSelection(componentCaseIds, selectedIds)}\n onClick={onRefineSelectionMenuItemClick}\n >\n <ListItemIcon>\n <PlaylistPlayIcon fontSize={'small'} />\n </ListItemIcon>\n <ListItemText>\n {t`Refine selected rows (intersect)`}\n </ListItemText>\n </MenuItem>\n </Menu>\n );\n};\n"],"mappings":";;;;;;;;;;;;AA4CA,IAAa,KAAe,EAAE,WAAQ,kBAAe,qBAAoC;CACvF,IAAM,EAAE,SAAM,EAAe,GACvB,IAAiB,EAAI,CAAqB,GA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AAQ,gBAAgB,aAAa;EACtD,SAAS;EACT,MAAM,CAAC,CAAC;EALV,UAAA;GAOG;GACD,kBAAC,GAAD;IACE,UAAU,EAAiB,WAAW;IACtC,SAAS;IAFX,UAAA,CAIE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAsB,UAAU,QAAU,CAAA,EAC9B,CAAA,GACd,kBAAC,GAAD,EAAA,UACG,CAAC,cACU,CAAA,CACN;;GACV,kBAAC,GAAD;IACE,UAAU,CAAC,EAAkB,kBAAkB,GAAkB,CAAW;IAC5E,SAAS;IAFX,UAAA,CAIE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAiB,UAAU,QAAU,CAAA,EACzB,CAAA,GACd,kBAAC,GAAD,EAAA,UACG,CAAC,uBACU,CAAA,CACN;;GACV,kBAAC,GAAD;IACE,UAAU,CAAC,EAAkB,uBAAuB,GAAkB,CAAW;IACjF,SAAS;IAFX,UAAA,CAIE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAoB,UAAU,QAAU,CAAA,EAC5B,CAAA,GACd,kBAAC,GAAD,EAAA,UACG,CAAC,4BACU,CAAA,CACN;;GACV,kBAAC,GAAD;IACE,UAAU,CAAC,EAAkB,mBAAmB,GAAkB,CAAW;IAC7E,SAAS;IAFX,UAAA,CAIE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAkB,UAAU,QAAU,CAAA,EAC1B,CAAA,GACd,kBAAC,GAAD,EAAA,UACG,CAAC,mCACU,CAAA,CACN;;EACN;;AAEV"}
@@ -3,4 +3,4 @@ export type CreateEventDialogSuccessNotificationMessageProps = {
3
3
  readonly caseSet: CaseDbCaseSet;
4
4
  readonly isCreating?: boolean;
5
5
  };
6
- export declare const CreateEventDialogSuccessNotificationMessage: ({ caseSet, isCreating }: CreateEventDialogSuccessNotificationMessageProps) => import("react").JSX.Element;
6
+ export declare const CreateEventDialogSuccessNotificationMessage: ({ caseSet, isCreating }: CreateEventDialogSuccessNotificationMessageProps) => import('react').JSX.Element;
@@ -83,7 +83,7 @@ var D = S(({ onActionsChange: S, onClose: D, onTitleChange: O, openProps: k }) =
83
83
  k.completeCaseType,
84
84
  B
85
85
  ]), _(() => {
86
- N.isLoading || !q?.length || q?.length === 1 && B("create_in_data_collection_id", q[0].value);
86
+ !N.isLoading && q?.length && q?.length === 1 && B("create_in_data_collection_id", q[0].value);
87
87
  }, [
88
88
  q,
89
89
  N.isLoading,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/ui/CreateEventDialog/CreateEventDialog.tsx"],"sourcesContent":["import {\n useCallback,\n useEffect,\n useId,\n useMemo,\n} from 'react';\nimport type { ReactElement } from 'react';\nimport SaveIcon from '@mui/icons-material/Save';\nimport { useTranslation } from 'react-i18next';\nimport {\n array,\n boolean,\n object,\n string,\n} from 'yup';\nimport {\n useForm,\n useWatch,\n} from 'react-hook-form';\nimport type { Resolver } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport {\n Alert,\n Box,\n} from '@mui/material';\nimport type {\n CaseDbCase,\n CaseDbCaseSet,\n CaseDbCompleteCaseType,\n} from '@gen-epix/api-casedb';\nimport { CaseDbCaseApi } from '@gen-epix/api-casedb';\nimport type { DialogAction } from '@gen-epix/ui-core-components/components/Dialog';\nimport type {\n WithDialogRefMethods,\n WithDialogRenderProps,\n} from '@gen-epix/ui-core-components/hoc/withDialog';\nimport { LoadableUtil } from '@gen-epix/ui-client-common/utils/LoadableUtil';\nimport { QueryClientService } from '@gen-epix/ui-client-common/classes/services/QueryClientService';\nimport { ResponseHandler } from '@gen-epix/ui-client-common/components/ui/ResponseHandler';\nimport { useCreateMutation } from '@gen-epix/ui-client-common/hooks/useCreateMutation';\nimport { useItemQuery } from '@gen-epix/ui-client-common/hooks/useItemQuery';\nimport { withDialog } from '@gen-epix/ui-core-components/hoc/withDialog';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\nimport { useArray } from '@gen-epix/ui-core/hooks/useArray';\nimport { GenericForm } from '@gen-epix/ui-core-form/components/helpers/GenericForm';\nimport type {\n AutoCompleteOption,\n FormFieldDefinition,\n} from '@gen-epix/ui-core-form/models/form';\nimport { FORM_FIELD_DEFINITION_TYPE } from '@gen-epix/ui-core-form/models/form';\nimport { SchemaUtil } from '@gen-epix/ui-core-form/utils/SchemaUtil';\n\nimport { EventBusService } from '../../../classes/services/EventBusService';\nimport { useCaseSetCategoryOptionsQuery } from '../../../dataHooks/useCaseSetCategoriesQuery';\nimport { useCaseSetStatusOptionsQuery } from '../../../dataHooks/useCaseSetStatusesQuery';\nimport { useCaseTypeOptionsQuery } from '../../../dataHooks/useCaseTypesQuery';\nimport { useDataCollectionOptionsQuery } from '../../../dataHooks/useDataCollectionsQuery';\nimport { CaseUtil } from '../../../utils/CaseUtil';\nimport { CasesAlreadyInCaseSetWarning } from '../CasesAlreadyInCaseSetWarning';\nimport { CASEDB_QUERY_KEY } from '../../../constants/query';\n\nimport { CreateEventDialogSuccessNotificationMessage } from './CreateEventDialogSuccessNotificationMessage';\n\nexport interface CreateEventDialogOpenProps {\n readonly completeCaseType?: CaseDbCompleteCaseType;\n readonly rows?: CaseDbCase[];\n}\n\nexport interface CreateEventDialogProps extends WithDialogRenderProps<CreateEventDialogOpenProps> {\n}\n\nexport type CreateEventDialogRefMethods = WithDialogRefMethods<CreateEventDialogProps, CreateEventDialogOpenProps>;\n\ntype FormFields = {\n case_set_category_id: string;\n case_set_status_id: string;\n case_type_id: string;\n code: string;\n create_in_data_collection_id: string;\n description: string;\n name: string;\n share_in_data_collection_ids: string[];\n shouldApplySharingToCases: boolean;\n};\n\nexport const CreateEventDialog = withDialog<CreateEventDialogProps, CreateEventDialogOpenProps>((\n {\n onActionsChange,\n onClose,\n onTitleChange,\n openProps,\n }: CreateEventDialogProps,\n): ReactElement => {\n const caseTypeOptionsQuery = useCaseTypeOptionsQuery();\n const caseSetCategoryOptionsQuery = useCaseSetCategoryOptionsQuery();\n const caseSetStatusOptionsQuery = useCaseSetStatusOptionsQuery();\n const dataCollectionOptionsQuery = useDataCollectionOptionsQuery();\n const { t } = useTranslation();\n const formId = useId();\n\n const schema = useMemo(() => object<FormFields>().shape({\n case_set_category_id: string().uuid4().required(),\n case_set_status_id: string().uuid4().required(),\n case_type_id: string().uuid4().required(),\n code: SchemaUtil.code,\n create_in_data_collection_id: string().uuid4().required(),\n description: SchemaUtil.description.required(),\n name: SchemaUtil.name,\n share_in_data_collection_ids: array().of(string().uuid4()),\n shouldApplySharingToCases: boolean().required(),\n }), []);\n\n const formMethods = useForm<FormFields>({\n resolver: yupResolver(schema) as Resolver<FormFields>,\n values: {\n case_set_category_id: null,\n case_set_status_id: null,\n case_type_id: openProps.completeCaseType?.id ?? null,\n code: '',\n create_in_data_collection_id: null,\n description: '',\n name: openProps.completeCaseType ? t('New {{eventName}} event', { eventName: openProps.completeCaseType.name }) : '',\n share_in_data_collection_ids: [],\n shouldApplySharingToCases: true,\n },\n });\n const { control, handleSubmit, setValue } = formMethods;\n\n const { case_type_id: userSelectedCaseTypeId, create_in_data_collection_id: createdInDataCollectionId, share_in_data_collection_ids: sharedInDataCollectionIds } = useWatch({ control });\n\n const sanitizedCompleteCaseTypeId = openProps.completeCaseType?.id ?? userSelectedCaseTypeId;\n\n const { data: loadedCompleteCaseType, error: completeCaseTypeError, isLoading: isCompleteCaseTypeLoading } = useItemQuery({\n baseQueryKey: CASEDB_QUERY_KEY.COMPLETE_CASE_TYPES,\n itemId: sanitizedCompleteCaseTypeId,\n useQueryOptions: {\n enabled: !openProps.completeCaseType && !!sanitizedCompleteCaseTypeId,\n queryFn: async ({ signal }) => {\n return (await CaseDbCaseApi.getInstance().completeCaseTypesGetOne(sanitizedCompleteCaseTypeId, { signal })).data;\n },\n },\n });\n\n const completeCaseType = openProps.completeCaseType ?? loadedCompleteCaseType;\n\n const createInDataCollectionOptions = useMemo<AutoCompleteOption[]>(() => {\n if (!completeCaseType || !dataCollectionOptionsQuery.options?.length) {\n return [];\n }\n return dataCollectionOptionsQuery.options.filter(option => {\n const dataCollectionId = option.value;\n return completeCaseType.case_type_access_abacs[dataCollectionId]?.is_private && completeCaseType.case_type_access_abacs[dataCollectionId]?.add_case_set;\n });\n }, [completeCaseType, dataCollectionOptionsQuery.options]);\n\n const shareInDataCollectionOptions = useMemo<AutoCompleteOption[]>(() => {\n if (!completeCaseType) {\n return [];\n }\n return dataCollectionOptionsQuery.options.filter(option => {\n const dataCollectionId = option.value;\n return createdInDataCollectionId !== dataCollectionId && completeCaseType.case_type_access_abacs[dataCollectionId]?.add_case_set;\n });\n }, [completeCaseType, createdInDataCollectionId, dataCollectionOptionsQuery.options]);\n\n useEffect(() => {\n // Validate if the createdInDataCollectionId is in the shareInDataCollectionIds\n // If it is, remove it from the shareInDataCollectionIds\n if (sharedInDataCollectionIds?.length && sharedInDataCollectionIds.includes(createdInDataCollectionId)) {\n setValue('share_in_data_collection_ids', sharedInDataCollectionIds.filter(id => id !== createdInDataCollectionId));\n }\n }, [createdInDataCollectionId, setValue, sharedInDataCollectionIds]);\n\n useEffect(() => {\n if (openProps.completeCaseType) {\n return;\n }\n setValue('create_in_data_collection_id', null);\n setValue('share_in_data_collection_ids', []);\n }, [completeCaseType, openProps.completeCaseType, setValue]);\n\n useEffect(() => {\n if (dataCollectionOptionsQuery.isLoading || !createInDataCollectionOptions?.length) {\n return;\n }\n\n if (createInDataCollectionOptions?.length === 1) {\n setValue('create_in_data_collection_id', createInDataCollectionOptions[0].value as string);\n }\n }, [createInDataCollectionOptions, dataCollectionOptionsQuery.isLoading, setValue]);\n\n\n const formFieldDefinitions = useMemo<FormFieldDefinition<FormFields>[]>(() => {\n return [\n {\n definition: FORM_FIELD_DEFINITION_TYPE.AUTOCOMPLETE,\n disabled: !!openProps.completeCaseType,\n label: t`Case type`,\n loading: caseTypeOptionsQuery.isLoading,\n name: 'case_type_id',\n options: caseTypeOptionsQuery.options,\n } as const satisfies FormFieldDefinition<FormFields>,\n {\n definition: FORM_FIELD_DEFINITION_TYPE.AUTOCOMPLETE,\n label: t`Create in data collection`,\n loading: dataCollectionOptionsQuery.isLoading || isCompleteCaseTypeLoading,\n name: 'create_in_data_collection_id',\n options: createInDataCollectionOptions,\n } as const satisfies FormFieldDefinition<FormFields>,\n {\n definition: FORM_FIELD_DEFINITION_TYPE.AUTOCOMPLETE,\n label: t`Share in data collections`,\n loading: dataCollectionOptionsQuery.isLoading || isCompleteCaseTypeLoading,\n multiple: true,\n name: 'share_in_data_collection_ids',\n options: shareInDataCollectionOptions,\n } as const satisfies FormFieldDefinition<FormFields>,\n {\n definition: FORM_FIELD_DEFINITION_TYPE.BOOLEAN,\n disabled: sharedInDataCollectionIds.length === 0 || !openProps.rows?.length,\n label: t`Should the same sharing be applied to the cases in the event?`,\n loading: dataCollectionOptionsQuery.isLoading || isCompleteCaseTypeLoading,\n name: 'shouldApplySharingToCases',\n } as const satisfies FormFieldDefinition<FormFields>,\n {\n definition: FORM_FIELD_DEFINITION_TYPE.TEXTFIELD,\n label: t`Event name`,\n name: 'name',\n } as const satisfies FormFieldDefinition<FormFields>,\n {\n definition: FORM_FIELD_DEFINITION_TYPE.TEXTFIELD,\n label: t`Event code`,\n name: 'code',\n } as const satisfies FormFieldDefinition<FormFields>,\n {\n definition: FORM_FIELD_DEFINITION_TYPE.RICH_TEXT,\n label: t`Description`,\n name: 'description',\n } as const satisfies FormFieldDefinition<FormFields>,\n {\n definition: FORM_FIELD_DEFINITION_TYPE.AUTOCOMPLETE,\n label: t`Category`,\n loading: caseSetCategoryOptionsQuery.isLoading,\n name: 'case_set_category_id',\n options: caseSetCategoryOptionsQuery.options,\n } as const satisfies FormFieldDefinition<FormFields>,\n {\n definition: FORM_FIELD_DEFINITION_TYPE.AUTOCOMPLETE,\n label: t`Status`,\n loading: caseSetStatusOptionsQuery.isLoading,\n name: 'case_set_status_id',\n options: caseSetStatusOptionsQuery.options,\n } as const satisfies FormFieldDefinition<FormFields>,\n ] as const;\n }, [caseSetCategoryOptionsQuery.isLoading, caseSetCategoryOptionsQuery.options, caseSetStatusOptionsQuery.isLoading, caseSetStatusOptionsQuery.options, caseTypeOptionsQuery.isLoading, caseTypeOptionsQuery.options, createInDataCollectionOptions, dataCollectionOptionsQuery.isLoading, isCompleteCaseTypeLoading, openProps.completeCaseType, openProps.rows?.length, shareInDataCollectionOptions, sharedInDataCollectionIds.length, t]);\n\n const loadables = useArray([\n caseTypeOptionsQuery,\n caseSetCategoryOptionsQuery,\n caseSetStatusOptionsQuery,\n dataCollectionOptionsQuery,\n ]);\n\n\n const isLoading = LoadableUtil.isSomeLoading(loadables);\n\n const onSuccess = useCallback(async (item: CaseDbCaseSet, variables: FormFields) => {\n if (variables.shouldApplySharingToCases) {\n await CaseUtil.applyDataCollectionLinks({\n caseIds: openProps.rows ? openProps.rows.map(row => row.id) : undefined,\n caseSetDataCollectionIds: variables.share_in_data_collection_ids,\n caseSetId: item.id,\n caseTypeId: completeCaseType.id,\n });\n }\n EventBusService.getInstance().emit('onEventCreated');\n onClose();\n }, [completeCaseType?.id, onClose, openProps.rows]);\n\n const onError = useCallback(() => {\n EventBusService.getInstance().emit('onEventCreated');\n onClose();\n }, [onClose]);\n\n const { isMutating: isCreating, mutate: mutateCreate } = useCreateMutation<CaseDbCaseSet, FormFields>({\n associationQueryKeys: [\n ...QueryClientService.getInstance().getQueryKeyDependencies([CASEDB_QUERY_KEY.CASE_SETS]),\n ...QueryClientService.getInstance().getQueryKeyDependencies([CASEDB_QUERY_KEY.CASE_SET_MEMBERS], true),\n ...QueryClientService.getInstance().getQueryKeyDependencies([CASEDB_QUERY_KEY.DATA_COLLECTION_SET_MEMBERS], true),\n ],\n getErrorNotificationMessage: (item, _error) => t('Failed to create event: {{name}}', { name: item.name }),\n getProgressNotificationMessage: (variables) => t('Creating event: {{name}}...', { name: variables.name }),\n getSuccessNotificationMessage: (item) => (\n <CreateEventDialogSuccessNotificationMessage\n caseSet={item}\n isCreating\n />\n ),\n onError,\n onSuccess,\n queryFn: async (formData: FormFields): Promise<CaseDbCaseSet> => {\n const caseSetResult = (await CaseDbCaseApi.getInstance().createCaseSet({\n case_ids: openProps.rows?.map(row => row.id) ?? [],\n case_set: {\n case_set_category_id: formData.case_set_category_id,\n case_set_status_id: formData.case_set_status_id,\n case_type_id: formData.case_type_id,\n code: formData.code,\n created_in_data_collection_id: formData.create_in_data_collection_id,\n description: formData.description,\n name: formData.name,\n },\n data_collection_ids: formData.share_in_data_collection_ids,\n })).data;\n\n return caseSetResult;\n },\n resourceQueryKey: QueryClientService.getInstance().getGenericKey(CASEDB_QUERY_KEY.CASE_SETS),\n });\n\n const isFormDisabled = useMemo(() => {\n return isLoading || caseTypeOptionsQuery.options?.length === 0 || dataCollectionOptionsQuery.options?.length === 0;\n }, [isLoading, caseTypeOptionsQuery.options?.length, dataCollectionOptionsQuery.options?.length]);\n\n useEffect(() => {\n const actions: DialogAction[] = [];\n if (isLoading || !isFormDisabled) {\n actions.push({\n ...TestIdUtil.createAttributes('CreateEventDialog-saveButton'),\n autoFocus: true,\n color: 'secondary',\n disabled: isLoading || isCreating,\n form: formId,\n label: t`Save`,\n loading: isLoading,\n startIcon: <SaveIcon />,\n type: 'submit',\n variant: 'contained',\n });\n }\n onActionsChange(actions);\n }, [formId, isCreating, isLoading, onActionsChange, t, caseTypeOptionsQuery.options?.length, isFormDisabled]);\n\n const onFormSubmit = useCallback((formData: FormFields) => {\n mutateCreate(formData);\n }, [mutateCreate]);\n\n useEffect(() => {\n if (openProps.completeCaseType) {\n if (openProps.rows?.length) {\n onTitleChange(t('Create new event from {{numCases}} selected {{caseTypeName}} cases', { caseTypeName: openProps.completeCaseType.name, numCases: openProps.rows.length }));\n } else {\n onTitleChange(t('Create event'));\n }\n } else {\n onTitleChange(t('Create event'));\n }\n }, [onTitleChange, openProps, t]);\n\n return (\n <ResponseHandler\n error={completeCaseTypeError}\n inlineSpinner\n isLoading={isCreating}\n loadables={loadables}\n >\n {isFormDisabled ? (\n <Box>\n <Alert severity={'error'}>\n {t`You do not have the required permissions to create an event. Contact your organization administrator for assistance.`}\n </Alert>\n </Box>\n ) : (\n <GenericForm<FormFields>\n disableAll={isFormDisabled}\n formFieldDefinitions={formFieldDefinitions}\n formId={formId}\n formMethods={formMethods}\n onSubmit={handleSubmit(onFormSubmit)}\n schema={schema}\n />\n )}\n {openProps.rows?.length > 0 && (\n <CasesAlreadyInCaseSetWarning\n cases={openProps.rows}\n />\n )}\n </ResponseHandler>\n );\n}, {\n fullWidth: true,\n maxWidth: 'lg',\n testId: 'CreateEventDialog',\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFA,IAAa,IAAoB,GAC/B,EACE,oBACA,YACA,kBACA,mBAEe;CACjB,IAAM,IAAuB,EAAwB,GAC/C,IAA8B,EAA+B,GAC7D,IAA4B,EAA6B,GACzD,IAA6B,EAA8B,GAC3D,EAAE,SAAM,GAAe,GACvB,IAAS,EAAM,GAEf,IAAS,QAAc,GAAmB,CAAC,CAAC,MAAM;EACtD,sBAAsB,EAAO,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS;EAChD,oBAAoB,EAAO,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS;EAC9C,cAAc,EAAO,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS;EACxC,MAAM,EAAW;EACjB,8BAA8B,EAAO,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS;EACxD,aAAa,EAAW,YAAY,SAAS;EAC7C,MAAM,EAAW;EACjB,8BAA8B,GAAM,CAAC,CAAC,GAAG,EAAO,CAAC,CAAC,MAAM,CAAC;EACzD,2BAA2B,EAAQ,CAAC,CAAC,SAAS;CAChD,CAAC,GAAG,CAAC,CAAC,GAEA,IAAc,GAAoB;EACtC,UAAU,EAAY,CAAM;EAC5B,QAAQ;GACN,sBAAsB;GACtB,oBAAoB;GACpB,cAAc,EAAU,kBAAkB,MAAM;GAChD,MAAM;GACN,8BAA8B;GAC9B,aAAa;GACb,MAAM,EAAU,mBA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,CAAA,IAEL,kBAAC,IAAD;GACE,YAAY;GACU;GACd;GACK;GACb,UAAU,EAAa,EAAY;GAC3B;EACT,CAAA,GAEF,EAAU,MAAM,SAAS,KACxB,kBAAC,IAAD,EACE,OAAO,EAAU,KAClB,CAAA,CAEY;;AAErB,GAAG;CACD,WAAW;CACX,UAAU;CACV,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/ui/CreateEventDialog/CreateEventDialog.tsx"],"sourcesContent":["import {\n useCallback,\n useEffect,\n useId,\n useMemo,\n} from 'react';\nimport type { ReactElement } from 'react';\nimport SaveIcon from '@mui/icons-material/Save';\nimport { useTranslation } from 'react-i18next';\nimport {\n array,\n boolean,\n object,\n string,\n} from 'yup';\nimport {\n useForm,\n useWatch,\n} from 'react-hook-form';\nimport type { Resolver } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport {\n Alert,\n Box,\n} from '@mui/material';\nimport type {\n CaseDbCase,\n CaseDbCaseSet,\n CaseDbCompleteCaseType,\n} from '@gen-epix/api-casedb';\nimport { CaseDbCaseApi } from '@gen-epix/api-casedb';\nimport type { DialogAction } from '@gen-epix/ui-core-components/components/Dialog';\nimport type {\n WithDialogRefMethods,\n WithDialogRenderProps,\n} from '@gen-epix/ui-core-components/hoc/withDialog';\nimport { LoadableUtil } from '@gen-epix/ui-client-common/utils/LoadableUtil';\nimport { QueryClientService } from '@gen-epix/ui-client-common/classes/services/QueryClientService';\nimport { ResponseHandler } from '@gen-epix/ui-client-common/components/ui/ResponseHandler';\nimport { useCreateMutation } from '@gen-epix/ui-client-common/hooks/useCreateMutation';\nimport { useItemQuery } from '@gen-epix/ui-client-common/hooks/useItemQuery';\nimport { withDialog } from '@gen-epix/ui-core-components/hoc/withDialog';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\nimport { useArray } from '@gen-epix/ui-core/hooks/useArray';\nimport { GenericForm } from '@gen-epix/ui-core-form/components/helpers/GenericForm';\nimport type {\n AutoCompleteOption,\n FormFieldDefinition,\n} from '@gen-epix/ui-core-form/models/form';\nimport { FORM_FIELD_DEFINITION_TYPE } from '@gen-epix/ui-core-form/models/form';\nimport { SchemaUtil } from '@gen-epix/ui-core-form/utils/SchemaUtil';\n\nimport { EventBusService } from '../../../classes/services/EventBusService';\nimport { useCaseSetCategoryOptionsQuery } from '../../../dataHooks/useCaseSetCategoriesQuery';\nimport { useCaseSetStatusOptionsQuery } from '../../../dataHooks/useCaseSetStatusesQuery';\nimport { useCaseTypeOptionsQuery } from '../../../dataHooks/useCaseTypesQuery';\nimport { useDataCollectionOptionsQuery } from '../../../dataHooks/useDataCollectionsQuery';\nimport { CaseUtil } from '../../../utils/CaseUtil';\nimport { CasesAlreadyInCaseSetWarning } from '../CasesAlreadyInCaseSetWarning';\nimport { CASEDB_QUERY_KEY } from '../../../constants/query';\n\nimport { CreateEventDialogSuccessNotificationMessage } from './CreateEventDialogSuccessNotificationMessage';\n\nexport interface CreateEventDialogOpenProps {\n readonly completeCaseType?: CaseDbCompleteCaseType;\n readonly rows?: CaseDbCase[];\n}\n\nexport interface CreateEventDialogProps extends WithDialogRenderProps<CreateEventDialogOpenProps> {\n}\n\nexport type CreateEventDialogRefMethods = WithDialogRefMethods<CreateEventDialogProps, CreateEventDialogOpenProps>;\n\ntype FormFields = {\n case_set_category_id: string;\n case_set_status_id: string;\n case_type_id: string;\n code: string;\n create_in_data_collection_id: string;\n description: string;\n name: string;\n share_in_data_collection_ids: string[];\n shouldApplySharingToCases: boolean;\n};\n\nexport const CreateEventDialog = withDialog<CreateEventDialogProps, CreateEventDialogOpenProps>((\n {\n onActionsChange,\n onClose,\n onTitleChange,\n openProps,\n }: CreateEventDialogProps,\n): ReactElement => {\n const caseTypeOptionsQuery = useCaseTypeOptionsQuery();\n const caseSetCategoryOptionsQuery = useCaseSetCategoryOptionsQuery();\n const caseSetStatusOptionsQuery = useCaseSetStatusOptionsQuery();\n const dataCollectionOptionsQuery = useDataCollectionOptionsQuery();\n const { t } = useTranslation();\n const formId = useId();\n\n const schema = useMemo(() => object<FormFields>().shape({\n case_set_category_id: string().uuid4().required(),\n case_set_status_id: string().uuid4().required(),\n case_type_id: string().uuid4().required(),\n code: SchemaUtil.code,\n create_in_data_collection_id: string().uuid4().required(),\n description: SchemaUtil.description.required(),\n name: SchemaUtil.name,\n share_in_data_collection_ids: array().of(string().uuid4()),\n shouldApplySharingToCases: boolean().required(),\n }), []);\n\n const formMethods = useForm<FormFields>({\n resolver: yupResolver(schema) as Resolver<FormFields>,\n values: {\n case_set_category_id: null,\n case_set_status_id: null,\n case_type_id: openProps.completeCaseType?.id ?? null,\n code: '',\n create_in_data_collection_id: null,\n description: '',\n name: openProps.completeCaseType ? t('New {{eventName}} event', { eventName: openProps.completeCaseType.name }) : '',\n share_in_data_collection_ids: [],\n shouldApplySharingToCases: true,\n },\n });\n const { control, handleSubmit, setValue } = formMethods;\n\n const { case_type_id: userSelectedCaseTypeId, create_in_data_collection_id: createdInDataCollectionId, share_in_data_collection_ids: sharedInDataCollectionIds } = useWatch({ control });\n\n const sanitizedCompleteCaseTypeId = openProps.completeCaseType?.id ?? userSelectedCaseTypeId;\n\n const { data: loadedCompleteCaseType, error: completeCaseTypeError, isLoading: isCompleteCaseTypeLoading } = useItemQuery({\n baseQueryKey: CASEDB_QUERY_KEY.COMPLETE_CASE_TYPES,\n itemId: sanitizedCompleteCaseTypeId,\n useQueryOptions: {\n enabled: !openProps.completeCaseType && !!sanitizedCompleteCaseTypeId,\n queryFn: async ({ signal }) => {\n return (await CaseDbCaseApi.getInstance().completeCaseTypesGetOne(sanitizedCompleteCaseTypeId, { signal })).data;\n },\n },\n });\n\n const completeCaseType = openProps.completeCaseType ?? loadedCompleteCaseType;\n\n const createInDataCollectionOptions = useMemo<AutoCompleteOption[]>(() => {\n if (!completeCaseType || !dataCollectionOptionsQuery.options?.length) {\n return [];\n }\n return dataCollectionOptionsQuery.options.filter(option => {\n const dataCollectionId = option.value;\n return completeCaseType.case_type_access_abacs[dataCollectionId]?.is_private && completeCaseType.case_type_access_abacs[dataCollectionId]?.add_case_set;\n });\n }, [completeCaseType, dataCollectionOptionsQuery.options]);\n\n const shareInDataCollectionOptions = useMemo<AutoCompleteOption[]>(() => {\n if (!completeCaseType) {\n return [];\n }\n return dataCollectionOptionsQuery.options.filter(option => {\n const dataCollectionId = option.value;\n return createdInDataCollectionId !== dataCollectionId && completeCaseType.case_type_access_abacs[dataCollectionId]?.add_case_set;\n });\n }, [completeCaseType, createdInDataCollectionId, dataCollectionOptionsQuery.options]);\n\n useEffect(() => {\n // Validate if the createdInDataCollectionId is in the shareInDataCollectionIds\n // If it is, remove it from the shareInDataCollectionIds\n if (sharedInDataCollectionIds?.length && sharedInDataCollectionIds.includes(createdInDataCollectionId)) {\n setValue('share_in_data_collection_ids', sharedInDataCollectionIds.filter(id => id !== createdInDataCollectionId));\n }\n }, [createdInDataCollectionId, setValue, sharedInDataCollectionIds]);\n\n useEffect(() => {\n if (openProps.completeCaseType) {\n return;\n }\n setValue('create_in_data_collection_id', null);\n setValue('share_in_data_collection_ids', []);\n }, [completeCaseType, openProps.completeCaseType, setValue]);\n\n useEffect(() => {\n if (dataCollectionOptionsQuery.isLoading || !createInDataCollectionOptions?.length) {\n return;\n }\n\n if (createInDataCollectionOptions?.length === 1) {\n setValue('create_in_data_collection_id', createInDataCollectionOptions[0].value as string);\n }\n }, [createInDataCollectionOptions, dataCollectionOptionsQuery.isLoading, setValue]);\n\n\n const formFieldDefinitions = useMemo<FormFieldDefinition<FormFields>[]>(() => {\n return [\n {\n definition: FORM_FIELD_DEFINITION_TYPE.AUTOCOMPLETE,\n disabled: !!openProps.completeCaseType,\n label: t`Case type`,\n loading: caseTypeOptionsQuery.isLoading,\n name: 'case_type_id',\n options: caseTypeOptionsQuery.options,\n } as const satisfies FormFieldDefinition<FormFields>,\n {\n definition: FORM_FIELD_DEFINITION_TYPE.AUTOCOMPLETE,\n label: t`Create in data collection`,\n loading: dataCollectionOptionsQuery.isLoading || isCompleteCaseTypeLoading,\n name: 'create_in_data_collection_id',\n options: createInDataCollectionOptions,\n } as const satisfies FormFieldDefinition<FormFields>,\n {\n definition: FORM_FIELD_DEFINITION_TYPE.AUTOCOMPLETE,\n label: t`Share in data collections`,\n loading: dataCollectionOptionsQuery.isLoading || isCompleteCaseTypeLoading,\n multiple: true,\n name: 'share_in_data_collection_ids',\n options: shareInDataCollectionOptions,\n } as const satisfies FormFieldDefinition<FormFields>,\n {\n definition: FORM_FIELD_DEFINITION_TYPE.BOOLEAN,\n disabled: sharedInDataCollectionIds.length === 0 || !openProps.rows?.length,\n label: t`Should the same sharing be applied to the cases in the event?`,\n loading: dataCollectionOptionsQuery.isLoading || isCompleteCaseTypeLoading,\n name: 'shouldApplySharingToCases',\n } as const satisfies FormFieldDefinition<FormFields>,\n {\n definition: FORM_FIELD_DEFINITION_TYPE.TEXTFIELD,\n label: t`Event name`,\n name: 'name',\n } as const satisfies FormFieldDefinition<FormFields>,\n {\n definition: FORM_FIELD_DEFINITION_TYPE.TEXTFIELD,\n label: t`Event code`,\n name: 'code',\n } as const satisfies FormFieldDefinition<FormFields>,\n {\n definition: FORM_FIELD_DEFINITION_TYPE.RICH_TEXT,\n label: t`Description`,\n name: 'description',\n } as const satisfies FormFieldDefinition<FormFields>,\n {\n definition: FORM_FIELD_DEFINITION_TYPE.AUTOCOMPLETE,\n label: t`Category`,\n loading: caseSetCategoryOptionsQuery.isLoading,\n name: 'case_set_category_id',\n options: caseSetCategoryOptionsQuery.options,\n } as const satisfies FormFieldDefinition<FormFields>,\n {\n definition: FORM_FIELD_DEFINITION_TYPE.AUTOCOMPLETE,\n label: t`Status`,\n loading: caseSetStatusOptionsQuery.isLoading,\n name: 'case_set_status_id',\n options: caseSetStatusOptionsQuery.options,\n } as const satisfies FormFieldDefinition<FormFields>,\n ] as const;\n }, [caseSetCategoryOptionsQuery.isLoading, caseSetCategoryOptionsQuery.options, caseSetStatusOptionsQuery.isLoading, caseSetStatusOptionsQuery.options, caseTypeOptionsQuery.isLoading, caseTypeOptionsQuery.options, createInDataCollectionOptions, dataCollectionOptionsQuery.isLoading, isCompleteCaseTypeLoading, openProps.completeCaseType, openProps.rows?.length, shareInDataCollectionOptions, sharedInDataCollectionIds.length, t]);\n\n const loadables = useArray([\n caseTypeOptionsQuery,\n caseSetCategoryOptionsQuery,\n caseSetStatusOptionsQuery,\n dataCollectionOptionsQuery,\n ]);\n\n\n const isLoading = LoadableUtil.isSomeLoading(loadables);\n\n const onSuccess = useCallback(async (item: CaseDbCaseSet, variables: FormFields) => {\n if (variables.shouldApplySharingToCases) {\n await CaseUtil.applyDataCollectionLinks({\n caseIds: openProps.rows ? openProps.rows.map(row => row.id) : undefined,\n caseSetDataCollectionIds: variables.share_in_data_collection_ids,\n caseSetId: item.id,\n caseTypeId: completeCaseType.id,\n });\n }\n EventBusService.getInstance().emit('onEventCreated');\n onClose();\n }, [completeCaseType?.id, onClose, openProps.rows]);\n\n const onError = useCallback(() => {\n EventBusService.getInstance().emit('onEventCreated');\n onClose();\n }, [onClose]);\n\n const { isMutating: isCreating, mutate: mutateCreate } = useCreateMutation<CaseDbCaseSet, FormFields>({\n associationQueryKeys: [\n ...QueryClientService.getInstance().getQueryKeyDependencies([CASEDB_QUERY_KEY.CASE_SETS]),\n ...QueryClientService.getInstance().getQueryKeyDependencies([CASEDB_QUERY_KEY.CASE_SET_MEMBERS], true),\n ...QueryClientService.getInstance().getQueryKeyDependencies([CASEDB_QUERY_KEY.DATA_COLLECTION_SET_MEMBERS], true),\n ],\n getErrorNotificationMessage: (item, _error) => t('Failed to create event: {{name}}', { name: item.name }),\n getProgressNotificationMessage: (variables) => t('Creating event: {{name}}...', { name: variables.name }),\n getSuccessNotificationMessage: (item) => (\n <CreateEventDialogSuccessNotificationMessage\n caseSet={item}\n isCreating\n />\n ),\n onError,\n onSuccess,\n queryFn: async (formData: FormFields): Promise<CaseDbCaseSet> => {\n const caseSetResult = (await CaseDbCaseApi.getInstance().createCaseSet({\n case_ids: openProps.rows?.map(row => row.id) ?? [],\n case_set: {\n case_set_category_id: formData.case_set_category_id,\n case_set_status_id: formData.case_set_status_id,\n case_type_id: formData.case_type_id,\n code: formData.code,\n created_in_data_collection_id: formData.create_in_data_collection_id,\n description: formData.description,\n name: formData.name,\n },\n data_collection_ids: formData.share_in_data_collection_ids,\n })).data;\n\n return caseSetResult;\n },\n resourceQueryKey: QueryClientService.getInstance().getGenericKey(CASEDB_QUERY_KEY.CASE_SETS),\n });\n\n const isFormDisabled = useMemo(() => {\n return isLoading || caseTypeOptionsQuery.options?.length === 0 || dataCollectionOptionsQuery.options?.length === 0;\n }, [isLoading, caseTypeOptionsQuery.options?.length, dataCollectionOptionsQuery.options?.length]);\n\n useEffect(() => {\n const actions: DialogAction[] = [];\n if (isLoading || !isFormDisabled) {\n actions.push({\n ...TestIdUtil.createAttributes('CreateEventDialog-saveButton'),\n autoFocus: true,\n color: 'secondary',\n disabled: isLoading || isCreating,\n form: formId,\n label: t`Save`,\n loading: isLoading,\n startIcon: <SaveIcon />,\n type: 'submit',\n variant: 'contained',\n });\n }\n onActionsChange(actions);\n }, [formId, isCreating, isLoading, onActionsChange, t, caseTypeOptionsQuery.options?.length, isFormDisabled]);\n\n const onFormSubmit = useCallback((formData: FormFields) => {\n mutateCreate(formData);\n }, [mutateCreate]);\n\n useEffect(() => {\n if (openProps.completeCaseType) {\n if (openProps.rows?.length) {\n onTitleChange(t('Create new event from {{numCases}} selected {{caseTypeName}} cases', { caseTypeName: openProps.completeCaseType.name, numCases: openProps.rows.length }));\n } else {\n onTitleChange(t('Create event'));\n }\n } else {\n onTitleChange(t('Create event'));\n }\n }, [onTitleChange, openProps, t]);\n\n return (\n <ResponseHandler\n error={completeCaseTypeError}\n inlineSpinner\n isLoading={isCreating}\n loadables={loadables}\n >\n {isFormDisabled ? (\n <Box>\n <Alert severity={'error'}>\n {t`You do not have the required permissions to create an event. Contact your organization administrator for assistance.`}\n </Alert>\n </Box>\n ) : (\n <GenericForm<FormFields>\n disableAll={isFormDisabled}\n formFieldDefinitions={formFieldDefinitions}\n formId={formId}\n formMethods={formMethods}\n onSubmit={handleSubmit(onFormSubmit)}\n schema={schema}\n />\n )}\n {openProps.rows?.length > 0 && (\n <CasesAlreadyInCaseSetWarning\n cases={openProps.rows}\n />\n )}\n </ResponseHandler>\n );\n}, {\n fullWidth: true,\n maxWidth: 'lg',\n testId: 'CreateEventDialog',\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFA,IAAa,IAAoB,GAC/B,EACE,oBACA,YACA,kBACA,mBAEe;CACjB,IAAM,IAAuB,EAAwB,GAC/C,IAA8B,EAA+B,GAC7D,IAA4B,EAA6B,GACzD,IAA6B,EAA8B,GAC3D,EAAE,SAAM,GAAe,GACvB,IAAS,EAAM,GAEf,IAAS,QAAc,GAAmB,CAAC,CAAC,MAAM;EACtD,sBAAsB,EAAO,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS;EAChD,oBAAoB,EAAO,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS;EAC9C,cAAc,EAAO,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS;EACxC,MAAM,EAAW;EACjB,8BAA8B,EAAO,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS;EACxD,aAAa,EAAW,YAAY,SAAS;EAC7C,MAAM,EAAW;EACjB,8BAA8B,GAAM,CAAC,CAAC,GAAG,EAAO,CAAC,CAAC,MAAM,CAAC;EACzD,2BAA2B,EAAQ,CAAC,CAAC,SAAS;CAChD,CAAC,GAAG,CAAC,CAAC,GAEA,IAAc,GAAoB;EACtC,UAAU,EAAY,CAAM;EAC5B,QAAQ;GACN,sBAAsB;GACtB,oBAAoB;GACpB,cAAc,EAAU,kBAAkB,MAAM;GAChD,MAAM;GACN,8BAA8B;GAC9B,aAAa;GACb,MAAM,EAAU,mBAAmB,EAAE,2BAA2B,EAAE,WAAW,EAAU,iBAAiB,KAAK,CAAC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,EAAa,EAAY;GAC3B;EACT,CAAA,GAEF,EAAU,MAAM,SAAS,KACxB,kBAAC,IAAD,EACE,OAAO,EAAU,KAClB,CAAA,CAEY;;AAErB,GAAG;CACD,WAAW;CACX,UAAU;CACV,QAAQ;AACV,CAAC"}
@@ -3,4 +3,4 @@ export type CustomTabPanelProps = PropsWithChildren<{
3
3
  readonly index: number;
4
4
  readonly value: number;
5
5
  }>;
6
- export declare const CustomTabPanel: (props: CustomTabPanelProps) => import("react").JSX.Element;
6
+ export declare const CustomTabPanel: (props: CustomTabPanelProps) => import('react').JSX.Element;
@@ -2,5 +2,5 @@ import { CaseDbCaseSet } from '@gen-epix/api-casedb';
2
2
  type DashboardProps = {
3
3
  readonly caseSet?: CaseDbCaseSet;
4
4
  };
5
- export declare const DashboardContent: ({ caseSet }: DashboardProps) => import("react").JSX.Element;
5
+ export declare const DashboardContent: ({ caseSet }: DashboardProps) => import('react').JSX.Element;
6
6
  export {};
@@ -3,4 +3,4 @@ export type DashboardDownloadSidebarItemProps = SidebarItemSharedProps;
3
3
  export declare const DashboardDownloadSidebarItemIcon: import('@mui/material/OverridableComponent').OverridableComponent<import('@mui/material').SvgIconTypeMap<{}, "svg">> & {
4
4
  muiName: string;
5
5
  };
6
- export declare const DashboardDownloadSidebarItem: ({ onClose, open }: DashboardDownloadSidebarItemProps) => import("react").JSX.Element;
6
+ export declare const DashboardDownloadSidebarItem: ({ onClose, open }: DashboardDownloadSidebarItemProps) => import('react').JSX.Element;
@@ -1 +1 @@
1
- export declare const DashboardGeneralSettingsForm: () => import("react").JSX.Element;
1
+ export declare const DashboardGeneralSettingsForm: () => import('react').JSX.Element;
@@ -6,4 +6,4 @@ export type DashboardLayoutRendererProps = {
6
6
  export type ForwardRefDashboardLayoutRendererRefMethods = {
7
7
  reset: () => void;
8
8
  };
9
- export declare const DashboardLayoutRenderer: ({ disabled, ref, }: DashboardLayoutRendererProps) => import("react").JSX.Element;
9
+ export declare const DashboardLayoutRenderer: ({ disabled, ref, }: DashboardLayoutRendererProps) => import('react').JSX.Element;
@@ -1,4 +1,4 @@
1
1
  export type DashboardLayoutSettingsFormProps = {
2
2
  readonly onReset: () => void;
3
3
  };
4
- export declare const DashboardLayoutSettingsForm: ({ onReset }: DashboardLayoutSettingsFormProps) => import("react").JSX.Element;
4
+ export declare const DashboardLayoutSettingsForm: ({ onReset }: DashboardLayoutSettingsFormProps) => import('react').JSX.Element;
@@ -1 +1 @@
1
- export declare const DashboardSearch: () => import("react").JSX.Element;
1
+ export declare const DashboardSearch: () => import('react').JSX.Element;
@@ -7,4 +7,4 @@ export type DashboardSearchSettingsProps = {
7
7
  readonly open: boolean;
8
8
  readonly searchMode: DashboardSearchMode;
9
9
  };
10
- export declare const DashboardSearchSettings: ({ anchorEl, onChange, onClose, onEscapeKeyDown, open, searchMode }: DashboardSearchSettingsProps) => import("react").JSX.Element;
10
+ export declare const DashboardSearchSettings: ({ anchorEl, onChange, onClose, onEscapeKeyDown, open, searchMode }: DashboardSearchSettingsProps) => import('react').JSX.Element;
@@ -5,4 +5,4 @@ export type DashboardSettingsSidebarItemProps = {
5
5
  export declare const DashboardSettingsSidebarItemIcon: import('@mui/material/OverridableComponent').OverridableComponent<import('@mui/material').SvgIconTypeMap<{}, "svg">> & {
6
6
  muiName: string;
7
7
  };
8
- export declare const DashboardSettingsSidebarItem: ({ onClose, onReset, open }: DashboardSettingsSidebarItemProps) => import("react").JSX.Element;
8
+ export declare const DashboardSettingsSidebarItem: ({ onClose, onReset, open }: DashboardSettingsSidebarItemProps) => import('react').JSX.Element;
@@ -9,4 +9,4 @@ export type DashboardWidgetProps = PropsWithChildren<{
9
9
  readonly warningMessage?: string;
10
10
  readonly widgetName?: string;
11
11
  }>;
12
- export declare const DashboardWidget: ({ children, expandDisabled, isLoading, primaryMenu, secondaryMenu, title, warningMessage, widgetName }: DashboardWidgetProps) => import("react").JSX.Element;
12
+ export declare const DashboardWidget: ({ children, expandDisabled, isLoading, primaryMenu, secondaryMenu, title, warningMessage, widgetName }: DashboardWidgetProps) => import('react').JSX.Element;
@@ -1 +1 @@
1
- export declare const DashboardWidgetPlaceHolder: () => import("react").JSX.Element;
1
+ export declare const DashboardWidgetPlaceHolder: () => import('react').JSX.Element;
@@ -1,4 +1,4 @@
1
1
  export type DashboardEpiCurveSettingsFormProps = {
2
2
  readonly widgetName: string;
3
3
  };
4
- export declare const DashboardWidgetSettingsForm: ({ widgetName }: DashboardEpiCurveSettingsFormProps) => import("react").JSX.Element;
4
+ export declare const DashboardWidgetSettingsForm: ({ widgetName }: DashboardEpiCurveSettingsFormProps) => import('react').JSX.Element;
@@ -3,4 +3,4 @@ import { CaseDbCaseSet } from '@gen-epix/api-casedb';
3
3
  export type DashboardContextProviderProps = PropsWithChildren<{
4
4
  caseSet: CaseDbCaseSet;
5
5
  }>;
6
- export declare const DashboardContextProvider: ({ caseSet, children }: DashboardContextProviderProps) => import("react").JSX.Element;
6
+ export declare const DashboardContextProvider: ({ caseSet, children }: DashboardContextProviderProps) => import('react').JSX.Element;
@@ -3,4 +3,4 @@ export type DashboardEditCasesProps = {
3
3
  cases: CaseDbCase[];
4
4
  onClose: () => void;
5
5
  };
6
- export declare const DashboardEditCases: ({ cases, onClose }: DashboardEditCasesProps) => import("react").JSX.Element;
6
+ export declare const DashboardEditCases: ({ cases, onClose }: DashboardEditCasesProps) => import('react').JSX.Element;
@@ -4,4 +4,4 @@ export type DashboardStoreLoaderProps = PropsWithChildren<{
4
4
  readonly caseSet?: CaseDbCaseSet;
5
5
  readonly caseTypeId: string;
6
6
  }>;
7
- export declare const DashboardStoreLoader: ({ caseSet, caseTypeId, children }: DashboardStoreLoaderProps) => import("react").JSX.Element;
7
+ export declare const DashboardStoreLoader: ({ caseSet, caseTypeId, children }: DashboardStoreLoaderProps) => import('react').JSX.Element;
@@ -4,5 +4,5 @@ type DashboardStoreLoaderContentProps = PropsWithChildren<{
4
4
  readonly caseSet: CaseDbCaseSet;
5
5
  readonly completeCaseType: CaseDbCompleteCaseType;
6
6
  }>;
7
- export declare const DashboardStoreLoaderContent: ({ caseSet, children, completeCaseType }: DashboardStoreLoaderContentProps) => import("react").JSX.Element;
7
+ export declare const DashboardStoreLoaderContent: ({ caseSet, children, completeCaseType }: DashboardStoreLoaderContentProps) => import('react').JSX.Element;
8
8
  export {};
@@ -1 +1 @@
1
- export declare const DataCollectionAccessInfo: () => import("react").JSX.Element;
1
+ export declare const DataCollectionAccessInfo: () => import('react').JSX.Element;
@@ -18,4 +18,4 @@ export interface EpiCurveBarChartProps {
18
18
  stratification?: Stratification;
19
19
  xAxisIntervals: Date[];
20
20
  }
21
- export declare const EpiCurveBarChart: ({ chartRef, echarts, getXAxisLabel, items, onCaseIdsChange, onChartReady, onPointMouseUp, stratification, xAxisIntervals, }: EpiCurveBarChartProps) => import("react").JSX.Element;
21
+ export declare const EpiCurveBarChart: ({ chartRef, echarts, getXAxisLabel, items, onCaseIdsChange, onChartReady, onPointMouseUp, stratification, xAxisIntervals, }: EpiCurveBarChartProps) => import('react').JSX.Element;
@@ -19,4 +19,4 @@ export interface EpiCurveStackedAreaChartProps {
19
19
  stratification?: Stratification;
20
20
  xAxisIntervals: Date[];
21
21
  }
22
- export declare const EpiCurveStackedAreaChart: ({ chartRef, echarts, getXAxisLabel, includeMissingValues, items, onCaseIdsChange, onChartReady, onPointMouseUp, stratification, xAxisIntervals, }: EpiCurveStackedAreaChartProps) => import("react").JSX.Element;
22
+ export declare const EpiCurveStackedAreaChart: ({ chartRef, echarts, getXAxisLabel, includeMissingValues, items, onCaseIdsChange, onChartReady, onPointMouseUp, stratification, xAxisIntervals, }: EpiCurveStackedAreaChartProps) => import('react').JSX.Element;
@@ -1,2 +1,2 @@
1
1
  export type ChartType = 'area' | 'bar';
2
- export declare const EpiCurveWidget: () => import("react").JSX.Element;
2
+ export declare const EpiCurveWidget: () => import('react').JSX.Element;