synapse-react-client 4.0.5-b → 4.0.6

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 (109) 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/CreateProjectModal/CreateProjectModal.d.ts +2 -1
  9. package/dist/components/CreateProjectModal/CreateProjectModal.d.ts.map +1 -1
  10. package/dist/components/CreateProjectModal/CreateProjectModal.js +35 -30
  11. package/dist/components/CreateProjectModal/CreateProjectModal.js.map +1 -1
  12. package/dist/components/DataGrid/DataGridWebSocket.d.ts +4 -0
  13. package/dist/components/DataGrid/DataGridWebSocket.d.ts.map +1 -1
  14. package/dist/components/DataGrid/DataGridWebSocket.js +47 -37
  15. package/dist/components/DataGrid/DataGridWebSocket.js.map +1 -1
  16. package/dist/components/DataGrid/SynapseGrid.d.ts.map +1 -1
  17. package/dist/components/DataGrid/SynapseGrid.js +193 -152
  18. package/dist/components/DataGrid/SynapseGrid.js.map +1 -1
  19. package/dist/components/DataGrid/useDataGridWebsocket.d.ts +6 -1
  20. package/dist/components/DataGrid/useDataGridWebsocket.d.ts.map +1 -1
  21. package/dist/components/DataGrid/useDataGridWebsocket.js +78 -69
  22. package/dist/components/DataGrid/useDataGridWebsocket.js.map +1 -1
  23. package/dist/components/SynapseTable/SynapseTable.d.ts +6 -1
  24. package/dist/components/SynapseTable/SynapseTable.d.ts.map +1 -1
  25. package/dist/components/SynapseTable/SynapseTable.js +123 -93
  26. package/dist/components/SynapseTable/SynapseTable.js.map +1 -1
  27. package/dist/components/TextField/TextField.css +1 -0
  28. package/dist/components/TextField/TextField.d.ts +1 -1
  29. package/dist/components/TextField/TextField.d.ts.map +1 -1
  30. package/dist/components/TextField/TextField.js +30 -28
  31. package/dist/components/TextField/TextField.js.map +1 -1
  32. package/dist/components/TextField/TextField.module.scss +18 -0
  33. package/dist/components/TextField/TextField.module.scss.js +12 -0
  34. package/dist/components/TextField/TextField.module.scss.js.map +1 -0
  35. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.d.ts +5 -2
  36. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.d.ts.map +1 -1
  37. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js +180 -36
  38. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js.map +1 -1
  39. package/dist/features/entity/metadata-task/components/MetadataTasksPage.d.ts.map +1 -1
  40. package/dist/features/entity/metadata-task/components/MetadataTasksPage.js +52 -27
  41. package/dist/features/entity/metadata-task/components/MetadataTasksPage.js.map +1 -1
  42. package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.d.ts +7 -0
  43. package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.d.ts.map +1 -0
  44. package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.js +323 -0
  45. package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.js.map +1 -0
  46. package/dist/features/entity/metadata-task/hooks/useGetOrCreateGridSessionForSource.d.ts +7 -1
  47. package/dist/features/entity/metadata-task/hooks/useGetOrCreateGridSessionForSource.d.ts.map +1 -1
  48. package/dist/features/entity/metadata-task/hooks/useGetOrCreateGridSessionForSource.js +7 -7
  49. package/dist/features/entity/metadata-task/hooks/useGetOrCreateGridSessionForSource.js.map +1 -1
  50. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.d.ts +9 -5
  51. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.d.ts.map +1 -1
  52. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.js +79 -16
  53. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.js.map +1 -1
  54. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask_legacy.d.ts +12 -0
  55. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask_legacy.d.ts.map +1 -0
  56. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask_legacy.js +20 -0
  57. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask_legacy.js.map +1 -0
  58. package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.d.ts +3 -3
  59. package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.d.ts.map +1 -1
  60. package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.js +54 -41
  61. package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.js.map +1 -1
  62. package/dist/features/entity/metadata-task/utils/getCreateGridRequestForMetadataTask.d.ts +2 -2
  63. package/dist/features/entity/metadata-task/utils/getCreateGridRequestForMetadataTask.d.ts.map +1 -1
  64. package/dist/features/entity/metadata-task/utils/getCreateGridRequestForMetadataTask.js +11 -4
  65. package/dist/features/entity/metadata-task/utils/getCreateGridRequestForMetadataTask.js.map +1 -1
  66. package/dist/features/entity/metadata-task/utils/taskHasAssignee.d.ts +3 -0
  67. package/dist/features/entity/metadata-task/utils/taskHasAssignee.d.ts.map +1 -0
  68. package/dist/features/entity/metadata-task/utils/taskHasAssignee.js +7 -0
  69. package/dist/features/entity/metadata-task/utils/taskHasAssignee.js.map +1 -0
  70. package/dist/mocks/curation/mockCurationTask.d.ts +10 -0
  71. package/dist/mocks/curation/mockCurationTask.d.ts.map +1 -0
  72. package/dist/mocks/curation/mockCurationTask.js +24 -0
  73. package/dist/mocks/curation/mockCurationTask.js.map +1 -0
  74. package/dist/synapse-queries/KeyFactory.d.ts +8 -3
  75. package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
  76. package/dist/synapse-queries/KeyFactory.js +22 -7
  77. package/dist/synapse-queries/KeyFactory.js.map +1 -1
  78. package/dist/synapse-queries/curation/task/useCurationTask.d.ts +6 -3
  79. package/dist/synapse-queries/curation/task/useCurationTask.d.ts.map +1 -1
  80. package/dist/synapse-queries/curation/task/useCurationTask.js +62 -18
  81. package/dist/synapse-queries/curation/task/useCurationTask.js.map +1 -1
  82. package/dist/synapse-queries/grid/useEstablishWebsocketConnection.d.ts +2 -0
  83. package/dist/synapse-queries/grid/useEstablishWebsocketConnection.d.ts.map +1 -1
  84. package/dist/synapse-queries/grid/useEstablishWebsocketConnection.js.map +1 -1
  85. package/dist/synapse-queries/grid/useGridSession.d.ts +17 -2
  86. package/dist/synapse-queries/grid/useGridSession.d.ts.map +1 -1
  87. package/dist/synapse-queries/grid/useGridSession.js +63 -30
  88. package/dist/synapse-queries/grid/useGridSession.js.map +1 -1
  89. package/dist/synapse-queries/index.js +103 -99
  90. package/dist/synapse-queries/team/index.js +18 -15
  91. package/dist/synapse-queries/team/useTeamMembers.d.ts +34 -0
  92. package/dist/synapse-queries/team/useTeamMembers.d.ts.map +1 -1
  93. package/dist/synapse-queries/team/useTeamMembers.js +110 -69
  94. package/dist/synapse-queries/team/useTeamMembers.js.map +1 -1
  95. package/dist/synapse-queries/types.d.ts +13 -0
  96. package/dist/synapse-queries/types.d.ts.map +1 -0
  97. package/dist/synapse-queries/types.js +2 -0
  98. package/dist/synapse-queries/types.js.map +1 -0
  99. package/dist/synapse-queries/user/index.js +12 -11
  100. package/dist/synapse-queries/user/useUserGroupHeader.d.ts +5 -0
  101. package/dist/synapse-queries/user/useUserGroupHeader.d.ts.map +1 -1
  102. package/dist/synapse-queries/user/useUserGroupHeader.js +28 -21
  103. package/dist/synapse-queries/user/useUserGroupHeader.js.map +1 -1
  104. package/dist/tsconfig.build.tsbuildinfo +1 -1
  105. package/dist/utils/hooks/useOverlay.d.ts +2 -2
  106. package/dist/utils/hooks/useOverlay.d.ts.map +1 -1
  107. package/dist/utils/hooks/useOverlay.js +41 -41
  108. package/dist/utils/hooks/useOverlay.js.map +1 -1
  109. package/package.json +7 -7
