synapse-react-client 4.0.6 → 4.0.8

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