@gen3/frontend 0.12.57 → 0.12.58
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.
- package/dist/dts/api/auth/sessionLogout.d.ts.map +1 -1
- package/dist/dts/api/auth/sessionLogout.js +16 -12
- package/dist/dts/api/auth/sessionLogout.js.map +1 -1
- package/dist/dts/api/auth/tests/sessionLogout.unit.test.js +18 -7
- package/dist/dts/api/auth/tests/sessionLogout.unit.test.js.map +1 -1
- package/dist/dts/server.d.ts +2 -1
- package/dist/dts/server.d.ts.map +1 -1
- package/dist/dts/server.js +2 -1
- package/dist/dts/server.js.map +1 -1
- package/dist/index/cjs/QueryPanel-Bw-xhntZ.js +43 -0
- package/dist/index/cjs/QueryPanel-Bw-xhntZ.js.map +1 -0
- package/dist/index/cjs/QueryPanel-CyPKyG13.js +43 -0
- package/dist/index/cjs/QueryPanel-CyPKyG13.js.map +1 -0
- package/dist/index/cjs/QueryPanel-v-n3iGjq.js +43 -0
- package/dist/index/cjs/QueryPanel-v-n3iGjq.js.map +1 -0
- package/dist/index/cjs/index-Bx2OoF3F.js +41847 -0
- package/dist/index/cjs/index-Bx2OoF3F.js.map +1 -0
- package/dist/index/cjs/index-CHR1uioW.js +41847 -0
- package/dist/index/cjs/index-CHR1uioW.js.map +1 -0
- package/dist/index/cjs/index-Cjc3XMjn.js +41847 -0
- package/dist/index/cjs/index-Cjc3XMjn.js.map +1 -0
- package/dist/index/cjs/index.js +1 -1
- package/dist/index/esm/QueryPanel-CBkgOEOs.js +37 -0
- package/dist/index/esm/QueryPanel-CBkgOEOs.js.map +1 -0
- package/dist/index/esm/QueryPanel-CULgIAVP.js +37 -0
- package/dist/index/esm/QueryPanel-CULgIAVP.js.map +1 -0
- package/dist/index/esm/QueryPanel-ic9Je2fM.js +37 -0
- package/dist/index/esm/QueryPanel-ic9Je2fM.js.map +1 -0
- package/dist/index/esm/index-0Uqgg63f.js +41560 -0
- package/dist/index/esm/index-0Uqgg63f.js.map +1 -0
- package/dist/index/esm/index-BzfVgdDd.js +41560 -0
- package/dist/index/esm/index-BzfVgdDd.js.map +1 -0
- package/dist/index/esm/index-OtmztDtU.js +41560 -0
- package/dist/index/esm/index-OtmztDtU.js.map +1 -0
- package/dist/index/esm/index.js +1 -1
- package/dist/server/cjs/server.js +67 -0
- package/dist/server/cjs/server.js.map +1 -1
- package/dist/server/esm/server.js +69 -3
- package/dist/server/esm/server.js.map +1 -1
- package/dist/server.d.ts +3 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionLogout.d.ts","sourceRoot":"","sources":["../../../../src/api/auth/sessionLogout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAK5D,yBAA+B,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"sessionLogout.d.ts","sourceRoot":"","sources":["../../../../src/api/auth/sessionLogout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAK5D,yBAA+B,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,eAAe,iBAoEvE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GEN3_FENCE_API } from '@gen3/core';
|
|
1
|
+
import { GEN3_FENCE_API, GEN3_FENCE_SERVICE } from '@gen3/core/server';
|
|
2
2
|
import { serialize } from 'cookie';
|
|
3
3
|
export default async function (req, res) {
|
|
4
4
|
if (req.method !== 'POST') {
|
|
@@ -6,29 +6,37 @@ export default async function (req, res) {
|
|
|
6
6
|
res.status(405).json({ error: 'Method not allowed' });
|
|
7
7
|
return;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
const FENCE_API = process.env.NODE_ENV === 'development'
|
|
10
|
+
? GEN3_FENCE_API
|
|
11
|
+
: GEN3_FENCE_SERVICE;
|
|
10
12
|
try {
|
|
11
13
|
const fenceCookies = [
|
|
12
14
|
req.cookies.fence && `fence=${encodeURIComponent(req.cookies.fence)}`,
|
|
13
15
|
req.cookies.access_token &&
|
|
14
16
|
`access_token=${encodeURIComponent(req.cookies.access_token)}`,
|
|
15
17
|
].filter((cookie) => Boolean(cookie));
|
|
16
|
-
const fenceResponse = await fetch(`${
|
|
18
|
+
const fenceResponse = await fetch(`${FENCE_API}/logout`, {
|
|
17
19
|
method: 'GET',
|
|
18
20
|
headers: {
|
|
19
|
-
'Content-Type': '
|
|
21
|
+
'Content-Type': 'text/html',
|
|
20
22
|
...(fenceCookies.length > 0 ? { Cookie: fenceCookies.join('; ') } : {}),
|
|
21
23
|
},
|
|
24
|
+
redirect: 'manual',
|
|
22
25
|
});
|
|
23
26
|
if (!fenceResponse.ok) {
|
|
24
|
-
|
|
27
|
+
console.warn(`Fence logout failed (${fenceResponse.status})`);
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
30
|
catch (error) {
|
|
28
|
-
|
|
31
|
+
// GEN3_FENCE_SERVICE is an internal, cluster-only URL. Some deployments
|
|
32
|
+
// (e.g. local dev, or a frontend that isn't network-adjacent to Fence)
|
|
33
|
+
// cannot reach it at all — that must not block logout, since the part
|
|
34
|
+
// that matters to this app is clearing its own cookies below.
|
|
35
|
+
console.warn('Unable to reach Fence to complete logout', error);
|
|
29
36
|
}
|
|
30
|
-
// Clear local authentication
|
|
31
|
-
//
|
|
37
|
+
// Clear local authentication regardless of whether Fence could be reached.
|
|
38
|
+
// This is what actually logs the user out of this app; telling Fence is
|
|
39
|
+
// best-effort on top of it.
|
|
32
40
|
res.setHeader('Set-Cookie', [
|
|
33
41
|
serialize('fence', '', {
|
|
34
42
|
sameSite: 'lax',
|
|
@@ -53,10 +61,6 @@ export default async function (req, res) {
|
|
|
53
61
|
expires: new Date(0),
|
|
54
62
|
}),
|
|
55
63
|
]);
|
|
56
|
-
if (logoutError) {
|
|
57
|
-
res.status(502).json({ error: 'Fence logout failed' });
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
64
|
res.status(200).json({ success: 'success' });
|
|
61
65
|
}
|
|
62
66
|
//# sourceMappingURL=sessionLogout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionLogout.js","sourceRoot":"","sources":["../../../../src/api/auth/sessionLogout.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"sessionLogout.js","sourceRoot":"","sources":["../../../../src/api/auth/sessionLogout.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,GAAmB,EAAE,GAAoB;IACtE,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;QAC1B,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC/B,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC,CAAC;QACtD,OAAO;IACT,CAAC;IAED,MAAM,SAAS,GACb,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa;QACpC,CAAC,CAAC,cAAc;QAChB,CAAC,CAAC,kBAAkB,CAAC;IAEzB,IAAI,CAAC;QACH,MAAM,YAAY,GAAG;YACnB,GAAG,CAAC,OAAO,CAAC,KAAK,IAAI,SAAS,kBAAkB,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACrE,GAAG,CAAC,OAAO,CAAC,YAAY;gBACtB,gBAAgB,kBAAkB,CAAC,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;SACjE,CAAC,MAAM,CAAC,CAAC,MAAM,EAAoB,EAAE,CAAC,OAAO,CAAC,MA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AAK;YACf,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY;YAC/C,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY;YAC7C,IAAI,EAAE,GAAG;YACT,OAAO,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC;SACrB,CAAC;KACH,CAAC,CAAC;IAEH,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import sessionLogout from '../sessionLogout';
|
|
2
|
-
jest.mock('@gen3/core', () => ({
|
|
3
|
-
|
|
2
|
+
jest.mock('@gen3/core/server', () => ({
|
|
3
|
+
GEN3_FENCE_SERVICE: 'https://fence.example.com',
|
|
4
4
|
}));
|
|
5
5
|
const makeResponse = () => {
|
|
6
6
|
const response = {
|
|
@@ -46,7 +46,7 @@ describe('sessionLogout API', () => {
|
|
|
46
46
|
]));
|
|
47
47
|
expect(response.status).toHaveBeenCalledWith(200);
|
|
48
48
|
});
|
|
49
|
-
it('still clears local cookies when Fence
|
|
49
|
+
it('still clears local cookies and succeeds when Fence responds with an error', async () => {
|
|
50
50
|
global.fetch = jest.fn().mockResolvedValue({ ok: false, status: 503 });
|
|
51
51
|
const request = {
|
|
52
52
|
method: 'POST',
|
|
@@ -56,10 +56,21 @@ describe('sessionLogout API', () => {
|
|
|
56
56
|
const response = makeResponse();
|
|
57
57
|
await sessionLogout(request, response);
|
|
58
58
|
expect(response.setHeader).toHaveBeenCalledWith('Set-Cookie', expect.any(Array));
|
|
59
|
-
expect(response.status).toHaveBeenCalledWith(
|
|
60
|
-
expect(response.json).toHaveBeenCalledWith({
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
expect(response.status).toHaveBeenCalledWith(200);
|
|
60
|
+
expect(response.json).toHaveBeenCalledWith({ success: 'success' });
|
|
61
|
+
});
|
|
62
|
+
it('still clears local cookies and succeeds when Fence is unreachable', async () => {
|
|
63
|
+
global.fetch = jest.fn().mockRejectedValue(new Error('ECONNREFUSED'));
|
|
64
|
+
const request = {
|
|
65
|
+
method: 'POST',
|
|
66
|
+
headers: {},
|
|
67
|
+
cookies: {},
|
|
68
|
+
};
|
|
69
|
+
const response = makeResponse();
|
|
70
|
+
await sessionLogout(request, response);
|
|
71
|
+
expect(response.setHeader).toHaveBeenCalledWith('Set-Cookie', expect.any(Array));
|
|
72
|
+
expect(response.status).toHaveBeenCalledWith(200);
|
|
73
|
+
expect(response.json).toHaveBeenCalledWith({ success: 'success' });
|
|
63
74
|
});
|
|
64
75
|
});
|
|
65
76
|
//# sourceMappingURL=sessionLogout.unit.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionLogout.unit.test.js","sourceRoot":"","sources":["../../../../../src/api/auth/tests/sessionLogout.unit.test.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,IAAI,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"sessionLogout.unit.test.js","sourceRoot":"","sources":["../../../../../src/api/auth/tests/sessionLogout.unit.test.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,GAAG,EAAE,CAAC,CAAC;IACpC,kBAAkB,EAAE,2BAA2B;CAChD,CAAC,CAAC,CAAC;AAIJ,MAAM,YAAY,GAAG,GAAG,EAAE;IACxB,MAAM,QAAQ,GAAG;QACf,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE;QACpB,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE;QACjB,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE;KAChB,CAAC;IACF,QAAQ,CAAC,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC1C,QAAQ,CAAC,IAAI,CAAC,eA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AAI,CAAC,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mEAAmE,EAAE,KAAK,IAAI,EAAE;QACjF,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;QACtE,MAAM,OAAO,GAAG;YACd,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE;YACX,OAAO,EAAE,EAAE;SACM,CAAC;QACpB,MAAM,QAAQ,GAAG,YAAY,EAAE,CAAC;QAEhC,MAAM,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAEvC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAC7C,YAAY,EACZ,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAClB,CAAC;QACF,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC;QAClD,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/dts/server.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ import type { AuthorizedRoutesConfig, RouteConfig } from './lib/authz/type';
|
|
|
3
3
|
import { DefaultAuthorizedRoutesConfig } from './lib/authz/type';
|
|
4
4
|
import { fetchJWTKey, getAccessToken } from './lib/auth/utils';
|
|
5
5
|
import sessionToken from './api/auth/sessionToken';
|
|
6
|
-
|
|
6
|
+
import sessionLogout from './api/auth/sessionLogout';
|
|
7
|
+
export { type RouteConfig, type AuthorizedRoutesConfig, ContentSource, DefaultAuthorizedRoutesConfig, fetchJWTKey, getAccessToken, sessionToken, sessionLogout, };
|
|
7
8
|
//# sourceMappingURL=server.d.ts.map
|
package/dist/dts/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,YAAY,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,aAAa,MAAM,0BAA0B,CAAC;AAErD,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC3B,aAAa,EACb,6BAA6B,EAC7B,WAAW,EACX,cAAc,EACd,YAAY,EACZ,aAAa,GACd,CAAC"}
|
package/dist/dts/server.js
CHANGED
|
@@ -2,5 +2,6 @@ import ContentSource from './lib/content/index';
|
|
|
2
2
|
import { DefaultAuthorizedRoutesConfig } from './lib/authz/type';
|
|
3
3
|
import { fetchJWTKey, getAccessToken } from './lib/auth/utils';
|
|
4
4
|
import sessionToken from './api/auth/sessionToken';
|
|
5
|
-
|
|
5
|
+
import sessionLogout from './api/auth/sessionLogout';
|
|
6
|
+
export { ContentSource, DefaultAuthorizedRoutesConfig, fetchJWTKey, getAccessToken, sessionToken, sessionLogout, };
|
|
6
7
|
//# sourceMappingURL=server.js.map
|
package/dist/dts/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,YAAY,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,aAAa,MAAM,0BAA0B,CAAC;AAErD,OAAO,EAGL,aAAa,EACb,6BAA6B,EAC7B,WAAW,EACX,cAAc,EACd,YAAY,EACZ,aAAa,GACd,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var dynamic = require('next/dynamic');
|
|
5
|
+
require('react');
|
|
6
|
+
var core = require('@mantine/core');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var dynamic__default = /*#__PURE__*/_interopDefault(dynamic);
|
|
11
|
+
|
|
12
|
+
// Wrapper function for displaying loading element before GqlQueryEditor renders
|
|
13
|
+
const GqlQueryEditor = dynamic__default.default(()=>Promise.resolve().then(function () { return require('./index-Cjc3XMjn.js'); }).then(function (n) { return n.GqlQueryEditor$1; }), {
|
|
14
|
+
loading: ()=>/*#__PURE__*/ jsxRuntime.jsx(core.LoadingOverlay, {
|
|
15
|
+
visible: true
|
|
16
|
+
}),
|
|
17
|
+
ssr: false
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* Represents the QueryPanel component responsible for rendering a GraphQL query editor.
|
|
21
|
+
*
|
|
22
|
+
* @param {QueryPanelConfiguration} config - The configuration object for the QueryPanel.
|
|
23
|
+
* @param {Array<{ url: string, label: string }>} [config.graphQLEndpoints=[{ url: 'guppy/graphql', label: 'Flat' }]]
|
|
24
|
+
* An array of GraphQL endpoint objects. Each endpoint object contains the following:
|
|
25
|
+
* - `url` (string): The URL of the GraphQL endpoint. Note this should only be the Gen3 service path (e.g., 'guppy/graphql').
|
|
26
|
+
* - `label` (string): A label for the GraphQL endpoint.
|
|
27
|
+
*
|
|
28
|
+
* @returns {React.Element} The rendered GraphQL query editor.
|
|
29
|
+
*/ const QueryPanel = ({ graphQLEndpoints = [
|
|
30
|
+
{
|
|
31
|
+
url: 'guppy/graphql',
|
|
32
|
+
label: 'Flat'
|
|
33
|
+
}
|
|
34
|
+
] })=>{
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
return /*#__PURE__*/ jsxRuntime.jsx(GqlQueryEditor, {
|
|
38
|
+
graphQLEndpoints: graphQLEndpoints
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
exports.default = QueryPanel;
|
|
43
|
+
//# sourceMappingURL=QueryPanel-Bw-xhntZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryPanel-Bw-xhntZ.js","sources":["../../../src/features/Query/QueryPanel.tsx"],"sourcesContent":["import dynamic from 'next/dynamic';\nimport React from 'react';\nimport { LoadingOverlay } from '@mantine/core';\nimport type { QueryPanelConfiguration } from './types';\n\n// Wrapper function for displaying loading element before GqlQueryEditor renders\nconst GqlQueryEditor = dynamic(() => import('./GqlQueryEditor'), {\n loading: () => <LoadingOverlay visible={true} />,\n ssr: false,\n});\n\n/**\n * Represents the QueryPanel component responsible for rendering a GraphQL query editor.\n *\n * @param {QueryPanelConfiguration} config - The configuration object for the QueryPanel.\n * @param {Array<{ url: string, label: string }>} [config.graphQLEndpoints=[{ url: 'guppy/graphql', label: 'Flat' }]]\n * An array of GraphQL endpoint objects. Each endpoint object contains the following:\n * - `url` (string): The URL of the GraphQL endpoint. Note this should only be the Gen3 service path (e.g., 'guppy/graphql').\n * - `label` (string): A label for the GraphQL endpoint.\n *\n * @returns {React.Element} The rendered GraphQL query editor.\n */\n\nconst QueryPanel = ({\n graphQLEndpoints = [{ url: 'guppy/graphql', label: 'Flat' }],\n}: QueryPanelConfiguration) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return <GqlQueryEditor graphQLEndpoints={graphQLEndpoints} />;\n};\n\nexport default QueryPanel;\n"],"names":["GqlQueryEditor","dynamic","loading","_jsx","LoadingOverlay","visible","ssr","QueryPanel","graphQLEndpoints","url","label"],"mappings":";;;;;;;;;;;AAKA;AACA,MAAMA,cAAAA,GAAiBC,wBAAAA,CAAQ,IAAM,oDAAO,qBAAA,uDAAA,EAAqB;AAC/DC,IAAAA,OAAAA,EAAS,kBAAMC,cAAA,CAACC,mBAAAA,EAAAA;YAAeC,OAAAA,EAAS;;IACxCC,GAAAA,EAAK;AACP,CAAA,CAAA;AAEA;;;;;;;;;;AAUC,IAED,MAAMC,UAAAA,GAAa,CAAC,EAClBC,gBAAAA,GAAmB;AAAC,IAAA;QAAEC,GAAAA,EAAK,eAAA;QAAiBC,KAAAA,EAAO;AAAO;CAAE,EACpC,GAAA;;;AAGxB,IAAA,qBAAOP,cAAA,CAACH,cAAAA,EAAAA;QAAeQ,gBAAAA,EAAkBA;;AAC3C;;;;"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var dynamic = require('next/dynamic');
|
|
5
|
+
require('react');
|
|
6
|
+
var core = require('@mantine/core');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var dynamic__default = /*#__PURE__*/_interopDefault(dynamic);
|
|
11
|
+
|
|
12
|
+
// Wrapper function for displaying loading element before GqlQueryEditor renders
|
|
13
|
+
const GqlQueryEditor = dynamic__default.default(()=>Promise.resolve().then(function () { return require('./index-Bx2OoF3F.js'); }).then(function (n) { return n.GqlQueryEditor$1; }), {
|
|
14
|
+
loading: ()=>/*#__PURE__*/ jsxRuntime.jsx(core.LoadingOverlay, {
|
|
15
|
+
visible: true
|
|
16
|
+
}),
|
|
17
|
+
ssr: false
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* Represents the QueryPanel component responsible for rendering a GraphQL query editor.
|
|
21
|
+
*
|
|
22
|
+
* @param {QueryPanelConfiguration} config - The configuration object for the QueryPanel.
|
|
23
|
+
* @param {Array<{ url: string, label: string }>} [config.graphQLEndpoints=[{ url: 'guppy/graphql', label: 'Flat' }]]
|
|
24
|
+
* An array of GraphQL endpoint objects. Each endpoint object contains the following:
|
|
25
|
+
* - `url` (string): The URL of the GraphQL endpoint. Note this should only be the Gen3 service path (e.g., 'guppy/graphql').
|
|
26
|
+
* - `label` (string): A label for the GraphQL endpoint.
|
|
27
|
+
*
|
|
28
|
+
* @returns {React.Element} The rendered GraphQL query editor.
|
|
29
|
+
*/ const QueryPanel = ({ graphQLEndpoints = [
|
|
30
|
+
{
|
|
31
|
+
url: 'guppy/graphql',
|
|
32
|
+
label: 'Flat'
|
|
33
|
+
}
|
|
34
|
+
] })=>{
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
return /*#__PURE__*/ jsxRuntime.jsx(GqlQueryEditor, {
|
|
38
|
+
graphQLEndpoints: graphQLEndpoints
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
exports.default = QueryPanel;
|
|
43
|
+
//# sourceMappingURL=QueryPanel-CyPKyG13.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryPanel-CyPKyG13.js","sources":["../../../src/features/Query/QueryPanel.tsx"],"sourcesContent":["import dynamic from 'next/dynamic';\nimport React from 'react';\nimport { LoadingOverlay } from '@mantine/core';\nimport type { QueryPanelConfiguration } from './types';\n\n// Wrapper function for displaying loading element before GqlQueryEditor renders\nconst GqlQueryEditor = dynamic(() => import('./GqlQueryEditor'), {\n loading: () => <LoadingOverlay visible={true} />,\n ssr: false,\n});\n\n/**\n * Represents the QueryPanel component responsible for rendering a GraphQL query editor.\n *\n * @param {QueryPanelConfiguration} config - The configuration object for the QueryPanel.\n * @param {Array<{ url: string, label: string }>} [config.graphQLEndpoints=[{ url: 'guppy/graphql', label: 'Flat' }]]\n * An array of GraphQL endpoint objects. Each endpoint object contains the following:\n * - `url` (string): The URL of the GraphQL endpoint. Note this should only be the Gen3 service path (e.g., 'guppy/graphql').\n * - `label` (string): A label for the GraphQL endpoint.\n *\n * @returns {React.Element} The rendered GraphQL query editor.\n */\n\nconst QueryPanel = ({\n graphQLEndpoints = [{ url: 'guppy/graphql', label: 'Flat' }],\n}: QueryPanelConfiguration) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return <GqlQueryEditor graphQLEndpoints={graphQLEndpoints} />;\n};\n\nexport default QueryPanel;\n"],"names":["GqlQueryEditor","dynamic","loading","_jsx","LoadingOverlay","visible","ssr","QueryPanel","graphQLEndpoints","url","label"],"mappings":";;;;;;;;;;;AAKA;AACA,MAAMA,cAAAA,GAAiBC,wBAAAA,CAAQ,IAAM,oDAAO,qBAAA,uDAAA,EAAqB;AAC/DC,IAAAA,OAAAA,EAAS,kBAAMC,cAAA,CAACC,mBAAAA,EAAAA;YAAeC,OAAAA,EAAS;;IACxCC,GAAAA,EAAK;AACP,CAAA,CAAA;AAEA;;;;;;;;;;AAUC,IAED,MAAMC,UAAAA,GAAa,CAAC,EAClBC,gBAAAA,GAAmB;AAAC,IAAA;QAAEC,GAAAA,EAAK,eAAA;QAAiBC,KAAAA,EAAO;AAAO;CAAE,EACpC,GAAA;;;AAGxB,IAAA,qBAAOP,cAAA,CAACH,cAAAA,EAAAA;QAAeQ,gBAAAA,EAAkBA;;AAC3C;;;;"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var dynamic = require('next/dynamic');
|
|
5
|
+
require('react');
|
|
6
|
+
var core = require('@mantine/core');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var dynamic__default = /*#__PURE__*/_interopDefault(dynamic);
|
|
11
|
+
|
|
12
|
+
// Wrapper function for displaying loading element before GqlQueryEditor renders
|
|
13
|
+
const GqlQueryEditor = dynamic__default.default(()=>Promise.resolve().then(function () { return require('./index-CHR1uioW.js'); }).then(function (n) { return n.GqlQueryEditor$1; }), {
|
|
14
|
+
loading: ()=>/*#__PURE__*/ jsxRuntime.jsx(core.LoadingOverlay, {
|
|
15
|
+
visible: true
|
|
16
|
+
}),
|
|
17
|
+
ssr: false
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* Represents the QueryPanel component responsible for rendering a GraphQL query editor.
|
|
21
|
+
*
|
|
22
|
+
* @param {QueryPanelConfiguration} config - The configuration object for the QueryPanel.
|
|
23
|
+
* @param {Array<{ url: string, label: string }>} [config.graphQLEndpoints=[{ url: 'guppy/graphql', label: 'Flat' }]]
|
|
24
|
+
* An array of GraphQL endpoint objects. Each endpoint object contains the following:
|
|
25
|
+
* - `url` (string): The URL of the GraphQL endpoint. Note this should only be the Gen3 service path (e.g., 'guppy/graphql').
|
|
26
|
+
* - `label` (string): A label for the GraphQL endpoint.
|
|
27
|
+
*
|
|
28
|
+
* @returns {React.Element} The rendered GraphQL query editor.
|
|
29
|
+
*/ const QueryPanel = ({ graphQLEndpoints = [
|
|
30
|
+
{
|
|
31
|
+
url: 'guppy/graphql',
|
|
32
|
+
label: 'Flat'
|
|
33
|
+
}
|
|
34
|
+
] })=>{
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
return /*#__PURE__*/ jsxRuntime.jsx(GqlQueryEditor, {
|
|
38
|
+
graphQLEndpoints: graphQLEndpoints
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
exports.default = QueryPanel;
|
|
43
|
+
//# sourceMappingURL=QueryPanel-v-n3iGjq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryPanel-v-n3iGjq.js","sources":["../../../src/features/Query/QueryPanel.tsx"],"sourcesContent":["import dynamic from 'next/dynamic';\nimport React from 'react';\nimport { LoadingOverlay } from '@mantine/core';\nimport type { QueryPanelConfiguration } from './types';\n\n// Wrapper function for displaying loading element before GqlQueryEditor renders\nconst GqlQueryEditor = dynamic(() => import('./GqlQueryEditor'), {\n loading: () => <LoadingOverlay visible={true} />,\n ssr: false,\n});\n\n/**\n * Represents the QueryPanel component responsible for rendering a GraphQL query editor.\n *\n * @param {QueryPanelConfiguration} config - The configuration object for the QueryPanel.\n * @param {Array<{ url: string, label: string }>} [config.graphQLEndpoints=[{ url: 'guppy/graphql', label: 'Flat' }]]\n * An array of GraphQL endpoint objects. Each endpoint object contains the following:\n * - `url` (string): The URL of the GraphQL endpoint. Note this should only be the Gen3 service path (e.g., 'guppy/graphql').\n * - `label` (string): A label for the GraphQL endpoint.\n *\n * @returns {React.Element} The rendered GraphQL query editor.\n */\n\nconst QueryPanel = ({\n graphQLEndpoints = [{ url: 'guppy/graphql', label: 'Flat' }],\n}: QueryPanelConfiguration) => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return <GqlQueryEditor graphQLEndpoints={graphQLEndpoints} />;\n};\n\nexport default QueryPanel;\n"],"names":["GqlQueryEditor","dynamic","loading","_jsx","LoadingOverlay","visible","ssr","QueryPanel","graphQLEndpoints","url","label"],"mappings":";;;;;;;;;;;AAKA;AACA,MAAMA,cAAAA,GAAiBC,wBAAAA,CAAQ,IAAM,oDAAO,qBAAA,uDAAA,EAAqB;AAC/DC,IAAAA,OAAAA,EAAS,kBAAMC,cAAA,CAACC,mBAAAA,EAAAA;YAAeC,OAAAA,EAAS;;IACxCC,GAAAA,EAAK;AACP,CAAA,CAAA;AAEA;;;;;;;;;;AAUC,IAED,MAAMC,UAAAA,GAAa,CAAC,EAClBC,gBAAAA,GAAmB;AAAC,IAAA;QAAEC,GAAAA,EAAK,eAAA;QAAiBC,KAAAA,EAAO;AAAO;CAAE,EACpC,GAAA;;;AAGxB,IAAA,qBAAOP,cAAA,CAACH,cAAAA,EAAAA;QAAeQ,gBAAAA,EAAkBA;;AAC3C;;;;"}
|