synapse-react-client 4.0.21 → 4.0.22

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 (99) hide show
  1. package/dist/SWC.index.d.ts +1 -0
  2. package/dist/SWC.index.d.ts.map +1 -1
  3. package/dist/SWC.index.js +2 -1
  4. package/dist/SWC.index.js.map +1 -1
  5. package/dist/components/CardContainer/CardContainer.d.ts.map +1 -1
  6. package/dist/components/CardContainer/CardContainer.js +43 -49
  7. package/dist/components/CardContainer/CardContainer.js.map +1 -1
  8. package/dist/components/CardContainerLogic/CardContainerLogic.d.ts +13 -0
  9. package/dist/components/CardContainerLogic/CardContainerLogic.d.ts.map +1 -1
  10. package/dist/components/CardContainerLogic/CardContainerLogic.js +64 -40
  11. package/dist/components/CardContainerLogic/CardContainerLogic.js.map +1 -1
  12. package/dist/components/ChallengeSubmission/ChallengeSubmissionStepper.js +1 -1
  13. package/dist/components/ChallengeSubmission/ChallengeSubmissionStepper.js.map +1 -1
  14. package/dist/components/DataExplorer/DataExplorer.css +1 -1
  15. package/dist/components/DataExplorer/DataExplorer.module.js +16 -16
  16. package/dist/components/DataExplorer/DataExplorer.module.js.map +1 -1
  17. package/dist/components/DataExplorer/DataExplorer.module.scss +0 -1
  18. package/dist/components/DataGrid/DataGrid.d.ts +1 -0
  19. package/dist/components/DataGrid/DataGrid.d.ts.map +1 -1
  20. package/dist/components/DataGrid/DataGrid.js +72 -72
  21. package/dist/components/DataGrid/DataGrid.js.map +1 -1
  22. package/dist/components/DataGrid/SynapseGrid.d.ts.map +1 -1
  23. package/dist/components/DataGrid/SynapseGrid.js +209 -206
  24. package/dist/components/DataGrid/SynapseGrid.js.map +1 -1
  25. package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.d.ts +2 -1
  26. package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.d.ts.map +1 -1
  27. package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.js +51 -42
  28. package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.js.map +1 -1
  29. package/dist/components/DataGrid/useDataGridWebsocket.d.ts.map +1 -1
  30. package/dist/components/DataGrid/useDataGridWebsocket.js +68 -67
  31. package/dist/components/DataGrid/useDataGridWebsocket.js.map +1 -1
  32. package/dist/components/DataGrid/utils/columnFactory.d.ts +1 -0
  33. package/dist/components/DataGrid/utils/columnFactory.d.ts.map +1 -1
  34. package/dist/components/DataGrid/utils/columnFactory.js +4 -3
  35. package/dist/components/DataGrid/utils/columnFactory.js.map +1 -1
  36. package/dist/components/DataGrid/utils/modelColsToGrid.d.ts +1 -1
  37. package/dist/components/DataGrid/utils/modelColsToGrid.d.ts.map +1 -1
  38. package/dist/components/DataGrid/utils/modelColsToGrid.js +15 -14
  39. package/dist/components/DataGrid/utils/modelColsToGrid.js.map +1 -1
  40. package/dist/components/DataGrid/utils/normalizeWebsocketError.d.ts +7 -0
  41. package/dist/components/DataGrid/utils/normalizeWebsocketError.d.ts.map +1 -0
  42. package/dist/components/DataGrid/utils/normalizeWebsocketError.js +8 -0
  43. package/dist/components/DataGrid/utils/normalizeWebsocketError.js.map +1 -0
  44. package/dist/components/Goals/Goals.d.ts +8 -0
  45. package/dist/components/Goals/Goals.d.ts.map +1 -1
  46. package/dist/components/Goals/Goals.js +54 -40
  47. package/dist/components/Goals/Goals.js.map +1 -1
  48. package/dist/components/ProjectVisibilityChip/ProjectVisibilityChip.d.ts +9 -0
  49. package/dist/components/ProjectVisibilityChip/ProjectVisibilityChip.d.ts.map +1 -0
  50. package/dist/components/ProjectVisibilityChip/ProjectVisibilityChip.js +69 -0
  51. package/dist/components/ProjectVisibilityChip/ProjectVisibilityChip.js.map +1 -0
  52. package/dist/components/ProjectVisibilityChip/getProjectVisibilityFromACL.d.ts +13 -0
  53. package/dist/components/ProjectVisibilityChip/getProjectVisibilityFromACL.d.ts.map +1 -0
  54. package/dist/components/ProjectVisibilityChip/getProjectVisibilityFromACL.js +11 -0
  55. package/dist/components/ProjectVisibilityChip/getProjectVisibilityFromACL.js.map +1 -0
  56. package/dist/components/ProjectVisibilityChip/index.d.ts +5 -0
  57. package/dist/components/ProjectVisibilityChip/index.d.ts.map +1 -0
  58. package/dist/components/ProjectVisibilityChip/index.js +7 -0
  59. package/dist/components/ProjectVisibilityChip/index.js.map +1 -0
  60. package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.d.ts.map +1 -1
  61. package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js +1 -1
  62. package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js.map +1 -1
  63. package/dist/components/QueryWrapperPlotNav/RowSetView.d.ts.map +1 -1
  64. package/dist/components/QueryWrapperPlotNav/RowSetView.js +9 -12
  65. package/dist/components/QueryWrapperPlotNav/RowSetView.js.map +1 -1
  66. package/dist/components/RssFeedCards/RssFeedCards.d.ts +7 -15
  67. package/dist/components/RssFeedCards/RssFeedCards.d.ts.map +1 -1
  68. package/dist/components/RssFeedCards/RssFeedCards.js +114 -123
  69. package/dist/components/RssFeedCards/RssFeedCards.js.map +1 -1
  70. package/dist/components/UserCardList/UserCardList.d.ts +2 -20
  71. package/dist/components/UserCardList/UserCardList.d.ts.map +1 -1
  72. package/dist/components/UserCardList/UserCardList.js +49 -72
  73. package/dist/components/UserCardList/UserCardList.js.map +1 -1
  74. package/dist/components/UserCardList/UserCardListRotate.d.ts +13 -0
  75. package/dist/components/UserCardList/UserCardListRotate.d.ts.map +1 -1
  76. package/dist/components/UserCardList/UserCardListRotate.js +82 -57
  77. package/dist/components/UserCardList/UserCardListRotate.js.map +1 -1
  78. package/dist/style/abstracts/_cssVariables.scss +1 -0
  79. package/dist/style/main.css +1 -1
  80. package/dist/synapse-queries/KeyFactory.d.ts +1 -0
  81. package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
  82. package/dist/synapse-queries/KeyFactory.js +3 -0
  83. package/dist/synapse-queries/KeyFactory.js.map +1 -1
  84. package/dist/synapse-queries/index.js +46 -44
  85. package/dist/synapse-queries/user/index.js +3 -3
  86. package/dist/synapse-queries/user/useUserBundle.d.ts +12 -0
  87. package/dist/synapse-queries/user/useUserBundle.d.ts.map +1 -1
  88. package/dist/synapse-queries/user/useUserBundle.js +50 -36
  89. package/dist/synapse-queries/user/useUserBundle.js.map +1 -1
  90. package/dist/tsconfig.build.tsbuildinfo +1 -1
  91. package/dist/utils/AppUtils/session/SessionInitializedGuard.d.ts +10 -5
  92. package/dist/utils/AppUtils/session/SessionInitializedGuard.d.ts.map +1 -1
  93. package/dist/utils/AppUtils/session/SessionInitializedGuard.js +13 -9
  94. package/dist/utils/AppUtils/session/SessionInitializedGuard.js.map +1 -1
  95. package/dist/utils/functions/SqlFunctions.d.ts +1 -1
  96. package/dist/utils/functions/SqlFunctions.d.ts.map +1 -1
  97. package/dist/utils/functions/SqlFunctions.js +1 -1
  98. package/dist/utils/functions/SqlFunctions.js.map +1 -1
  99. package/package.json +4 -4
