synapse-react-client 4.0.5 → 4.0.7

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 (212) hide show
  1. package/dist/SWC.index.d.ts +2 -0
  2. package/dist/SWC.index.d.ts.map +1 -1
  3. package/dist/SWC.index.js +47 -41
  4. package/dist/SWC.index.js.map +1 -1
  5. package/dist/assets/DefaultColorfulPortalCardBackground.svg +50 -12
  6. package/dist/assets/DefaultColorfulPortalCardBackground.svg.js +4 -4
  7. package/dist/assets/DefaultColorfulPortalCardBackground.svg.js.map +1 -1
  8. package/dist/components/CardDeck/TableQueryCardDeck.js +3 -4
  9. package/dist/components/CardDeck/TableQueryCardDeck.js.map +1 -1
  10. package/dist/components/ChangePassword/useChangePasswordFormState.js +2 -3
  11. package/dist/components/ChangePassword/useChangePasswordFormState.js.map +1 -1
  12. package/dist/components/ColoredBulletListItem/ColoredBulletListItem.css +1 -0
  13. package/dist/components/ColoredBulletListItem/ColoredBulletListItem.d.ts +8 -0
  14. package/dist/components/ColoredBulletListItem/ColoredBulletListItem.d.ts.map +1 -0
  15. package/dist/components/ColoredBulletListItem/ColoredBulletListItem.js +21 -0
  16. package/dist/components/ColoredBulletListItem/ColoredBulletListItem.js.map +1 -0
  17. package/dist/components/ColoredBulletListItem/ColoredBulletListItem.module.scss +32 -0
  18. package/dist/components/ColoredBulletListItem/ColoredBulletListItem.module.scss.js +14 -0
  19. package/dist/components/ColoredBulletListItem/ColoredBulletListItem.module.scss.js.map +1 -0
  20. package/dist/components/ColoredBulletListItem/index.d.ts +5 -0
  21. package/dist/components/ColoredBulletListItem/index.d.ts.map +1 -0
  22. package/dist/components/ColoredBulletListItem/index.js +6 -0
  23. package/dist/components/ColoredBulletListItem/index.js.map +1 -0
  24. package/dist/components/CreateOrUpdateAccessRequirementWizard/CreateOrUpdateAccessRequirementWizard.js +3 -4
  25. package/dist/components/CreateOrUpdateAccessRequirementWizard/CreateOrUpdateAccessRequirementWizard.js.map +1 -1
  26. package/dist/components/CreateProjectModal/CreateProjectModal.d.ts +2 -1
  27. package/dist/components/CreateProjectModal/CreateProjectModal.d.ts.map +1 -1
  28. package/dist/components/CreateProjectModal/CreateProjectModal.js +122 -43
  29. package/dist/components/CreateProjectModal/CreateProjectModal.js.map +1 -1
  30. package/dist/components/CreateProjectModal/ProjectVisibilityRadioGroup.d.ts +7 -0
  31. package/dist/components/CreateProjectModal/ProjectVisibilityRadioGroup.d.ts.map +1 -0
  32. package/dist/components/CreateProjectModal/ProjectVisibilityRadioGroup.js +132 -0
  33. package/dist/components/CreateProjectModal/ProjectVisibilityRadioGroup.js.map +1 -0
  34. package/dist/components/DataGrid/DataGrid.d.ts +2 -0
  35. package/dist/components/DataGrid/DataGrid.d.ts.map +1 -1
  36. package/dist/components/DataGrid/DataGrid.js +69 -67
  37. package/dist/components/DataGrid/DataGrid.js.map +1 -1
  38. package/dist/components/DataGrid/DataGridWebSocket.d.ts +4 -0
  39. package/dist/components/DataGrid/DataGridWebSocket.d.ts.map +1 -1
  40. package/dist/components/DataGrid/DataGridWebSocket.js +47 -37
  41. package/dist/components/DataGrid/DataGridWebSocket.js.map +1 -1
  42. package/dist/components/DataGrid/MergeGridWithSourceTableButton.js +2 -3
  43. package/dist/components/DataGrid/MergeGridWithSourceTableButton.js.map +1 -1
  44. package/dist/components/DataGrid/SynapseGrid.d.ts.map +1 -1
  45. package/dist/components/DataGrid/SynapseGrid.js +209 -162
  46. package/dist/components/DataGrid/SynapseGrid.js.map +1 -1
  47. package/dist/components/DataGrid/components/UploadCsvToGridDialog.js +2 -3
  48. package/dist/components/DataGrid/components/UploadCsvToGridDialog.js.map +1 -1
  49. package/dist/components/DataGrid/hooks/useRemoteSelections.d.ts +16 -0
  50. package/dist/components/DataGrid/hooks/useRemoteSelections.d.ts.map +1 -0
  51. package/dist/components/DataGrid/hooks/useRemoteSelections.js +30 -0
  52. package/dist/components/DataGrid/hooks/useRemoteSelections.js.map +1 -0
  53. package/dist/components/DataGrid/useDataGridWebsocket.d.ts +6 -1
  54. package/dist/components/DataGrid/useDataGridWebsocket.d.ts.map +1 -1
  55. package/dist/components/DataGrid/useDataGridWebsocket.js +78 -69
  56. package/dist/components/DataGrid/useDataGridWebsocket.js.map +1 -1
  57. package/dist/components/DataGrid/utils/getCellClassName.d.ts +3 -0
  58. package/dist/components/DataGrid/utils/getCellClassName.d.ts.map +1 -1
  59. package/dist/components/DataGrid/utils/getCellClassName.js +21 -12
  60. package/dist/components/DataGrid/utils/getCellClassName.js.map +1 -1
  61. package/dist/components/DataGrid/utils/replicaSelectionToGridSelection.d.ts +15 -0
  62. package/dist/components/DataGrid/utils/replicaSelectionToGridSelection.d.ts.map +1 -0
  63. package/dist/components/DataGrid/utils/replicaSelectionToGridSelection.js +43 -0
  64. package/dist/components/DataGrid/utils/replicaSelectionToGridSelection.js.map +1 -0
  65. package/dist/components/DialogBase.d.ts +3 -1
  66. package/dist/components/DialogBase.d.ts.map +1 -1
  67. package/dist/components/DialogBase.js +75 -56
  68. package/dist/components/DialogBase.js.map +1 -1
  69. package/dist/components/Ecosystem/EcosystemSkeleton.js +2 -3
  70. package/dist/components/Ecosystem/EcosystemSkeleton.js.map +1 -1
  71. package/dist/components/FeaturedDataTabs/FacetPlotsCard.js +2 -3
  72. package/dist/components/FeaturedDataTabs/FacetPlotsCard.js.map +1 -1
  73. package/dist/components/FeaturedDataTabs/FeaturedDataTabs.js +2 -3
  74. package/dist/components/FeaturedDataTabs/FeaturedDataTabs.js.map +1 -1
  75. package/dist/components/GenericCard/GenericCard.js +3 -4
  76. package/dist/components/GenericCard/GenericCard.js.map +1 -1
  77. package/dist/components/HeaderCard.js +2 -3
  78. package/dist/components/HeaderCard.js.map +1 -1
  79. package/dist/components/IconSvg/IconSvg.d.ts +1 -1
  80. package/dist/components/IconSvg/IconSvg.d.ts.map +1 -1
  81. package/dist/components/IconSvg/IconSvg.js +168 -165
  82. package/dist/components/IconSvg/IconSvg.js.map +1 -1
  83. package/dist/components/StorybookComponentWrapper.js +3 -4
  84. package/dist/components/StorybookComponentWrapper.js.map +1 -1
  85. package/dist/components/SynapseForm/SynapseFormSubmissionGrid.d.ts +1 -0
  86. package/dist/components/SynapseForm/SynapseFormSubmissionGrid.d.ts.map +1 -1
  87. package/dist/components/SynapseForm/SynapseFormSubmissionGrid.js +23 -16
  88. package/dist/components/SynapseForm/SynapseFormSubmissionGrid.js.map +1 -1
  89. package/dist/components/SynapseTable/SynapseTable.d.ts +6 -1
  90. package/dist/components/SynapseTable/SynapseTable.d.ts.map +1 -1
  91. package/dist/components/SynapseTable/SynapseTable.js +123 -93
  92. package/dist/components/SynapseTable/SynapseTable.js.map +1 -1
  93. package/dist/components/TextField/TextField.css +1 -0
  94. package/dist/components/TextField/TextField.d.ts +2 -1
  95. package/dist/components/TextField/TextField.d.ts.map +1 -1
  96. package/dist/components/TextField/TextField.js +42 -28
  97. package/dist/components/TextField/TextField.js.map +1 -1
  98. package/dist/components/TextField/TextField.module.scss +25 -0
  99. package/dist/components/TextField/TextField.module.scss.js +14 -0
  100. package/dist/components/TextField/TextField.module.scss.js.map +1 -0
  101. package/dist/components/download_list/AddToDownloadListConfirmationAlert/AddToDownloadListConfirmationAlert.js +2 -3
  102. package/dist/components/download_list/AddToDownloadListConfirmationAlert/AddToDownloadListConfirmationAlert.js.map +1 -1
  103. package/dist/components/index.d.ts +1 -0
  104. package/dist/components/index.d.ts.map +1 -1
  105. package/dist/components/index.js +242 -240
  106. package/dist/components/index.js.map +1 -1
  107. package/dist/components/styled/HoverPopover.css +1 -1
  108. package/dist/components/styled/HoverPopover.d.ts.map +1 -1
  109. package/dist/components/styled/HoverPopover.js +6 -5
  110. package/dist/components/styled/HoverPopover.js.map +1 -1
  111. package/dist/components/styled/HoverPopover.module.scss +2 -1
  112. package/dist/components/styled/HoverPopover.module.scss.js +1 -1
  113. package/dist/components/styled/StyledFormControl.js +1 -1
  114. package/dist/components/styled/StyledFormControl.js.map +1 -1
  115. package/dist/components/table/CsvPreview/CsvPreview.js +2 -3
  116. package/dist/components/table/CsvPreview/CsvPreview.js.map +1 -1
  117. package/dist/components/table/CsvPreview/CsvPreviewDialog.js +2 -3
  118. package/dist/components/table/CsvPreview/CsvPreviewDialog.js.map +1 -1
  119. package/dist/features/curator/GridPage/GridPage.js +2 -3
  120. package/dist/features/curator/GridPage/GridPage.js.map +1 -1
  121. package/dist/features/curator/GridPage/components/GridPageTitle.js +2 -3
  122. package/dist/features/curator/GridPage/components/GridPageTitle.js.map +1 -1
  123. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.d.ts +5 -2
  124. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.d.ts.map +1 -1
  125. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js +46 -33
  126. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js.map +1 -1
  127. package/dist/features/entity/metadata-task/components/MetadataTasksPage.d.ts.map +1 -1
  128. package/dist/features/entity/metadata-task/components/MetadataTasksPage.js +52 -27
  129. package/dist/features/entity/metadata-task/components/MetadataTasksPage.js.map +1 -1
  130. package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.d.ts +7 -0
  131. package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.d.ts.map +1 -0
  132. package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.js +322 -0
  133. package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.js.map +1 -0
  134. package/dist/features/entity/metadata-task/hooks/useGetOrCreateGridSessionForSource.d.ts +7 -1
  135. package/dist/features/entity/metadata-task/hooks/useGetOrCreateGridSessionForSource.d.ts.map +1 -1
  136. package/dist/features/entity/metadata-task/hooks/useGetOrCreateGridSessionForSource.js +7 -7
  137. package/dist/features/entity/metadata-task/hooks/useGetOrCreateGridSessionForSource.js.map +1 -1
  138. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.d.ts +9 -5
  139. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.d.ts.map +1 -1
  140. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.js +79 -16
  141. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.js.map +1 -1
  142. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask_legacy.d.ts +12 -0
  143. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask_legacy.d.ts.map +1 -0
  144. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask_legacy.js +20 -0
  145. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask_legacy.js.map +1 -0
  146. package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.d.ts +3 -3
  147. package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.d.ts.map +1 -1
  148. package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.js +54 -41
  149. package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.js.map +1 -1
  150. package/dist/features/entity/metadata-task/utils/getCreateGridRequestForMetadataTask.d.ts +2 -2
  151. package/dist/features/entity/metadata-task/utils/getCreateGridRequestForMetadataTask.d.ts.map +1 -1
  152. package/dist/features/entity/metadata-task/utils/getCreateGridRequestForMetadataTask.js +11 -4
  153. package/dist/features/entity/metadata-task/utils/getCreateGridRequestForMetadataTask.js.map +1 -1
  154. package/dist/features/entity/metadata-task/utils/taskHasAssignee.d.ts +3 -0
  155. package/dist/features/entity/metadata-task/utils/taskHasAssignee.d.ts.map +1 -0
  156. package/dist/features/entity/metadata-task/utils/taskHasAssignee.js +7 -0
  157. package/dist/features/entity/metadata-task/utils/taskHasAssignee.js.map +1 -0
  158. package/dist/index.js +306 -304
  159. package/dist/index.js.map +1 -1
  160. package/dist/mocks/curation/mockCurationTask.d.ts +10 -0
  161. package/dist/mocks/curation/mockCurationTask.d.ts.map +1 -0
  162. package/dist/mocks/curation/mockCurationTask.js +24 -0
  163. package/dist/mocks/curation/mockCurationTask.js.map +1 -0
  164. package/dist/style/components/_data-grid-extra.css +1 -1
  165. package/dist/style/components/_data-grid-extra.scss +16 -0
  166. package/dist/synapse-client/SynapseClient.d.ts +1 -1
  167. package/dist/synapse-client/SynapseClient.d.ts.map +1 -1
  168. package/dist/synapse-client/SynapseClient.js +3 -2
  169. package/dist/synapse-client/SynapseClient.js.map +1 -1
  170. package/dist/synapse-queries/KeyFactory.d.ts +8 -3
  171. package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
  172. package/dist/synapse-queries/KeyFactory.js +22 -7
  173. package/dist/synapse-queries/KeyFactory.js.map +1 -1
  174. package/dist/synapse-queries/curation/task/useCurationTask.d.ts +6 -3
  175. package/dist/synapse-queries/curation/task/useCurationTask.d.ts.map +1 -1
  176. package/dist/synapse-queries/curation/task/useCurationTask.js +62 -18
  177. package/dist/synapse-queries/curation/task/useCurationTask.js.map +1 -1
  178. package/dist/synapse-queries/grid/useEstablishWebsocketConnection.d.ts +2 -0
  179. package/dist/synapse-queries/grid/useEstablishWebsocketConnection.d.ts.map +1 -1
  180. package/dist/synapse-queries/grid/useEstablishWebsocketConnection.js.map +1 -1
  181. package/dist/synapse-queries/grid/useGridSession.d.ts +17 -2
  182. package/dist/synapse-queries/grid/useGridSession.d.ts.map +1 -1
  183. package/dist/synapse-queries/grid/useGridSession.js +63 -30
  184. package/dist/synapse-queries/grid/useGridSession.js.map +1 -1
  185. package/dist/synapse-queries/index.js +103 -99
  186. package/dist/synapse-queries/team/index.js +18 -15
  187. package/dist/synapse-queries/team/useTeamMembers.d.ts +34 -0
  188. package/dist/synapse-queries/team/useTeamMembers.d.ts.map +1 -1
  189. package/dist/synapse-queries/team/useTeamMembers.js +110 -69
  190. package/dist/synapse-queries/team/useTeamMembers.js.map +1 -1
  191. package/dist/synapse-queries/types.d.ts +13 -0
  192. package/dist/synapse-queries/types.d.ts.map +1 -0
  193. package/dist/synapse-queries/types.js +2 -0
  194. package/dist/synapse-queries/types.js.map +1 -0
  195. package/dist/synapse-queries/user/index.js +12 -11
  196. package/dist/synapse-queries/user/useUserGroupHeader.d.ts +5 -0
  197. package/dist/synapse-queries/user/useUserGroupHeader.d.ts.map +1 -1
  198. package/dist/synapse-queries/user/useUserGroupHeader.js +28 -21
  199. package/dist/synapse-queries/user/useUserGroupHeader.js.map +1 -1
  200. package/dist/theme/palette/Palettes.d.ts +2 -0
  201. package/dist/theme/palette/Palettes.d.ts.map +1 -1
  202. package/dist/theme/palette/Palettes.js +46 -40
  203. package/dist/theme/palette/Palettes.js.map +1 -1
  204. package/dist/tsconfig.build.tsbuildinfo +1 -1
  205. package/dist/utils/hooks/useOverlay.d.ts +2 -2
  206. package/dist/utils/hooks/useOverlay.d.ts.map +1 -1
  207. package/dist/utils/hooks/useOverlay.js +41 -41
  208. package/dist/utils/hooks/useOverlay.js.map +1 -1
  209. package/package.json +4 -4
  210. package/dist/assets/ArcusBioIcon.svg +0 -1
  211. package/dist/assets/ArcusBioIcon.svg.js +0 -7
  212. package/dist/assets/ArcusBioIcon.svg.js.map +0 -1