@@ -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 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";
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 dt, useState as I, useRef as S, useCallback as d, useImperativeHandle as at, 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 ut, Stack as ht } 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 ft } 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 gt } 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 */
@@ -115,7 +115,7 @@ import "../QueryContext/QueryContext.js";
115
115
  import "../QueryVisualizationWrapper/QueryVisualizationContext.js";
116
116
  import "react-share";
117
117
  import "../GenericCard/GenericCard.js";
118
- import { SkeletonTable as ht } from "../Skeleton/SkeletonTable.js";
118
+ import { SkeletonTable as St } from "../Skeleton/SkeletonTable.js";
119
119
  import "@mui/system";
120
120
  import "../GenericCard/Linkify.js";
121
121
  import "jotai";
@@ -223,234 +223,275 @@ import s from "@mui/material/Grid";
223
223
  import "@mui/icons-material/ArrowForwardIos";
224
224
  import "../PortalAclEditor/PortalAclEditor.js";
225
225
  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(
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(
241
242
  null
242
- ), a = I(null), u = I(null), { data: J, isLoading: W } = at();
243
- ct(
244
- D,
243
+ ), u = S(null), h = S(null), { data: V, isLoading: _ } = gt(), { data: k = [], refetch: O } = Nt(o?.sessionId), x = d(() => {
244
+ O();
245
+ }, [O]);
246
+ at(
247
+ j,
245
248
  () => ({
246
- initializeGrid: (r) => {
247
- a.current && a.current.handleStartSession(r);
249
+ initializeGrid: (i) => {
250
+ u.current && u.current.handleStartSession(i);
248
251
  },
249
- loadExistingSession: (r) => {
250
- a.current && a.current.handleLoadSession(r);
252
+ loadExistingSession: (i) => {
253
+ u.current && u.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: m,
260
+ websocketInstance: z,
261
+ hasCompletedInitialSync: $,
262
+ model: e,
263
+ modelSnapshot: f,
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(() => {
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(() => {
270
277
  if (p == null || !o?.sessionId) {
271
- x.current = null;
278
+ G.current = null;
272
279
  return;
273
280
  }
274
- const r = {
281
+ const i = {
275
282
  replicaId: p,
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 = 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));
288
+ }, [e]);
289
+ const v = mt(o), { data: q } = ft(
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", b = P(() => Ct(v ?? null), [v]), K = m ? "Connected" : "Disconnected", g = P(
296
+ () => f ? lt(e, f) : [],
297
+ [e, f]
291
298
  ), 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);
299
+ !m || !C.current || C.current.sendPatch();
300
+ }, [m, C]);
301
+ R(() => {
302
+ m && y();
303
+ }, [m, y]);
304
+ const a = d(
305
+ (i, r) => {
306
+ r.forEach((l) => {
307
+ bt(i, l, b);
301
308
  }), y();
302
309
  },
303
310
  [y, b]
304
- ), q = d(
305
- (r) => {
306
- if (!i) {
311
+ ), Q = d(
312
+ (i) => {
313
+ if (!e) {
307
314
  console.error("Model is not initialized");
308
315
  return;
309
316
  }
310
- r.type === "DELETE" && u.current && u.current.setActiveCell(null), l(i, [r]);
317
+ i.type === "DELETE" && h.current && h.current.setActiveCell(null), a(e, [i]);
311
318
  },
312
- [i, l]
313
- ), { undoUI: Y, redoUI: K, addOperationsToUndoStack: M, clearRedoStack: O } = Ct(q), Q = d(
314
- (r, e) => {
315
- if (!i) {
319
+ [e, a]
320
+ ), { undoUI: X, redoUI: Z, addOperationsToUndoStack: D, clearRedoStack: L } = xt(Q), tt = d(
321
+ (i, r) => {
322
+ if (!e) {
316
323
  console.error("Model is not initialized");
317
324
  return;
318
325
  }
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);
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);
323
330
  }
324
331
  },
325
332
  [
326
- i,
327
- f,
328
- O,
329
- M,
330
- l
333
+ e,
334
+ g,
335
+ L,
336
+ D,
337
+ a
331
338
  ]
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
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,
345
+ e
339
346
  );
340
- l(i, [
347
+ a(e, [
341
348
  {
342
349
  type: "SET_SELECTION",
343
350
  replicaId: p.toString(),
344
- selection: S
351
+ selection: l
345
352
  }
346
353
  ]);
347
354
  }
348
355
  },
349
- [l, i, p]
350
- ), U = I(null), [, Z] = g({}), tt = d(
351
- (r, e) => {
352
- r !== null && (U.current = r, Z({}));
356
+ [a, e, p]
357
+ ), B = S(null), [, it] = I({}), rt = d(
358
+ (i, r) => {
359
+ i !== null && (B.current = i, it({}));
353
360
  },
354
361
  []
355
362
  );
356
- return !W && !J?.isCertified ? /* @__PURE__ */ t(bt, {}) : /* @__PURE__ */ t("div", { children: /* @__PURE__ */ m(s, { container: !0, spacing: 2, children: [
363
+ return !_ && !V?.isCertified ? /* @__PURE__ */ t(kt, {}) : /* @__PURE__ */ t("div", { children: /* @__PURE__ */ n(s, { container: !0, spacing: 2, children: [
357
364
  /* @__PURE__ */ t(s, { size: { xs: 12, xl: 8 }, children: /* @__PURE__ */ t(
358
- yt,
365
+ Gt,
359
366
  {
360
- ref: a,
361
- onSessionChange: P,
362
- onReplicaChange: A,
363
- show: R
367
+ ref: u,
368
+ onSessionChange: F,
369
+ onReplicaChange: J,
370
+ show: E
364
371
  }
365
372
  ) }),
366
- /* @__PURE__ */ t(s, { size: { xs: 12, xl: 4 }, children: R && /* @__PURE__ */ m("div", { children: [
367
- /* @__PURE__ */ m("p", { children: [
373
+ /* @__PURE__ */ t(s, { size: { xs: 12, xl: 4 }, children: E && /* @__PURE__ */ n("div", { children: [
374
+ /* @__PURE__ */ n("p", { children: [
368
375
  "Session ID: ",
369
376
  o?.sessionId || "No session created"
370
377
  ] }),
371
- /* @__PURE__ */ m("p", { children: [
378
+ /* @__PURE__ */ n("p", { children: [
372
379
  "Replica ID: ",
373
380
  p || "No replica created"
374
381
  ] }),
375
- /* @__PURE__ */ m("p", { children: [
382
+ /* @__PURE__ */ n("p", { children: [
376
383
  "Source Entity ID:",
377
384
  " ",
378
385
  o?.sourceEntityId || "No source entity"
379
386
  ] }),
380
- /* @__PURE__ */ m("p", { children: [
387
+ /* @__PURE__ */ n("p", { children: [
381
388
  "JSON Schema $id:",
382
389
  " ",
383
390
  o?.gridJsonSchema$Id || "No schema attached to session"
384
391
  ] }),
385
- /* @__PURE__ */ m("p", { children: [
392
+ /* @__PURE__ */ n("p", { children: [
386
393
  "Presigned URL:",
387
394
  " ",
388
395
  c ? c.substring(0, 30) + (c.length > 30 ? " ... " + c.substring(c.length - 10) : "") : "No URL generated"
389
396
  ] }),
390
- /* @__PURE__ */ m("p", { children: [
397
+ /* @__PURE__ */ n("p", { children: [
391
398
  "WebSocket Status:",
392
399
  " ",
393
- /* @__PURE__ */ t("span", { style: { color: n ? "green" : "red" }, children: $ })
394
- ] })
400
+ /* @__PURE__ */ t("span", { style: { color: m ? "green" : "red" }, children: K })
401
+ ] }),
402
+ /* @__PURE__ */ t("p", { children: (() => {
403
+ const i = k.filter(
404
+ (r) => r.isConnected
405
+ );
406
+ return /* @__PURE__ */ n(T, { children: [
407
+ "Connected Replicas (",
408
+ i.length,
409
+ " /",
410
+ " ",
411
+ k.length,
412
+ " total):",
413
+ " ",
414
+ i.length === 0 ? "none" : i.map((r, l) => /* @__PURE__ */ t(
415
+ ut,
416
+ {
417
+ title: /* @__PURE__ */ t("pre", { style: { margin: 0, fontSize: "11px" }, children: JSON.stringify(r, null, 2) }),
418
+ children: /* @__PURE__ */ n(
419
+ "span",
420
+ {
421
+ style: {
422
+ cursor: "pointer",
423
+ textDecoration: "underline dotted"
424
+ },
425
+ children: [
426
+ r.replicaId,
427
+ l < i.length - 1 ? ", " : ""
428
+ ]
429
+ }
430
+ )
431
+ },
432
+ r.replicaId
433
+ ))
434
+ ] });
435
+ })() })
395
436
  ] }) }),
396
- o && /* @__PURE__ */ m(z, { children: [
397
- !N && /* @__PURE__ */ m(s, { size: 12, children: [
437
+ o && /* @__PURE__ */ n(T, { children: [
438
+ !U && /* @__PURE__ */ n(s, { size: 12, children: [
398
439
  /* @__PURE__ */ t("h3", { children: "Setting up grid..." }),
399
- /* @__PURE__ */ m("div", { style: { marginBottom: "10px" }, children: [
440
+ /* @__PURE__ */ n("div", { style: { marginBottom: "10px" }, children: [
400
441
  !o && /* @__PURE__ */ t("p", { children: "Creating grid session..." }),
401
442
  o && !p && /* @__PURE__ */ t("p", { children: "Setting up real-time sync..." }),
402
443
  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 })
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 })
406
447
  ] })
407
448
  ] }),
408
- N && /* @__PURE__ */ m(z, { children: [
409
- /* @__PURE__ */ t(s, { size: 12, children: /* @__PURE__ */ m(
410
- lt,
449
+ U && /* @__PURE__ */ n(T, { children: [
450
+ /* @__PURE__ */ t(s, { size: 12, children: /* @__PURE__ */ n(
451
+ ht,
411
452
  {
412
453
  direction: "row",
413
454
  spacing: 1,
414
455
  sx: { justifyContent: "flex-end" },
415
456
  children: [
416
- Y,
417
- K,
457
+ X,
458
+ Z,
418
459
  /* @__PURE__ */ t(
419
- ot,
460
+ et,
420
461
  {
421
462
  variant: "outlined",
422
- onClick: () => v(!0),
423
- startIcon: /* @__PURE__ */ t(ut, {}),
463
+ onClick: () => w(!0),
464
+ startIcon: /* @__PURE__ */ t(It, {}),
424
465
  children: "Open chat"
425
466
  }
426
467
  ),
427
468
  /* @__PURE__ */ t(
428
- gt,
469
+ Rt,
429
470
  {
430
- agentRegistrationId: B,
431
- open: j,
432
- onClose: () => v(!1),
471
+ agentRegistrationId: A,
472
+ open: W,
473
+ onClose: () => w(!1),
433
474
  gridSessionId: o.sessionId,
434
475
  usersReplicaId: p,
435
476
  chatbotName: "Grid Assistant"
436
477
  }
437
478
  ),
438
479
  o.sourceEntityId && /* @__PURE__ */ t(
439
- rt,
480
+ nt,
440
481
  {
441
482
  sourceEntityId: o.sourceEntityId,
442
483
  gridSessionId: o.sessionId
443
484
  }
444
485
  ),
445
486
  o.sessionId && /* @__PURE__ */ t(
446
- it,
487
+ pt,
447
488
  {
448
489
  gridSessionId: o.sessionId,
449
490
  filename: "grid-" + (o.sourceEntityId || "export")
450
491
  }
451
492
  ),
452
493
  o.sourceEntityId && /* @__PURE__ */ t(
453
- mt,
494
+ st,
454
495
  {
455
496
  sourceEntityId: o.sourceEntityId,
456
497
  gridSessionId: o.sessionId
@@ -460,30 +501,30 @@ const Ye = st(
460
501
  }
461
502
  ) }),
462
503
  /* @__PURE__ */ t(s, { size: 12, children: /* @__PURE__ */ t(
463
- It,
504
+ Et,
464
505
  {
465
- gridRef: u,
466
- rowValues: f,
467
- columnNames: h?.columnNames ?? [],
468
- columnOrder: h?.columnOrder ?? [],
506
+ gridRef: h,
507
+ rowValues: g,
508
+ columnNames: f?.columnNames ?? [],
509
+ columnOrder: f?.columnOrder ?? [],
469
510
  schemaPropertiesInfo: b,
470
- entityIsView: _,
471
- jsonSchema: G,
472
- lastSelection: F,
473
- handleChange: Q,
474
- handleSelectionChange: X,
475
- onSelectedRowChange: tt
511
+ entityIsView: Y,
512
+ jsonSchema: v,
513
+ lastSelection: H,
514
+ handleChange: tt,
515
+ handleSelectionChange: ot,
516
+ onSelectedRowChange: rt
476
517
  }
477
518
  ) }),
478
519
  /* @__PURE__ */ t(s, { size: 12, children: /* @__PURE__ */ t(
479
- vt,
520
+ Ot,
480
521
  {
481
- selectedRowIndex: U.current,
482
- rowValues: f
522
+ selectedRowIndex: B.current,
523
+ rowValues: g
483
524
  }
484
525
  ) })
485
526
  ] }),
486
- R && /* @__PURE__ */ m(
527
+ E && /* @__PURE__ */ n(
487
528
  s,
488
529
  {
489
530
  size: 12,
@@ -496,7 +537,7 @@ const Ye = st(
496
537
  },
497
538
  children: [
498
539
  /* @__PURE__ */ t("h3", { children: "Model" }),
499
- i ? /* @__PURE__ */ t(St, { model: i }) : "No model available"
540
+ e ? /* @__PURE__ */ t(yt, { model: e }) : "No model available"
500
541
  ]
501
542
  }
502
543
  )
@@ -505,6 +546,6 @@ const Ye = st(
505
546
  }
506
547
  );
507
548
  export {
508
- Ye as default
549
+ on as default
509
550
  };
510
551
  //# sourceMappingURL=SynapseGrid.js.map