@@ -27,177 +27,179 @@ import { useGridReplicaUsers as ye } from "./hooks/useGridReplicaUsers.js";
27
27
  import { useRemoteSelections as be } from "./hooks/useRemoteSelections.js";
28
28
  import { enrichRowsWithChangeInfo as xe } from "./utils/enrichRowsWithChangeInfo.js";
29
29
  import { ValidationAlert as Se } from "./components/ValidationAlert.js";
30
- import { useEffect as Ce, useImperativeHandle as we, useRef as i, useState as a } from "react";
31
- import { Box as Te, Stack as Ee, Tooltip as De, Typography as Oe } from "@mui/material";
32
- import { Fragment as ke, jsx as o, jsxs as s } from "react/jsx-runtime";
33
- import { useErrorHandler as Ae } from "react-error-boundary";
34
- import { SmartToyTwoTone as je } from "@mui/icons-material";
35
- import c from "@mui/material/Grid";
36
- import { c as Me } from "react/compiler-runtime";
37
- import { ClickableJsonCrdt as Ne } from "clickable-json";
30
+ import { useEffect as Ce, useImperativeHandle as we, useRef as Te, useState as Ee } from "react";
31
+ import { Box as De, Stack as Oe, Tooltip as ke, Typography as Ae } from "@mui/material";
32
+ import { Fragment as je, jsx as i, jsxs as a } from "react/jsx-runtime";
33
+ import { useErrorHandler as Me } from "react-error-boundary";
34
+ import { SmartToyTwoTone as Ne } from "@mui/icons-material";
35
+ import o from "@mui/material/Grid";
36
+ import { c as Pe } from "react/compiler-runtime";
37
+ import { ClickableJsonCrdt as Fe } from "clickable-json";
38
38
  //#region src/components/DataGrid/SynapseGrid.tsx