@@ -1,17 +1,17 @@
1
- import { jsx as t, jsxs as m, Fragment as z } from "react/jsx-runtime";
2
- import ot from "./components/GridMenuButton/GridMenuButton.js";
3
- import rt from "./components/UploadCsvToGridButton.js";
4
- import it from "./components/ExportCsvFromGridButton.js";
5
- import et from "./hooks/useGetSchemaForGrid.js";
6
- import mt from "./MergeGridWithSourceTableButton.js";
7
- import pt from "./utils/computeReplicaSelectionModel.js";
8
- import nt from "./utils/modelRowsToGrid.js";
1
+ import { jsx as t, jsxs as n, Fragment as w } from "react/jsx-runtime";
2
+ import nt from "./components/GridMenuButton/GridMenuButton.js";
3
+ import mt from "./components/UploadCsvToGridButton.js";
4
+ import pt from "./components/ExportCsvFromGridButton.js";
5
+ import st from "./hooks/useGetSchemaForGrid.js";
6
+ import ct from "./MergeGridWithSourceTableButton.js";
7
+ import lt from "./utils/computeReplicaSelectionModel.js";
8
+ import dt from "./utils/modelRowsToGrid.js";
9
9
  import "../../assets/icons/error_page/maintenance.svg.js";
10
10
  import "../../assets/icons/error_page/no-access.svg.js";
11
11
  import "../../assets/icons/error_page/unavailable.svg.js";
12
12
  import "../../utils/PermissionLevelToAccessType.js";
13
13
  import "../../utils/SynapseConstants.js";
14
- import { forwardRef as st, useState as g, useRef as I, useImperativeHandle as ct, useEffect as E, useMemo as L, useCallback as d } from "react";
14
+ import { forwardRef as at, useState as S, useRef as I, useCallback as d, useImperativeHandle as ut, useEffect as R, useMemo as P } from "react";
15
15
  import "../../synapse-client/SynapseClient.js";
16
16
  import "@sage-bionetworks/synapse-client/generated/models/ErrorResponseCode";
17
17
  import "@sage-bionetworks/synapse-client/generated/models/TwoFactorAuthErrorResponse";
@@ -27,11 +27,11 @@ import "@tanstack/query-core";
27
27
  import "lodash-es/isEmpty";
28
28
  import "lodash-es/isEqual";
29
29
  import "lodash-es/xorWith";
30
- import { Stack as lt } from "@mui/material";
30
+ import { Tooltip as ht, Stack as ft } from "@mui/material";
31
31
  import "@sage-bionetworks/synapse-client";
32
- import { useGetEntity as dt } from "../../synapse-queries/entity/useEntity.js";
32
+ import { useGetEntity as gt } from "../../synapse-queries/entity/useEntity.js";
33
33
  import "../../utils/types/IsType.js";