39
- function l(e) {
40
- let l = Me(103), { agentRegistrationId: u, showDebugInfo: Fe, ref: Ie } = e, d = Fe === void 0 ? !1 : Fe, [f, Le] = a(null), [p, Re] = a(null), [ze, Be] = a(!1), [Ve, He] = a(null), m = i(null), h = i(null), { data: Ue, isLoading: We } = r(), { data: Ge, refetch: Ke } = re(f?.sessionId), qe;
41
- l[0] === Ge ? qe = l[1] : (qe = Ge === void 0 ? [] : Ge, l[0] = Ge, l[1] = qe);
42
- let g = qe, Je;
43
- l[2] === Ke ? Je = l[3] : (Je = () => {
44
- Ke();
45
- }, l[2] = Ke, l[3] = Je);
46
- let _ = Je, Ye = ye(g, p, Ue?.userId == null ? void 0 : String(Ue.userId)), Xe, v;
47
- l[4] === Symbol.for("react.memo_cache_sentinel") ? (Xe = () => ({
39
+ function s(e) {
40
+ let s = Pe(107), { agentRegistrationId: c, showDebugInfo: Le, ref: Re } = e, l = Le === void 0 ? !1 : Le, [u, ze] = Ee(null), [d, Be] = Ee(null), [Ve, He] = Ee(!1), [Ue, We] = Ee(null), f = Te(null), p = Te(null), { data: Ge, isLoading: Ke } = r(), { data: m, refetch: qe } = re(u?.sessionId), h;
41
+ s[0] === m ? h = s[1] : (h = m === void 0 ? [] : m, s[0] = m, s[1] = h);
42
+ let g = h, _;
43
+ s[2] === qe ? _ = s[3] : (_ = () => {
44
+ qe();
45
+ }, s[2] = qe, s[3] = _);
46
+ let v = _, Je = ye(g, d, Ge?.userId == null ? void 0 : String(Ge.userId)), y, b;
47
+ s[4] === Symbol.for("react.memo_cache_sentinel") ? (y = () => ({
48
48
  initializeGrid: (e) => {
49
- m.current && m.current.handleStartSession(e);
49
+ f.current && f.current.handleStartSession(e);
50
50
  },
51
51
  loadExistingSession: (e) => {
52
- m.current && m.current.handleLoadSession(e);
52
+ f.current && f.current.handleLoadSession(e);
53
53
  }
54
- }), v = [], l[4] = Xe, l[5] = v) : (Xe = l[4], v = l[5]), we(Ie, Xe, v);
55
- let y;
56
- l[6] === _ ? y = l[7] : (y = {
57
- onGridReady: _,
58
- onReplicaConnected: _,
59
- onReplicaDisconnected: _
60
- }, l[6] = _, l[7] = y);
61
- let { isConnected: b, websocketInstance: x, hasCompletedInitialSync: S, isSyncing: Ze, model: C, modelSnapshot: w, connect: T, presignedUrl: E, hasSufficientData: D, websocketError: Qe } = ge(y);
62
- Ae(Qe);
63
- let $e = i(null), O, k;
64
- l[8] === x ? (O = l[9], k = l[10]) : (O = () => {
65
- $e.current = x;
66
- }, k = [x], l[8] = x, l[9] = O, l[10] = k), Ce(O, k);
67
- let et = i(null), A;
68
- l[11] !== T || l[12] !== p || l[13] !== f ? (A = () => {
69
- if (p == null || !f?.sessionId) {
70
- et.current = null;
54
+ }), b = [], s[4] = y, s[5] = b) : (y = s[4], b = s[5]), we(Re, y, b);
55
+ let x;
56
+ s[6] === v ? x = s[7] : (x = {
57
+ onGridReady: v,
58
+ onReplicaConnected: v,
59
+ onReplicaDisconnected: v
60
+ }, s[6] = v, s[7] = x);
61
+ let { isConnected: S, websocketInstance: C, hasCompletedInitialSync: w, isSyncing: Ye, model: T, modelSnapshot: E, connect: D, presignedUrl: O, hasSufficientData: k, websocketError: Xe } = ge(x);
62
+ Me(Xe);
63
+ let Ze = Te(null), A, j;
64
+ s[8] === C ? (A = s[9], j = s[10]) : (A = () => {
65
+ Ze.current = C;
66
+ }, j = [C], s[8] = C, s[9] = A, s[10] = j), Ce(A, j);
67
+ let Qe = Te(null), M;
68
+ s[11] !== D || s[12] !== d || s[13] !== u ? (M = () => {
69
+ if (d == null || !u?.sessionId) {
70
+ Qe.current = null;
71
71
  return;
72
72
  }
73
73
  let e = {
74
- replicaId: p,
75
- sessionId: f.sessionId
76
- }, t = et.current;
77
- t && t.replicaId === e.replicaId && t.sessionId === e.sessionId || (et.current = e, T(p, f.sessionId));
78
- }, l[11] = T, l[12] = p, l[13] = f, l[14] = A) : A = l[14];
79
- let tt = f?.sessionId, j;
80
- l[15] !== T || l[16] !== p || l[17] !== tt ? (j = [
81
- p,
82
- tt,
83
- T
84
- ], l[15] = T, l[16] = p, l[17] = tt, l[18] = j) : j = l[18], Ce(A, j);
85
- let M, N;
86
- l[19] === C ? (M = l[20], N = l[21]) : (M = () => {
87
- C === null && (He(null), h.current && h.current.setActiveCell(null));
88
- }, N = [C], l[19] = C, l[20] = M, l[21] = N), Ce(M, N);
89
- let P = se(f), nt = !!f?.sourceEntityId, F;
90
- l[22] === nt ? F = l[23] : (F = { enabled: nt }, l[22] = nt, l[23] = F);
91
- let { data: rt } = n(f?.sourceEntityId, void 0, F), it = rt?.concreteType === "org.sagebionetworks.repo.model.table.EntityView", at = P ?? null, I;
92
- l[24] === at ? I = l[25] : (I = ne(at), l[24] = at, l[25] = I);
93
- let L = I, ot = b ? "Connected" : "Disconnected", st = be(w, C, g, p), R;
94
- l[26] !== C || l[27] !== w ? (R = w ? de(C, w) : [], l[26] = C, l[27] = w, l[28] = R) : R = l[28];
95
- let z = R, B;
96
- l[29] !== C || l[30] !== w || l[31] !== Ye || l[32] !== z ? (B = xe(z, C, w, Ye), l[29] = C, l[30] = w, l[31] = Ye, l[32] = z, l[33] = B) : B = l[33];
97
- let ct = B, V;
98
- l[34] === b ? V = l[35] : (V = () => {
99
- !b || !$e.current || $e.current.sendPatch();
100
- }, l[34] = b, l[35] = V);
101
- let H = V, U, W;
102
- l[36] !== H || l[37] !== b ? (U = () => {
103
- b && H();
104
- }, W = [b, H], l[36] = H, l[37] = b, l[38] = U, l[39] = W) : (U = l[38], W = l[39]), Ce(U, W);
105
- let G;
106
- l[40] !== H || l[41] !== L ? (G = (e, t) => {
74
+ replicaId: d,
75
+ sessionId: u.sessionId
76
+ }, t = Qe.current;
77
+ t && t.replicaId === e.replicaId && t.sessionId === e.sessionId || (Qe.current = e, D(d, u.sessionId));
78
+ }, s[11] = D, s[12] = d, s[13] = u, s[14] = M) : M = s[14];
79
+ let $e = u?.sessionId, N;
80
+ s[15] !== D || s[16] !== d || s[17] !== $e ? (N = [
81
+ d,
82
+ $e,
83
+ D
84
+ ], s[15] = D, s[16] = d, s[17] = $e, s[18] = N) : N = s[18], Ce(M, N);
85
+ let P, F;
86
+ s[19] === T ? (P = s[20], F = s[21]) : (P = () => {
87
+ T === null && (We(null), p.current && p.current.setActiveCell(null));
88
+ }, F = [T], s[19] = T, s[20] = P, s[21] = F), Ce(P, F);
89
+ let et = se(u), tt = !!u?.sourceEntityId, I;
90
+ s[22] === tt ? I = s[23] : (I = { enabled: tt }, s[22] = tt, s[23] = I);
91
+ let { data: L } = n(u?.sourceEntityId, void 0, I), R = L?.concreteType === "org.sagebionetworks.repo.model.table.EntityView", z;
92
+ s[24] !== L || s[25] !== R ? (z = R ? [] : L?.upsertKey, s[24] = L, s[25] = R, s[26] = z) : z = s[26];
93
+ let nt = z, rt = et ?? null, B;
94
+ s[27] === rt ? B = s[28] : (B = ne(rt), s[27] = rt, s[28] = B);
95
+ let V = B, it = S ? "Connected" : "Disconnected", at = be(E, T, g, d), H;
96
+ s[29] !== T || s[30] !== E ? (H = E ? de(T, E) : [], s[29] = T, s[30] = E, s[31] = H) : H = s[31];
97
+ let U = H, W;
98
+ s[32] !== T || s[33] !== E || s[34] !== Je || s[35] !== U ? (W = xe(U, T, E, Je), s[32] = T, s[33] = E, s[34] = Je, s[35] = U, s[36] = W) : W = s[36];
99
+ let ot = W, G;
100
+ s[37] === S ? G = s[38] : (G = () => {
101
+ !S || !Ze.current || Ze.current.sendPatch();
102
+ }, s[37] = S, s[38] = G);
103
+ let K = G, st, ct;
104
+ s[39] !== K || s[40] !== S ? (st = () => {
105
+ S && K();
106
+ }, ct = [S, K], s[39] = K, s[40] = S, s[41] = st, s[42] = ct) : (st = s[41], ct = s[42]), Ce(st, ct);
107
+ let lt;
108
+ s[43] !== K || s[44] !== V ? (lt = (e, t) => {
107
109
  t.forEach((t) => {
108
- _e(e, t, L);
109
- }), H();
110
- }, l[40] = H, l[41] = L, l[42] = G) : G = l[42];
111
- let K = G, q;
112
- l[43] !== K || l[44] !== C ? (q = (e) => {
113
- if (!C) {
110
+ _e(e, t, V);
111
+ }), K();
112
+ }, s[43] = K, s[44] = V, s[45] = lt) : lt = s[45];
113
+ let q = lt, J;
114
+ s[46] !== q || s[47] !== T ? (J = (e) => {
115
+ if (!T) {
114
116
  console.error("Model is not initialized");
115
117
  return;
116
118
  }
117
- e.type === "DELETE" && h.current && h.current.setActiveCell(null), K(C, [e]);
118
- }, l[43] = K, l[44] = C, l[45] = q) : q = l[45];
119
- let { undoUI: lt, redoUI: ut, addOperationsToUndoStack: dt, clearRedoStack: ft } = me(q), J;
120
- l[46] !== dt || l[47] !== K || l[48] !== ft || l[49] !== C || l[50] !== z ? (J = (e, t) => {
121
- if (!C) {
119
+ e.type === "DELETE" && p.current && p.current.setActiveCell(null), q(T, [e]);
120
+ }, s[46] = q, s[47] = T, s[48] = J) : J = s[48];
121
+ let { undoUI: ut, redoUI: dt, addOperationsToUndoStack: ft, clearRedoStack: pt } = me(J), mt;
122
+ s[49] !== ft || s[50] !== q || s[51] !== pt || s[52] !== T || s[53] !== U ? (mt = (e, t) => {
123
+ if (!T) {
122
124
  console.error("Model is not initialized");
123
125
  return;
124
126
  }
125
- t = ue(e, z, t), t.length > 0 && (ft(), dt(t, z, e), K(C, ve(t, e)));
126
- }, l[46] = dt, l[47] = K, l[48] = ft, l[49] = C, l[50] = z, l[51] = J) : J = l[51];
127
- let pt = J, Y;
128
- l[52] !== K || l[53] !== C || l[54] !== p ? (Y = (e) => {
127
+ t = ue(e, U, t), t.length > 0 && (pt(), ft(t, U, e), q(T, ve(t, e)));
128
+ }, s[49] = ft, s[50] = q, s[51] = pt, s[52] = T, s[53] = U, s[54] = mt) : mt = s[54];
129
+ let ht = mt, gt;
130
+ s[55] !== q || s[56] !== T || s[57] !== d ? (gt = (e) => {
129
131
  let { selection: t } = e;
130
- if (t != null && (He(t), C != null && p != null)) {
131
- let e = le(t, C);
132
- K(C, [{
132
+ if (t != null && (We(t), T != null && d != null)) {
133
+ let e = le(t, T);
134
+ q(T, [{
133
135
  type: "SET_SELECTION",
134
- replicaId: p.toString(),
136
+ replicaId: d.toString(),
135
137
  selection: e
136
138
  }]);
137
139
  }
138
- }, l[52] = K, l[53] = C, l[54] = p, l[55] = Y) : Y = l[55];
139
- let mt = Y, ht;
140
- l[56] === Symbol.for("react.memo_cache_sentinel") ? (ht = (e, t) => {
141
- h.current?.setActiveCell({
140
+ }, s[55] = q, s[56] = T, s[57] = d, s[58] = gt) : gt = s[58];
141
+ let _t = gt, vt;
142
+ s[59] === Symbol.for("react.memo_cache_sentinel") ? (vt = (e, t) => {
143
+ p.current?.setActiveCell({
142
144
  col: t,
143
145
  row: e
144
146
  });
145
- }, l[56] = ht) : ht = l[56];
146
- let gt = ht;
147
- if (!We && !Ue?.isCertified) {
147
+ }, s[59] = vt) : vt = s[59];
148
+ let yt = vt;
149
+ if (!Ke && !Ge?.isCertified) {
148
150
  let e;
149
- return l[57] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ o(te, {}), l[57] = e) : e = l[57], e;
151
+ return s[60] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ i(te, {}), s[60] = e) : e = s[60], e;
150
152
  }
151
- let _t;
152
- l[58] === Symbol.for("react.memo_cache_sentinel") ? (_t = {
153
+ let bt;
154
+ s[61] === Symbol.for("react.memo_cache_sentinel") ? (bt = {
153
155
  xs: 12,
154
156
  xl: 8
155
- }, l[58] = _t) : _t = l[58];
156
- let X;
157
- l[59] === d ? X = l[60] : (X = /* @__PURE__ */ o(c, {
158
- size: _t,
159
- children: /* @__PURE__ */ o(he, {
160
- ref: m,
161
- onSessionChange: Le,
162
- onReplicaChange: Re,
163
- show: d
157
+ }, s[61] = bt) : bt = s[61];
158
+ let Y;
159
+ s[62] === l ? Y = s[63] : (Y = /* @__PURE__ */ i(o, {
160
+ size: bt,
161
+ children: /* @__PURE__ */ i(he, {
162
+ ref: f,
163
+ onSessionChange: ze,
164
+ onReplicaChange: Be,
165
+ show: l
164
166
  })
165
- }), l[59] = d, l[60] = X);
166
- let vt;
167
- l[61] === Symbol.for("react.memo_cache_sentinel") ? (vt = {
167
+ }), s[62] = l, s[63] = Y);
168
+ let xt;
169
+ s[64] === Symbol.for("react.memo_cache_sentinel") ? (xt = {
168
170
  xs: 12,
169
171
  xl: 4
170
- }, l[61] = vt) : vt = l[61];
171
- let Z;
172
- l[62] !== ot || l[63] !== b || l[64] !== E || l[65] !== p || l[66] !== g || l[67] !== f?.gridJsonSchema$Id || l[68] !== f?.sessionId || l[69] !== f?.sourceEntityId || l[70] !== d ? (Z = d && /* @__PURE__ */ s("div", { children: [
173
- /* @__PURE__ */ s("p", { children: ["Session ID: ", f?.sessionId || "No session created"] }),
174
- /* @__PURE__ */ s("p", { children: ["Replica ID: ", p || "No replica created"] }),
175
- /* @__PURE__ */ s("p", { children: [
172
+ }, s[64] = xt) : xt = s[64];
173
+ let X;
174
+ s[65] !== it || s[66] !== S || s[67] !== O || s[68] !== d || s[69] !== g || s[70] !== u?.gridJsonSchema$Id || s[71] !== u?.sessionId || s[72] !== u?.sourceEntityId || s[73] !== l ? (X = l && /* @__PURE__ */ a("div", { children: [
175
+ /* @__PURE__ */ a("p", { children: ["Session ID: ", u?.sessionId || "No session created"] }),
176
+ /* @__PURE__ */ a("p", { children: ["Replica ID: ", d || "No replica created"] }),
177
+ /* @__PURE__ */ a("p", { children: [
176
178
  "Source Entity ID:",
177
179
  " ",
178
- f?.sourceEntityId || "No source entity"
180
+ u?.sourceEntityId || "No source entity"
179
181
  ] }),
180
- /* @__PURE__ */ s("p", { children: [
182
+ /* @__PURE__ */ a("p", { children: [
181
183
  "JSON Schema $id:",
182
184
  " ",
183
- f?.gridJsonSchema$Id || "No schema attached to session"
185
+ u?.gridJsonSchema$Id || "No schema attached to session"
184
186
  ] }),
185
- /* @__PURE__ */ s("p", { children: [
187
+ /* @__PURE__ */ a("p", { children: [
186
188
  "Presigned URL:",
187
189
  " ",
188
- E ? E.substring(0, 30) + (E.length > 30 ? " ... " + E.substring(E.length - 10) : "") : "No URL generated"
190
+ O ? O.substring(0, 30) + (O.length > 30 ? " ... " + O.substring(O.length - 10) : "") : "No URL generated"
189
191
  ] }),
190
- /* @__PURE__ */ s("p", { children: [
192
+ /* @__PURE__ */ a("p", { children: [
191
193
  "WebSocket Status:",
192
194
  " ",
193
- /* @__PURE__ */ o("span", {
194
- style: { color: b ? "green" : "red" },
195
- children: ot
195
+ /* @__PURE__ */ i("span", {
196
+ style: { color: S ? "green" : "red" },
197
+ children: it
196
198
  })
197
199
  ] }),
198
- /* @__PURE__ */ o("p", { children: (() => {
199
- let e = g.filter(Pe);
200
- return /* @__PURE__ */ s(ke, { children: [
200
+ /* @__PURE__ */ i("p", { children: (() => {
201
+ let e = g.filter(Ie);
202
+ return /* @__PURE__ */ a(je, { children: [
201
203
  "Connected Replicas (",
202
204
  e.length,
203
205
  " /",
@@ -205,15 +207,15 @@ function l(e) {
205
207
  g.length,
206
208
  " total):",
207
209
  " ",
208
- e.length === 0 ? "none" : e.map((t, n) => /* @__PURE__ */ o(De, {
209
- title: /* @__PURE__ */ o("pre", {
210
+ e.length === 0 ? "none" : e.map((t, n) => /* @__PURE__ */ i(ke, {
211
+ title: /* @__PURE__ */ i("pre", {
210
212
  style: {
211
213
  margin: 0,
212
214
  fontSize: "11px"
213
215
  },
214
216
  children: JSON.stringify(t, null, 2)
215
217
  }),
216
- children: /* @__PURE__ */ s("span", {
218
+ children: /* @__PURE__ */ a("span", {
217
219
  style: {
218
220
  cursor: "pointer",
219
221
  textDecoration: "underline dotted"
@@ -223,114 +225,115 @@ function l(e) {
223
225
  }, t.replicaId))
224
226
  ] });
225
227
  })() })
226
- ] }), l[62] = ot, l[63] = b, l[64] = E, l[65] = p, l[66] = g, l[67] = f?.gridJsonSchema$Id, l[68] = f?.sessionId, l[69] = f?.sourceEntityId, l[70] = d, l[71] = Z) : Z = l[71];
228
+ ] }), s[65] = it, s[66] = S, s[67] = O, s[68] = d, s[69] = g, s[70] = u?.gridJsonSchema$Id, s[71] = u?.sessionId, s[72] = u?.sourceEntityId, s[73] = l, s[74] = X) : X = s[74];
229
+ let Z;
230
+ s[75] === X ? Z = s[76] : (Z = /* @__PURE__ */ i(o, {
231
+ size: xt,
232
+ children: X
233
+ }), s[75] = X, s[76] = Z);
227
234
  let Q;
228
- l[72] === Z ? Q = l[73] : (Q = /* @__PURE__ */ o(c, {
229
- size: vt,
230
- children: Z
231
- }), l[72] = Z, l[73] = Q);
232
- let $;
233
- l[74] !== u || l[75] !== ze || l[76] !== ct || l[77] !== it || l[78] !== pt || l[79] !== mt || l[80] !== S || l[81] !== D || l[82] !== b || l[83] !== Ze || l[84] !== P || l[85] !== Ve || l[86] !== C || l[87] !== w?.columnNames || l[88] !== w?.columnOrder || l[89] !== E || l[90] !== ut || l[91] !== st || l[92] !== p || l[93] !== z || l[94] !== L || l[95] !== f || l[96] !== d || l[97] !== lt ? ($ = f && /* @__PURE__ */ s(ke, { children: [
234
- !D && /* @__PURE__ */ s(c, {
235
+ s[77] !== c || s[78] !== Ve || s[79] !== ot || s[80] !== R || s[81] !== ht || s[82] !== _t || s[83] !== w || s[84] !== k || s[85] !== S || s[86] !== Ye || s[87] !== et || s[88] !== Ue || s[89] !== T || s[90] !== E?.columnNames || s[91] !== E?.columnOrder || s[92] !== O || s[93] !== dt || s[94] !== at || s[95] !== d || s[96] !== U || s[97] !== V || s[98] !== u || s[99] !== l || s[100] !== ut || s[101] !== nt ? (Q = u && /* @__PURE__ */ a(je, { children: [
236
+ !k && /* @__PURE__ */ a(o, {
235
237
  size: 12,
236
- children: [/* @__PURE__ */ o("h3", { children: "Setting up grid..." }), /* @__PURE__ */ s("div", {
238
+ children: [/* @__PURE__ */ i("h3", { children: "Setting up grid..." }), /* @__PURE__ */ a("div", {
237
239
  style: { marginBottom: "10px" },
238
240
  children: [
239
- !f && /* @__PURE__ */ o("p", { children: "Creating grid session..." }),
240
- f && !p && /* @__PURE__ */ o("p", { children: "Setting up real-time sync..." }),
241
- f && p && !E && /* @__PURE__ */ o("p", { children: "Establishing secure connection..." }),
242
- f && p && E && !b && /* @__PURE__ */ o("p", { children: "Connecting to server..." }),
243
- b && !S && /* @__PURE__ */ o("p", { children: "Loading table data..." }),
244
- /* @__PURE__ */ o(ee, {
241
+ !u && /* @__PURE__ */ i("p", { children: "Creating grid session..." }),
242
+ u && !d && /* @__PURE__ */ i("p", { children: "Setting up real-time sync..." }),
243
+ u && d && !O && /* @__PURE__ */ i("p", { children: "Establishing secure connection..." }),
244
+ u && d && O && !S && /* @__PURE__ */ i("p", { children: "Connecting to server..." }),
245
+ S && !w && /* @__PURE__ */ i("p", { children: "Loading table data..." }),
246
+ /* @__PURE__ */ i(ee, {
245
247
  numRows: 4,
246
248
  numCols: 1
247
249
  })
248
250
  ]
249
251
  })]
250
252
  }),
251
- D && /* @__PURE__ */ s(ke, { children: [
252
- /* @__PURE__ */ o(c, {
253
+ k && /* @__PURE__ */ a(je, { children: [
254
+ /* @__PURE__ */ i(o, {
253
255
  size: 12,
254
- children: /* @__PURE__ */ o(Se, {
255
- rowValues: z,
256
- columnNames: w?.columnNames ?? [],
257
- columnOrder: w?.columnOrder ?? [],
258
- onNavigateToCell: gt,
259
- isLoading: !S
256
+ children: /* @__PURE__ */ i(Se, {
257
+ rowValues: U,
258
+ columnNames: E?.columnNames ?? [],
259
+ columnOrder: E?.columnOrder ?? [],
260
+ onNavigateToCell: yt,
261
+ isLoading: !w
260
262
  })
261
263
  }),
262
- /* @__PURE__ */ o(c, {
264
+ /* @__PURE__ */ i(o, {
263
265
  size: 12,
264
- children: /* @__PURE__ */ s(Ee, {
266
+ children: /* @__PURE__ */ a(Oe, {
265
267
  direction: "row",
266
268
  spacing: 1,
267
269
  sx: { justifyContent: "flex-end" },
268
270
  children: [
269
- (!S || Ze) && /* @__PURE__ */ s(Te, {
271
+ (!w || Ye) && /* @__PURE__ */ a(De, {
270
272
  sx: {
271
273
  display: "flex",
272
274
  alignItems: "center",
273
275
  gap: 1,
274
276
  mr: "auto"
275
277
  },
276
- children: [/* @__PURE__ */ o(t, {
278
+ children: [/* @__PURE__ */ i(t, {
277
279
  size: 16,
278
280
  margin: "0"
279
- }), /* @__PURE__ */ o(Oe, {
281
+ }), /* @__PURE__ */ i(Ae, {
280
282
  variant: "caption",
281
283
  color: "text.secondary",
282
- children: S ? "Syncing…" : "Loading…"
284
+ children: w ? "Syncing…" : "Loading…"
283
285
  })]
284
286
  }),
285
- lt,
286
287
  ut,
287
- /* @__PURE__ */ o(ie, {
288
+ dt,
289
+ /* @__PURE__ */ i(ie, {
288
290
  variant: "outlined",
289
- onClick: () => Be(!0),
290
- startIcon: /* @__PURE__ */ o(je, {}),
291
+ onClick: () => He(!0),
292
+ startIcon: /* @__PURE__ */ i(Ne, {}),
291
293
  children: "Open Curie"
292
294
  }),
293
- /* @__PURE__ */ o(fe, {
294
- agentRegistrationId: u,
295
- open: ze,
296
- onClose: () => Be(!1),
297
- gridSessionId: f.sessionId,
298
- usersReplicaId: p,
295
+ /* @__PURE__ */ i(fe, {
296
+ agentRegistrationId: c,
297
+ open: Ve,
298
+ onClose: () => He(!1),
299
+ gridSessionId: u.sessionId,
300
+ usersReplicaId: d,
299
301
  chatbotName: "Curie"
300
302
  }),
301
- f.sourceEntityId && /* @__PURE__ */ o(ae, {
302
- sourceEntityId: f.sourceEntityId,
303
- gridSessionId: f.sessionId
303
+ u.sourceEntityId && /* @__PURE__ */ i(ae, {
304
+ sourceEntityId: u.sourceEntityId,
305
+ gridSessionId: u.sessionId
304
306
  }),
305
- f.sessionId && /* @__PURE__ */ o(oe, {
306
- gridSessionId: f.sessionId,
307
- filename: "grid-" + (f.sourceEntityId || "export")
307
+ u.sessionId && /* @__PURE__ */ i(oe, {
308
+ gridSessionId: u.sessionId,
309
+ filename: "grid-" + (u.sourceEntityId || "export")
308
310
  }),
309
- f.sourceEntityId && /* @__PURE__ */ o(ce, {
310
- sourceEntityId: f.sourceEntityId,
311
- gridSessionId: f.sessionId
311
+ u.sourceEntityId && /* @__PURE__ */ i(ce, {
312
+ sourceEntityId: u.sourceEntityId,
313
+ gridSessionId: u.sessionId
312
314
  })
313
315
  ]
314
316
  })
315
317
  }),
316
- /* @__PURE__ */ o(c, {
318
+ /* @__PURE__ */ i(o, {
317
319
  size: 12,
318
- children: /* @__PURE__ */ o(pe, {
319
- gridRef: h,
320
- rowValues: ct,
321
- columnNames: w?.columnNames ?? [],
322
- columnOrder: w?.columnOrder ?? [],
323
- schemaPropertiesInfo: L,
324
- entityIsView: it,
325
- jsonSchema: P,
326
- lastSelection: Ve,
327
- handleChange: pt,
328
- handleSelectionChange: mt,
329
- remoteSelections: st
320
+ children: /* @__PURE__ */ i(pe, {
321
+ gridRef: p,
322
+ rowValues: ot,
323
+ columnNames: E?.columnNames ?? [],
324
+ columnOrder: E?.columnOrder ?? [],
325
+ schemaPropertiesInfo: V,
326
+ entityIsView: R,
327
+ jsonSchema: et,
328
+ lastSelection: Ue,
329
+ handleChange: ht,
330
+ handleSelectionChange: _t,
331
+ remoteSelections: at,
332
+ upsertKey: nt
330
333
  })
331
334
  })
332
335
  ] }),
333
- d && /* @__PURE__ */ s(c, {
336
+ l && /* @__PURE__ */ a(o, {
334
337
  size: 12,
335
338
  style: {
336
339
  margin: "10px 0",
@@ -339,28 +342,28 @@ function l(e) {
339
342
  maxHeight: "400px",
340
343
  overflowY: "auto"
341
344
  },
342
- children: [/* @__PURE__ */ o("h3", { children: "Model" }), C ? /* @__PURE__ */ o(Ne, { model: C }) : "No model available"]
345
+ children: [/* @__PURE__ */ i("h3", { children: "Model" }), T ? /* @__PURE__ */ i(Fe, { model: T }) : "No model available"]
343
346
  })
344
- ] }), l[74] = u, l[75] = ze, l[76] = ct, l[77] = it, l[78] = pt, l[79] = mt, l[80] = S, l[81] = D, l[82] = b, l[83] = Ze, l[84] = P, l[85] = Ve, l[86] = C, l[87] = w?.columnNames, l[88] = w?.columnOrder, l[89] = E, l[90] = ut, l[91] = st, l[92] = p, l[93] = z, l[94] = L, l[95] = f, l[96] = d, l[97] = lt, l[98] = $) : $ = l[98];
345
- let yt;
346
- return l[99] !== X || l[100] !== Q || l[101] !== $ ? (yt = /* @__PURE__ */ o("div", { children: /* @__PURE__ */ s(c, {
347
+ ] }), s[77] = c, s[78] = Ve, s[79] = ot, s[80] = R, s[81] = ht, s[82] = _t, s[83] = w, s[84] = k, s[85] = S, s[86] = Ye, s[87] = et, s[88] = Ue, s[89] = T, s[90] = E?.columnNames, s[91] = E?.columnOrder, s[92] = O, s[93] = dt, s[94] = at, s[95] = d, s[96] = U, s[97] = V, s[98] = u, s[99] = l, s[100] = ut, s[101] = nt, s[102] = Q) : Q = s[102];
348
+ let $;
349
+ return s[103] !== Y || s[104] !== Z || s[105] !== Q ? ($ = /* @__PURE__ */ i("div", { children: /* @__PURE__ */ a(o, {
347
350
  container: !0,
348
351
  spacing: 2,
349
352
  children: [
350
- X,
351
- Q,
352
- $
353
+ Y,
354
+ Z,
355
+ Q
353
356
  ]
354
- }) }), l[99] = X, l[100] = Q, l[101] = $, l[102] = yt) : yt = l[102], yt;
357
+ }) }), s[103] = Y, s[104] = Z, s[105] = Q, s[106] = $) : $ = s[106], $;
355
358
  }
356
- function Pe(e) {
359
+ function Ie(e) {
357
360
  return e.isConnected;
358
361
  }
359
- function u(t) {
360
- let n = Me(2), r;
361
- return n[0] === t ? r = n[1] : (r = /* @__PURE__ */ o(e, { children: /* @__PURE__ */ o(l, { ...t }) }), n[0] = t, n[1] = r), r;
362
+ function c(t) {
363
+ let n = Pe(2), r;
364
+ return n[0] === t ? r = n[1] : (r = /* @__PURE__ */ i(e, { children: /* @__PURE__ */ i(s, { ...t }) }), n[0] = t, n[1] = r), r;
362
365
  }
363
366
  //#endregion
364
- export { u as default };
367
+ export { c as default };
365
368
 
366
369
  //# sourceMappingURL=SynapseGrid.js.map