34
- import { useGetCurrentUserBundle as at } from "../../synapse-queries/user/useUserBundle.js";
34
+ import { useGetCurrentUserBundle as St } from "../../synapse-queries/user/useUserBundle.js";
35
35
  import "../../utils/hooks/useCookiePreferences.js";
36
36
  import "../../utils/hooks/useSourceAppConfigs.js";
37
37
  import "universal-cookie";
@@ -43,7 +43,7 @@ import "react-router";
43
43
  import "@mui/icons-material/Close";
44
44
  import "../styled/StyledPopover.js";
45
45
  import "../Markdown/MarkdownSynapse.js";
46
- import { SmartToyTwoTone as ut } from "@mui/icons-material";
46
+ import { SmartToyTwoTone as It } from "@mui/icons-material";
47
47
  import "react-hot-toast";
48
48
  import "react-transition-group";
49
49
  /* empty css */
@@ -58,7 +58,6 @@ import "../../assets/icons/account-validated.svg.js";
58
58
  import "../../utils/functions/DateFormatter.js";
59
59
  import "@react-hookz/web";
60
60
  import "dayjs";
61
- import "../../assets/ArcusBioIcon.svg.js";
62
61
  import "@mui/material/SvgIcon";
63
62
  import "../../assets/icons/AccessPending.svg.js";
64
63
  import "../../assets/icons/AccessPendingCloud.svg.js";
@@ -115,7 +114,7 @@ import "../QueryContext/QueryContext.js";
115
114
  import "../QueryVisualizationWrapper/QueryVisualizationContext.js";
116
115
  import "react-share";
117
116
  import "../GenericCard/GenericCard.js";
118
- import { SkeletonTable as ht } from "../Skeleton/SkeletonTable.js";
117
+ import { SkeletonTable as Ct } from "../Skeleton/SkeletonTable.js";
119
118
  import "@mui/system";
120
119
  import "../GenericCard/Linkify.js";
121
120
  import "jotai";
@@ -223,234 +222,281 @@ import s from "@mui/material/Grid";
223
222
  import "@mui/icons-material/ArrowForwardIos";
224
223
  import "../PortalAclEditor/PortalAclEditor.js";
225
224
  import "../SynapseHomepageV2/HomepageStyles.js";
226
- import { getSchemaPropertiesInfo as ft } from "../../utils/jsonschema/getSchemaPropertyInfo.js";
227
- import { ClickableJsonCrdt as St } from "clickable-json";
228
- import { GridAgentChat as gt } from "../SynapseChat/GridAgentChat.js";
229
- import It from "./DataGrid.js";
230
- import { useGridUndoRedo as Ct } from "./hooks/useGridUndoRedo.js";
231
- import { StartGridSession as yt } from "./StartGridSession.js";
232
- import { useDataGridWebSocket as Et } from "./useDataGridWebsocket.js";
233
- import { applyModelChange as Rt } from "./utils/applyModelChange.js";
234
- import { removeNoOpOperations as xt } from "./utils/DataGridUtils.js";
235
- import { mapOperationsToModelChanges as Gt } from "./utils/mapOperationsToModelChanges.js";
236
- import bt from "../AccessRequirementList/RequirementItem/CertificationRequirement.js";
237
- import { ValidationAlert as vt } from "./components/ValidationAlert.js";
238
- const Ye = st(
239
- ({ agentRegistrationId: B, showDebugInfo: R = !1 }, D) => {
240
- const [o, P] = g(null), [p, A] = g(null), [j, v] = g(!1), [F, w] = g(
225
+ import { getSchemaPropertiesInfo as yt } from "../../utils/jsonschema/getSchemaPropertyInfo.js";
226
+ import { ClickableJsonCrdt as Rt } from "clickable-json";
227
+ import { GridAgentChat as Et } from "../SynapseChat/GridAgentChat.js";
228
+ import xt from "./DataGrid.js";
229
+ import { useGridUndoRedo as Gt } from "./hooks/useGridUndoRedo.js";
230
+ import { StartGridSession as vt } from "./StartGridSession.js";
231
+ import { useDataGridWebSocket as bt } from "./useDataGridWebsocket.js";
232
+ import { applyModelChange as Tt } from "./utils/applyModelChange.js";
233
+ import { removeNoOpOperations as wt } from "./utils/DataGridUtils.js";
234
+ import { mapOperationsToModelChanges as Nt } from "./utils/mapOperationsToModelChanges.js";
235
+ import { useListGridReplicas as kt } from "../../synapse-queries/grid/useGridSession.js";
236
+ import { useRemoteSelections as Ot } from "./hooks/useRemoteSelections.js";
237
+ import zt from "../AccessRequirementList/RequirementItem/CertificationRequirement.js";
238
+ import { ValidationAlert as Mt } from "./components/ValidationAlert.js";
239
+ const en = at(
240
+ ({ agentRegistrationId: A, showDebugInfo: E = !1 }, j) => {
241
+ const [o, F] = S(null), [m, J] = S(null), [W, N] = S(!1), [H, k] = S(
241
242
  null
242
- ), a = I(null), u = I(null), { data: J, isLoading: W } = at();
243
- ct(
244
- D,
243
+ ), h = I(null), f = I(null), { data: V, isLoading: _ } = St(), { data: x = [], refetch: O } = kt(o?.sessionId), G = d(() => {
244
+ O();
245
+ }, [O]);
246
+ ut(
247
+ j,
245
248
  () => ({
246
- initializeGrid: (r) => {
247
- a.current && a.current.handleStartSession(r);
249
+ initializeGrid: (i) => {
250
+ h.current && h.current.handleStartSession(i);
248
251
  },
249
- loadExistingSession: (r) => {
250
- a.current && a.current.handleLoadSession(r);
252
+ loadExistingSession: (i) => {
253
+ h.current && h.current.handleLoadSession(i);
251
254
  }
252
255
  }),
253
256
  []
254
257
  );
255
258
  const {
256
- isConnected: n,
257
- websocketInstance: T,
258
- hasCompletedInitialSync: H,
259
- model: i,
260
- modelSnapshot: h,
261
- connect: k,
259
+ isConnected: p,
260
+ websocketInstance: z,
261
+ hasCompletedInitialSync: $,
262
+ model: e,
263
+ modelSnapshot: a,
264
+ connect: M,
262
265
  presignedUrl: c,
263
- hasSufficientData: N
264
- } = Et(), C = I(null);
265
- E(() => {
266
- C.current = T;
267
- }, [T]);
268
- const x = I(null);
269
- E(() => {
270
- if (p == null || !o?.sessionId) {
271
- x.current = null;
266
+ hasSufficientData: U
267
+ } = bt({
268
+ onGridReady: G,
269
+ onReplicaConnected: G,
270
+ onReplicaDisconnected: G
271
+ }), C = I(null);
272
+ R(() => {
273
+ C.current = z;
274
+ }, [z]);
275
+ const v = I(null);
276
+ R(() => {
277
+ if (m == null || !o?.sessionId) {
278
+ v.current = null;
272
279
  return;
273
280
  }
274
- const r = {
275
- replicaId: p,
281
+ const i = {
282
+ replicaId: m,
276
283
  sessionId: o.sessionId
277
- }, e = x.current;
278
- e && e.replicaId === r.replicaId && e.sessionId === r.sessionId || (x.current = r, k(p, o.sessionId));
279
- }, [p, o?.sessionId, k]), E(() => {
280
- i === null && (w(null), u.current && u.current.setActiveCell(null));
281
- }, [i]);
282
- const G = et(o), { data: V } = dt(
284
+ }, r = v.current;
285
+ r && r.replicaId === i.replicaId && r.sessionId === i.sessionId || (v.current = i, M(m, o.sessionId));
286
+ }, [m, o?.sessionId, M]), R(() => {
287
+ e === null && (k(null), f.current && f.current.setActiveCell(null));
288
+ }, [e]);
289
+ const b = st(o), { data: q } = gt(
283
290
  o?.sourceEntityId,
284
291
  void 0,
285
292
  {
286
293
  enabled: !!o?.sourceEntityId
287
294
  }
288
- ), _ = V?.concreteType === "org.sagebionetworks.repo.model.table.EntityView", b = L(() => ft(G ?? null), [G]), $ = n ? "Connected" : "Disconnected", f = L(
289
- () => h ? nt(i, h) : [],
290
- [i, h]
295
+ ), Y = q?.concreteType === "org.sagebionetworks.repo.model.table.EntityView", T = P(() => yt(b ?? null), [b]), K = p ? "Connected" : "Disconnected", Q = Ot(
296
+ a,
297
+ e,
298
+ x,
299
+ m
300
+ ), g = P(
301
+ () => a ? dt(e, a) : [],
302
+ [e, a]
291
303
  ), y = d(() => {
292
- !n || !C.current || C.current.sendPatch();
293
- }, [n, C]);
294
- E(() => {
295
- n && y();
296
- }, [n, y]);
297
- const l = d(
298
- (r, e) => {
299
- e.forEach((S) => {
300
- Rt(r, S, b);
304
+ !p || !C.current || C.current.sendPatch();
305
+ }, [p, C]);
306
+ R(() => {
307
+ p && y();
308
+ }, [p, y]);
309
+ const u = d(
310
+ (i, r) => {
311
+ r.forEach((l) => {
312
+ Tt(i, l, T);
301
313
  }), y();
302
314
  },
303
- [y, b]
304
- ), q = d(
305
- (r) => {
306
- if (!i) {
315
+ [y, T]
316
+ ), X = d(
317
+ (i) => {
318
+ if (!e) {
307
319
  console.error("Model is not initialized");
308
320
  return;
309
321
  }
310
- r.type === "DELETE" && u.current && u.current.setActiveCell(null), l(i, [r]);
322
+ i.type === "DELETE" && f.current && f.current.setActiveCell(null), u(e, [i]);
311
323
  },
312
- [i, l]
313
- ), { undoUI: Y, redoUI: K, addOperationsToUndoStack: M, clearRedoStack: O } = Ct(q), Q = d(
314
- (r, e) => {
315
- if (!i) {
324
+ [e, u]
325
+ ), { undoUI: Z, redoUI: tt, addOperationsToUndoStack: D, clearRedoStack: L } = Gt(X), ot = d(
326
+ (i, r) => {
327
+ if (!e) {
316
328
  console.error("Model is not initialized");
317
329
  return;
318
330
  }
319
- if (e = xt(r, f, e), e.length > 0) {
320
- O(), M(e, f, r);
321
- const S = Gt(e, r);
322
- l(i, S);
331
+ if (r = wt(i, g, r), r.length > 0) {
332
+ L(), D(r, g, i);
333
+ const l = Nt(r, i);
334
+ u(e, l);
323
335
  }
324
336
  },
325
337
  [
326
- i,
327
- f,
328
- O,
329
- M,
330
- l
338
+ e,
339
+ g,
340
+ L,
341
+ D,
342
+ u
331
343
  ]
332
- ), X = d(
333
- (r) => {
334
- const { selection: e } = r;
335
- if (e != null && (w(e), i != null && p != null)) {
336
- const S = pt(
337
- e,
338
- i
344
+ ), it = d(
345
+ (i) => {
346
+ const { selection: r } = i;
347
+ if (r != null && (k(r), e != null && m != null)) {
348
+ const l = lt(
349
+ r,
350
+ e
339
351
  );
340
- l(i, [
352
+ u(e, [
341
353
  {
342
354
  type: "SET_SELECTION",
343
- replicaId: p.toString(),
344
- selection: S
355
+ replicaId: m.toString(),
356
+ selection: l
345
357
  }
346
358
  ]);
347
359
  }
348
360
  },
349
- [l, i, p]
350
- ), U = I(null), [, Z] = g({}), tt = d(
351
- (r, e) => {
352
- r !== null && (U.current = r, Z({}));
361
+ [u, e, m]
362
+ ), B = I(null), [, rt] = S({}), et = d(
363
+ (i, r) => {
364
+ i !== null && (B.current = i, rt({}));
353
365
  },
354
366
  []
355
367
  );
356
- return !W && !J?.isCertified ? /* @__PURE__ */ t(bt, {}) : /* @__PURE__ */ t("div", { children: /* @__PURE__ */ m(s, { container: !0, spacing: 2, children: [
368
+ return !_ && !V?.isCertified ? /* @__PURE__ */ t(zt, {}) : /* @__PURE__ */ t("div", { children: /* @__PURE__ */ n(s, { container: !0, spacing: 2, children: [
357
369
  /* @__PURE__ */ t(s, { size: { xs: 12, xl: 8 }, children: /* @__PURE__ */ t(
358
- yt,
370
+ vt,
359
371
  {
360
- ref: a,
361
- onSessionChange: P,
362
- onReplicaChange: A,
363
- show: R
372
+ ref: h,
373
+ onSessionChange: F,
374
+ onReplicaChange: J,
375
+ show: E
364
376
  }
365
377
  ) }),
366
- /* @__PURE__ */ t(s, { size: { xs: 12, xl: 4 }, children: R && /* @__PURE__ */ m("div", { children: [
367
- /* @__PURE__ */ m("p", { children: [
378
+ /* @__PURE__ */ t(s, { size: { xs: 12, xl: 4 }, children: E && /* @__PURE__ */ n("div", { children: [
379
+ /* @__PURE__ */ n("p", { children: [
368
380
  "Session ID: ",
369
381
  o?.sessionId || "No session created"
370
382
  ] }),
371
- /* @__PURE__ */ m("p", { children: [
383
+ /* @__PURE__ */ n("p", { children: [
372
384
  "Replica ID: ",
373
- p || "No replica created"
385
+ m || "No replica created"
374
386
  ] }),
375
- /* @__PURE__ */ m("p", { children: [
387
+ /* @__PURE__ */ n("p", { children: [
376
388
  "Source Entity ID:",
377
389
  " ",
378
390
  o?.sourceEntityId || "No source entity"
379
391
  ] }),
380
- /* @__PURE__ */ m("p", { children: [
392
+ /* @__PURE__ */ n("p", { children: [
381
393
  "JSON Schema $id:",
382
394
  " ",
383
395
  o?.gridJsonSchema$Id || "No schema attached to session"
384
396
  ] }),
385
- /* @__PURE__ */ m("p", { children: [
397
+ /* @__PURE__ */ n("p", { children: [
386
398
  "Presigned URL:",
387
399
  " ",
388
400
  c ? c.substring(0, 30) + (c.length > 30 ? " ... " + c.substring(c.length - 10) : "") : "No URL generated"
389
401
  ] }),
390
- /* @__PURE__ */ m("p", { children: [
402
+ /* @__PURE__ */ n("p", { children: [
391
403
  "WebSocket Status:",
392
404
  " ",
393
- /* @__PURE__ */ t("span", { style: { color: n ? "green" : "red" }, children: $ })
394
- ] })
405
+ /* @__PURE__ */ t("span", { style: { color: p ? "green" : "red" }, children: K })
406
+ ] }),
407
+ /* @__PURE__ */ t("p", { children: (() => {
408
+ const i = x.filter(
409
+ (r) => r.isConnected
410
+ );
411
+ return /* @__PURE__ */ n(w, { children: [
412
+ "Connected Replicas (",
413
+ i.length,
414
+ " /",
415
+ " ",
416
+ x.length,
417
+ " total):",
418
+ " ",
419
+ i.length === 0 ? "none" : i.map((r, l) => /* @__PURE__ */ t(
420
+ ht,
421
+ {
422
+ title: /* @__PURE__ */ t("pre", { style: { margin: 0, fontSize: "11px" }, children: JSON.stringify(r, null, 2) }),
423
+ children: /* @__PURE__ */ n(
424
+ "span",
425
+ {
426
+ style: {
427
+ cursor: "pointer",
428
+ textDecoration: "underline dotted"
429
+ },
430
+ children: [
431
+ r.replicaId,
432
+ l < i.length - 1 ? ", " : ""
433
+ ]
434
+ }
435
+ )
436
+ },
437
+ r.replicaId
438
+ ))
439
+ ] });
440
+ })() })
395
441
  ] }) }),
396
- o && /* @__PURE__ */ m(z, { children: [
397
- !N && /* @__PURE__ */ m(s, { size: 12, children: [
442
+ o && /* @__PURE__ */ n(w, { children: [
443
+ !U && /* @__PURE__ */ n(s, { size: 12, children: [
398
444
  /* @__PURE__ */ t("h3", { children: "Setting up grid..." }),
399
- /* @__PURE__ */ m("div", { style: { marginBottom: "10px" }, children: [
445
+ /* @__PURE__ */ n("div", { style: { marginBottom: "10px" }, children: [
400
446
  !o && /* @__PURE__ */ t("p", { children: "Creating grid session..." }),
401
- o && !p && /* @__PURE__ */ t("p", { children: "Setting up real-time sync..." }),
402
- o && p && !c && /* @__PURE__ */ t("p", { children: "Establishing secure connection..." }),
403
- o && p && c && !n && /* @__PURE__ */ t("p", { children: "Connecting to server..." }),
404
- n && !H && /* @__PURE__ */ t("p", { children: "Loading table data..." }),
405
- /* @__PURE__ */ t(ht, { numRows: 4, numCols: 1 })
447
+ o && !m && /* @__PURE__ */ t("p", { children: "Setting up real-time sync..." }),
448
+ o && m && !c && /* @__PURE__ */ t("p", { children: "Establishing secure connection..." }),
449
+ o && m && c && !p && /* @__PURE__ */ t("p", { children: "Connecting to server..." }),
450
+ p && !$ && /* @__PURE__ */ t("p", { children: "Loading table data..." }),
451
+ /* @__PURE__ */ t(Ct, { numRows: 4, numCols: 1 })
406
452
  ] })
407
453
  ] }),
408
- N && /* @__PURE__ */ m(z, { children: [
409
- /* @__PURE__ */ t(s, { size: 12, children: /* @__PURE__ */ m(
410
- lt,
454
+ U && /* @__PURE__ */ n(w, { children: [
455
+ /* @__PURE__ */ t(s, { size: 12, children: /* @__PURE__ */ n(
456
+ ft,
411
457
  {
412
458
  direction: "row",
413
459
  spacing: 1,
414
460
  sx: { justifyContent: "flex-end" },
415
461
  children: [
416
- Y,
417
- K,
462
+ Z,
463
+ tt,
418
464
  /* @__PURE__ */ t(
419
- ot,
465
+ nt,
420
466
  {
421
467
  variant: "outlined",
422
- onClick: () => v(!0),
423
- startIcon: /* @__PURE__ */ t(ut, {}),
468
+ onClick: () => N(!0),
469
+ startIcon: /* @__PURE__ */ t(It, {}),
424
470
  children: "Open chat"
425
471
  }
426
472
  ),
427
473
  /* @__PURE__ */ t(
428
- gt,
474
+ Et,
429
475
  {
430
- agentRegistrationId: B,
431
- open: j,
432
- onClose: () => v(!1),
476
+ agentRegistrationId: A,
477
+ open: W,
478
+ onClose: () => N(!1),
433
479
  gridSessionId: o.sessionId,
434
- usersReplicaId: p,
480
+ usersReplicaId: m,
435
481
  chatbotName: "Grid Assistant"
436
482
  }
437
483
  ),
438
484
  o.sourceEntityId && /* @__PURE__ */ t(
439
- rt,
485
+ mt,
440
486
  {
441
487
  sourceEntityId: o.sourceEntityId,
442
488
  gridSessionId: o.sessionId
443
489
  }
444
490
  ),
445
491
  o.sessionId && /* @__PURE__ */ t(
446
- it,
492
+ pt,
447
493
  {
448
494
  gridSessionId: o.sessionId,
449
495
  filename: "grid-" + (o.sourceEntityId || "export")
450
496
  }
451
497
  ),
452
498
  o.sourceEntityId && /* @__PURE__ */ t(
453
- mt,
499
+ ct,
454
500
  {
455
501
  sourceEntityId: o.sourceEntityId,
456
502
  gridSessionId: o.sessionId
@@ -460,30 +506,31 @@ const Ye = st(
460
506
  }
461
507
  ) }),
462
508
  /* @__PURE__ */ t(s, { size: 12, children: /* @__PURE__ */ t(
463
- It,
509
+ xt,
464
510
  {
465
- gridRef: u,
466
- rowValues: f,
467
- columnNames: h?.columnNames ?? [],
468
- columnOrder: h?.columnOrder ?? [],
469
- schemaPropertiesInfo: b,
470
- entityIsView: _,
471
- jsonSchema: G,
472
- lastSelection: F,
473
- handleChange: Q,
474
- handleSelectionChange: X,
475
- onSelectedRowChange: tt
511
+ gridRef: f,
512
+ rowValues: g,
513
+ columnNames: a?.columnNames ?? [],
514
+ columnOrder: a?.columnOrder ?? [],
515
+ schemaPropertiesInfo: T,
516
+ entityIsView: Y,
517
+ jsonSchema: b,
518
+ lastSelection: H,
519
+ handleChange: ot,
520
+ handleSelectionChange: it,
521
+ onSelectedRowChange: et,
522
+ remoteSelections: Q
476
523
  }
477
524
  ) }),
478
525
  /* @__PURE__ */ t(s, { size: 12, children: /* @__PURE__ */ t(
479
- vt,
526
+ Mt,
480
527
  {
481
- selectedRowIndex: U.current,
482
- rowValues: f
528
+ selectedRowIndex: B.current,
529
+ rowValues: g
483
530
  }
484
531
  ) })
485
532
  ] }),
486
- R && /* @__PURE__ */ m(
533
+ E && /* @__PURE__ */ n(
487
534
  s,
488
535
  {
489
536
  size: 12,
@@ -496,7 +543,7 @@ const Ye = st(
496
543
  },
497
544
  children: [
498
545
  /* @__PURE__ */ t("h3", { children: "Model" }),
499
- i ? /* @__PURE__ */ t(St, { model: i }) : "No model available"
546
+ e ? /* @__PURE__ */ t(Rt, { model: e }) : "No model available"
500
547
  ]
501
548
  }
502
549
  )
@@ -505,6 +552,6 @@ const Ye = st(
505
552
  }
506
553
  );
507
554
  export {
508
- Ye as default
555
+ en as default
509
556
  };
510
557
  //# sourceMappingURL=SynapseGrid.js.map