react-easy-wall 1.0.21 → 1.0.24
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/cjs/components/panel/Panel.js +0 -1
- package/dist/cjs/components/panel/Panel.js.map +1 -1
- package/dist/cjs/components/panel/PanelAvatar.js +2 -4
- package/dist/cjs/components/panel/PanelAvatar.js.map +1 -1
- package/dist/cjs/components/panel/PanelButton.js +0 -1
- package/dist/cjs/components/panel/PanelButton.js.map +1 -1
- package/dist/cjs/components/panel/PanelDivider.js +0 -1
- package/dist/cjs/components/panel/PanelDivider.js.map +1 -1
- package/dist/cjs/components/panel/PanelFooter.js +0 -1
- package/dist/cjs/components/panel/PanelFooter.js.map +1 -1
- package/dist/cjs/components/panel/PanelHeader.js +0 -1
- package/dist/cjs/components/panel/PanelHeader.js.map +1 -1
- package/dist/cjs/components/panel/PanelItem.js +0 -1
- package/dist/cjs/components/panel/PanelItem.js.map +1 -1
- package/dist/cjs/components/panel/PanelListItems.js +0 -1
- package/dist/cjs/components/panel/PanelListItems.js.map +1 -1
- package/dist/cjs/components/session/SessionProvider.js +0 -1
- package/dist/cjs/components/session/SessionProvider.js.map +1 -1
- package/dist/cjs/components/session/SessionUserContext.js +0 -1
- package/dist/cjs/components/session/SessionUserContext.js.map +1 -1
- package/dist/cjs/components/session/SessionUserProvider.js +0 -1
- package/dist/cjs/components/session/SessionUserProvider.js.map +1 -1
- package/dist/cjs/node_modules/@apollo/client/errors/CombinedProtocolErrors.js +85 -0
- package/dist/cjs/node_modules/@apollo/client/errors/CombinedProtocolErrors.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/errors/ServerError.js +80 -0
- package/dist/cjs/node_modules/@apollo/client/errors/ServerError.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/errors/ServerParseError.js +77 -0
- package/dist/cjs/node_modules/@apollo/client/errors/ServerParseError.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/errors/index.js +9 -0
- package/dist/cjs/node_modules/@apollo/client/errors/index.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/errors/utils.js +19 -0
- package/dist/cjs/node_modules/@apollo/client/errors/utils.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/link/client-awareness/ClientAwarenessLink.js +91 -0
- package/dist/cjs/node_modules/@apollo/client/link/client-awareness/ClientAwarenessLink.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/link/core/ApolloLink.js +262 -0
- package/dist/cjs/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/link/http/BaseHttpLink.js +155 -0
- package/dist/cjs/node_modules/@apollo/client/link/http/BaseHttpLink.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/link/http/HttpLink.js +41 -0
- package/dist/cjs/node_modules/@apollo/client/link/http/HttpLink.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js +168 -0
- package/dist/cjs/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/link/http/rewriteURIForGET.js +56 -0
- package/dist/cjs/node_modules/@apollo/client/link/http/rewriteURIForGET.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js +106 -0
- package/dist/cjs/node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/link/http/selectURI.js +18 -0
- package/dist/cjs/node_modules/@apollo/client/link/http/selectURI.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/link/utils/createOperation.js +40 -0
- package/dist/cjs/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/link/utils/filterOperationVariables.js +27 -0
- package/dist/cjs/node_modules/@apollo/client/link/utils/filterOperationVariables.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/caching/sizes.js +31 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/environment/index.production.js +6 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/environment/index.production.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/graphql/operations.js +65 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/graphql/operations.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/graphql/print.js +31 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/caches.js +49 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/checkDocument.js +62 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/compact.js +27 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/compact.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +16 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/getOperationName.js +13 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/globals/global.js +21 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/globals/maybe.js +11 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +13 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +19 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/memoize.js +33 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +20 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/invariant/index.js +94 -0
- package/dist/cjs/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -0
- package/dist/cjs/node_modules/@apollo/client/version.js +6 -0
- package/dist/cjs/node_modules/@apollo/client/version.js.map +1 -0
- package/dist/cjs/node_modules/@wry/caches/lib/weak.js +147 -0
- package/dist/cjs/node_modules/@wry/caches/lib/weak.js.map +1 -0
- package/dist/cjs/node_modules/@wry/trie/lib/index.js +86 -0
- package/dist/cjs/node_modules/@wry/trie/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/graphql/error/GraphQLError.js +232 -0
- package/dist/cjs/node_modules/graphql/error/GraphQLError.js.map +1 -0
- package/dist/cjs/node_modules/graphql/error/syntaxError.js +18 -0
- package/dist/cjs/node_modules/graphql/error/syntaxError.js.map +1 -0
- package/dist/cjs/node_modules/graphql/jsutils/devAssert.js +12 -0
- package/dist/cjs/node_modules/graphql/jsutils/devAssert.js.map +1 -0
- package/dist/cjs/node_modules/graphql/jsutils/inspect.js +120 -0
- package/dist/cjs/node_modules/graphql/jsutils/inspect.js.map +1 -0
- package/dist/cjs/node_modules/graphql/jsutils/instanceOf.js +63 -0
- package/dist/cjs/node_modules/graphql/jsutils/instanceOf.js.map +1 -0
- package/dist/cjs/node_modules/graphql/jsutils/invariant.js +14 -0
- package/dist/cjs/node_modules/graphql/jsutils/invariant.js.map +1 -0
- package/dist/cjs/node_modules/graphql/jsutils/isObjectLike.js +12 -0
- package/dist/cjs/node_modules/graphql/jsutils/isObjectLike.js.map +1 -0
- package/dist/cjs/node_modules/graphql/language/ast.js +227 -0
- package/dist/cjs/node_modules/graphql/language/ast.js.map +1 -0
- package/dist/cjs/node_modules/graphql/language/blockString.js +114 -0
- package/dist/cjs/node_modules/graphql/language/blockString.js.map +1 -0
- package/dist/cjs/node_modules/graphql/language/characterClasses.js +73 -0
- package/dist/cjs/node_modules/graphql/language/characterClasses.js.map +1 -0
- package/dist/cjs/node_modules/graphql/language/directiveLocation.js +34 -0
- package/dist/cjs/node_modules/graphql/language/directiveLocation.js.map +1 -0
- package/dist/cjs/node_modules/graphql/language/kinds.js +63 -0
- package/dist/cjs/node_modules/graphql/language/kinds.js.map +1 -0
- package/dist/cjs/node_modules/graphql/language/lexer.js +925 -0
- package/dist/cjs/node_modules/graphql/language/lexer.js.map +1 -0
- package/dist/cjs/node_modules/graphql/language/location.js +36 -0
- package/dist/cjs/node_modules/graphql/language/location.js.map +1 -0
- package/dist/cjs/node_modules/graphql/language/parser.js +1582 -0
- package/dist/cjs/node_modules/graphql/language/parser.js.map +1 -0
- package/dist/cjs/node_modules/graphql/language/printLocation.js +72 -0
- package/dist/cjs/node_modules/graphql/language/printLocation.js.map +1 -0
- package/dist/cjs/node_modules/graphql/language/printString.js +181 -0
- package/dist/cjs/node_modules/graphql/language/printString.js.map +1 -0
- package/dist/cjs/node_modules/graphql/language/printer.js +374 -0
- package/dist/cjs/node_modules/graphql/language/printer.js.map +1 -0
- package/dist/cjs/node_modules/graphql/language/source.js +56 -0
- package/dist/cjs/node_modules/graphql/language/source.js.map +1 -0
- package/dist/cjs/node_modules/graphql/language/tokenKind.js +39 -0
- package/dist/cjs/node_modules/graphql/language/tokenKind.js.map +1 -0
- package/dist/cjs/node_modules/graphql/language/visitor.js +274 -0
- package/dist/cjs/node_modules/graphql/language/visitor.js.map +1 -0
- package/dist/cjs/node_modules/graphql-tag/lib/index.js +129 -0
- package/dist/cjs/node_modules/graphql-tag/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/Observable.js +106 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/Subscriber.js +158 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/Subscription.js +148 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/config.js +7 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/observable/empty.js +8 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +20 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +6 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +17 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +11 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +15 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +10 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/util/identity.js +8 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +8 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/util/noop.js +6 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/util/pipe.js +18 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +14 -0
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -0
- package/dist/cjs/node_modules/tslib/tslib.es6.js +93 -0
- package/dist/cjs/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/cjs/shared/apollo/apollo.client.js +2 -2
- package/dist/cjs/shared/apollo/apollo.client.js.map +1 -1
- package/dist/cjs/shared/types/generated.js +2 -2
- package/dist/cjs/shared/types/generated.js.map +1 -1
- package/dist/esm/_virtual/_commonjsHelpers.js +1 -30
- package/dist/esm/_virtual/_commonjsHelpers.js.map +1 -1
- package/dist/esm/components/panel/Panel.js +0 -1
- package/dist/esm/components/panel/Panel.js.map +1 -1
- package/dist/esm/components/panel/PanelAvatar.js +2 -4
- package/dist/esm/components/panel/PanelAvatar.js.map +1 -1
- package/dist/esm/components/panel/PanelButton.js +0 -1
- package/dist/esm/components/panel/PanelButton.js.map +1 -1
- package/dist/esm/components/panel/PanelDivider.js +0 -1
- package/dist/esm/components/panel/PanelDivider.js.map +1 -1
- package/dist/esm/components/panel/PanelFooter.js +0 -1
- package/dist/esm/components/panel/PanelFooter.js.map +1 -1
- package/dist/esm/components/panel/PanelHeader.js +0 -1
- package/dist/esm/components/panel/PanelHeader.js.map +1 -1
- package/dist/esm/components/panel/PanelItem.js +0 -1
- package/dist/esm/components/panel/PanelItem.js.map +1 -1
- package/dist/esm/components/panel/PanelListItems.js +0 -1
- package/dist/esm/components/panel/PanelListItems.js.map +1 -1
- package/dist/esm/components/session/SessionProvider.js +0 -1
- package/dist/esm/components/session/SessionProvider.js.map +1 -1
- package/dist/esm/components/session/SessionUserContext.js +0 -1
- package/dist/esm/components/session/SessionUserContext.js.map +1 -1
- package/dist/esm/components/session/SessionUserProvider.js +0 -1
- package/dist/esm/components/session/SessionUserProvider.js.map +1 -1
- package/dist/esm/node_modules/@cobuildlab/react-simple-state/lib/hooks.js +2 -2
- package/dist/esm/node_modules/@cobuildlab/react-simple-state/lib/hooks.js.map +1 -1
- package/dist/esm/node_modules/@cobuildlab/react-simple-state/lib/store-hooks.js +2 -2
- package/dist/esm/node_modules/@cobuildlab/react-simple-state/lib/store-hooks.js.map +1 -1
- package/dist/esm/node_modules/@cobuildlab/react-simple-state/lib/views.js +2 -2
- package/dist/esm/node_modules/@cobuildlab/react-simple-state/lib/views.js.map +1 -1
- package/dist/esm/node_modules/@mui/material-nextjs/esm/nextCompatRouter.js +1 -1
- package/dist/esm/node_modules/@mui/material-nextjs/esm/v13-appRouter/nextNavigation.js +1 -1
- package/dist/esm/shared/apollo/apollo.client.js +1 -1
- package/dist/esm/shared/types/generated.js +1 -1
- package/dist/esm/types/components/panel/PanelAvatar.d.ts +3 -1
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Panel.js","sources":["../../../../src/components/panel/Panel.tsx"],"sourcesContent":["'use client';\nimport { Box, Drawer, DrawerProps } from '@mui/material';\nimport React from 'react';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { panelStore } from './panel.store';\nimport { handlePanelClick } from './panel.actions';\n\nexport interface PanelProps extends DrawerProps {\n children?: React.ReactNode;\n footer?: React.ReactNode;\n size?: number;\n}\n\nexport const Panel: React.FC<PanelProps> = ({ children, footer, size = 300, ...rest }) => {\n const { isOpen } = useStore(panelStore);\n\n return (\n <Drawer open={isOpen} onClose={() => handlePanelClick(false)} {...rest}>\n <Box\n sx={{ width: size }}\n display=\"flex\"\n flexDirection=\"column\"\n justifyContent=\"space-between\"\n height=\"100%\">\n <Box>{children}</Box>\n <Box>{footer}</Box>\n </Box>\n </Drawer>\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Panel.js","sources":["../../../../src/components/panel/Panel.tsx"],"sourcesContent":["'use client';\nimport { Box, Drawer, DrawerProps } from '@mui/material';\nimport React from 'react';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { panelStore } from './panel.store';\nimport { handlePanelClick } from './panel.actions';\n\nexport interface PanelProps extends DrawerProps {\n children?: React.ReactNode;\n footer?: React.ReactNode;\n size?: number;\n}\n\nexport const Panel: React.FC<PanelProps> = ({ children, footer, size = 300, ...rest }) => {\n const { isOpen } = useStore(panelStore);\n\n return (\n <Drawer open={isOpen} onClose={() => handlePanelClick(false)} {...rest}>\n <Box\n sx={{ width: size }}\n display=\"flex\"\n flexDirection=\"column\"\n justifyContent=\"space-between\"\n height=\"100%\">\n <Box>{children}</Box>\n <Box>{footer}</Box>\n </Box>\n </Drawer>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AAaO;;AAGL;AAaF;;"}
|
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
require('react');
|
|
6
5
|
var session_hooks = require('../session/session.hooks.js');
|
|
7
|
-
var corona = require('../../assets/corona.svg.js');
|
|
8
6
|
var Box = require('../../node_modules/@mui/material/esm/Box/Box.js');
|
|
9
7
|
var Avatar = require('../../node_modules/@mui/material/esm/Avatar/Avatar.js');
|
|
10
8
|
var Link = require('../../node_modules/@mui/material/esm/Link/Link.js');
|
|
11
9
|
|
|
12
|
-
const PanelAvatar = ({ avatarProps, textLink = 'Admin Account', }) => {
|
|
10
|
+
const PanelAvatar = ({ avatarProps, textLink = 'Admin Account', subscriptionImage = null, subscriptionImageContainerProps = {}, }) => {
|
|
13
11
|
const { user, config, subscription } = session_hooks.useSession();
|
|
14
|
-
return (jsxRuntime.jsxs(Box.default, { px: 1.5, py: 1, display: "flex", alignItems: "center", children: [jsxRuntime.jsxs(Box.default, { mr: 1, position: "relative", children: [jsxRuntime.jsx(Avatar.default, { sx: { width: 40, height: 40, ...avatarProps?.sx }, src: user?.avatar, ...avatarProps }), subscription ?
|
|
12
|
+
return (jsxRuntime.jsxs(Box.default, { px: 1.5, py: 1, display: "flex", alignItems: "center", children: [jsxRuntime.jsxs(Box.default, { mr: 1, position: "relative", children: [jsxRuntime.jsx(Avatar.default, { sx: { width: 40, height: 40, ...avatarProps?.sx }, src: user?.avatar, ...avatarProps }), subscription ? jsxRuntime.jsx(Box.default, { ...subscriptionImageContainerProps, children: subscriptionImage }) : null] }), jsxRuntime.jsxs(Box.default, { children: [jsxRuntime.jsx(Box.default, { mb: 0, children: decodeURIComponent(user?.name) }), jsxRuntime.jsx(Link.default, { href: config?.urlPortal, children: jsxRuntime.jsx(Box.default, { fontSize: 12, children: textLink }) })] })] }));
|
|
15
13
|
};
|
|
16
14
|
|
|
17
15
|
exports.PanelAvatar = PanelAvatar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelAvatar.js","sources":["../../../../src/components/panel/PanelAvatar.tsx"],"sourcesContent":["'use client';\nimport React from 'react';\nimport { Box, Avatar, Link, AvatarProps } from '@mui/material';\nimport { useSession } from '../session/session.hooks';\
|
|
1
|
+
{"version":3,"file":"PanelAvatar.js","sources":["../../../../src/components/panel/PanelAvatar.tsx"],"sourcesContent":["'use client';\nimport React from 'react';\nimport { Box, Avatar, Link, AvatarProps, BoxProps } from '@mui/material';\nimport { useSession } from '../session/session.hooks';\n\nexport interface PanelAvatarProps {\n avatarProps?: AvatarProps;\n textLink?: string;\n subscriptionImage?: React.ReactNode | null;\n subscriptionImageContainerProps?: BoxProps;\n}\n\nexport const PanelAvatar: React.FC<PanelAvatarProps> = ({\n avatarProps,\n textLink = 'Admin Account',\n subscriptionImage = null,\n subscriptionImageContainerProps = {},\n}) => {\n const { user, config, subscription } = useSession();\n\n return (\n <Box px={1.5} py={1} display=\"flex\" alignItems=\"center\">\n <Box mr={1} position=\"relative\">\n <Avatar\n sx={{ width: 40, height: 40, ...avatarProps?.sx }}\n src={user?.avatar as string}\n {...avatarProps}\n />\n {subscription ? <Box {...subscriptionImageContainerProps}>{subscriptionImage}</Box> : null}\n </Box>\n <Box>\n <Box mb={0}>{decodeURIComponent(user?.name as string)}</Box>\n <Link href={config?.urlPortal}>\n <Box fontSize={12}>{textLink}</Box>\n </Link>\n </Box>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAsCA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelButton.js","sources":["../../../../src/components/panel/PanelButton.tsx"],"sourcesContent":["'use client'\nimport React, { FC } from 'react';\nimport { Button, ButtonProps } from '@mui/material';\nimport { handlePanelClick } from './panel.actions';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { panelStore } from './panel.store';\n\nexport interface PanelButtonProps extends ButtonProps {\n children: React.ReactNode;\n}\n\nexport const PanelButton: FC<PanelButtonProps> = ({ children, ...rest }) => {\n const { isOpen } = useStore(panelStore);\n\n return <Button onClick={() => handlePanelClick(!isOpen)} {...rest}>\n {children}\n </Button>;\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PanelButton.js","sources":["../../../../src/components/panel/PanelButton.tsx"],"sourcesContent":["'use client'\nimport React, { FC } from 'react';\nimport { Button, ButtonProps } from '@mui/material';\nimport { handlePanelClick } from './panel.actions';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { panelStore } from './panel.store';\n\nexport interface PanelButtonProps extends ButtonProps {\n children: React.ReactNode;\n}\n\nexport const PanelButton: FC<PanelButtonProps> = ({ children, ...rest }) => {\n const { isOpen } = useStore(panelStore);\n\n return <Button onClick={() => handlePanelClick(!isOpen)} {...rest}>\n {children}\n </Button>;\n};\n"],"names":[],"mappings":";;;;;;;;;AAWO;;AAGL;AAGF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelDivider.js","sources":["../../../../src/components/panel/PanelDivider.tsx"],"sourcesContent":["'use client'\nimport { DividerProps, Divider } from '@mui/material';\nimport React from 'react';\n\nexport interface PanelDividerProps extends DividerProps {}\n\nexport const PanelDivider: React.FC<PanelDividerProps> = ({ sx, ...rest }) => {\n return (\n <Divider\n sx={{\n backgroundColor: '#e7e7e7',\n height: 1.5,\n ...sx,\n }}\n {...rest}\n />\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PanelDivider.js","sources":["../../../../src/components/panel/PanelDivider.tsx"],"sourcesContent":["'use client'\nimport { DividerProps, Divider } from '@mui/material';\nimport React from 'react';\n\nexport interface PanelDividerProps extends DividerProps {}\n\nexport const PanelDivider: React.FC<PanelDividerProps> = ({ sx, ...rest }) => {\n return (\n <Divider\n sx={{\n backgroundColor: '#e7e7e7',\n height: 1.5,\n ...sx,\n }}\n {...rest}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;AAMO;AACL;AAGM;AACA;AACA;;AAKR;;"}
|
|
@@ -8,7 +8,6 @@ var theme = require('../../shared/mui/theme.js');
|
|
|
8
8
|
var PowerSettingsNew = require('../../node_modules/@mui/icons-material/esm/PowerSettingsNew.js');
|
|
9
9
|
var panel_actions = require('./panel.actions.js');
|
|
10
10
|
var session_hooks = require('../session/session.hooks.js');
|
|
11
|
-
require('react');
|
|
12
11
|
var List = require('../../node_modules/@mui/material/esm/List/List.js');
|
|
13
12
|
var ListItemIcon = require('../../node_modules/@mui/material/esm/ListItemIcon/ListItemIcon.js');
|
|
14
13
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelFooter.js","sources":["../../../../src/components/panel/PanelFooter.tsx"],"sourcesContent":["'use client';\nimport {\n DividerProps,\n List,\n ListItemIcon,\n ListItemProps,\n ListItemTextProps,\n ListProps,\n} from '@mui/material';\nimport { PanelDivider } from './PanelDivider';\nimport { PanelItem } from './PanelItem';\nimport { theme } from '../../shared/mui/theme';\nimport PowerSettingsNewIcon from '@mui/icons-material/PowerSettingsNew';\nimport { handleLogout } from './panel.actions';\nimport { useSession } from '../session/session.hooks';\nimport React from 'react';\n\nexport interface PanelFooterProps {\n dividerProps?: DividerProps;\n listProps?: ListProps;\n listItemProps?: ListItemProps & { href?: string };\n listItemTextProps?: ListItemTextProps;\n}\n\nexport const PanelFooter: React.FC<PanelFooterProps> = ({\n dividerProps,\n listProps,\n listItemProps,\n listItemTextProps,\n}) => {\n const { config } = useSession();\n return (\n <List disablePadding {...listProps}>\n <PanelDivider {...dividerProps} />\n <PanelItem\n listItemProps={{\n onClick: () => handleLogout(config),\n secondaryAction: (\n <ListItemIcon sx={{ marginRight: theme.spacing(1.5), minWidth: 0 }}>\n <PowerSettingsNewIcon />\n </ListItemIcon>\n ),\n component: 'div',\n ...listItemProps,\n }}\n listItemTextProps={{\n primary: 'Cerrar sesión',\n primaryTypographyProps: { sx: { fontWeight: 'bold', fontSize: 18 } },\n ...listItemTextProps,\n }}\n />\n </List>\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PanelFooter.js","sources":["../../../../src/components/panel/PanelFooter.tsx"],"sourcesContent":["'use client';\nimport {\n DividerProps,\n List,\n ListItemIcon,\n ListItemProps,\n ListItemTextProps,\n ListProps,\n} from '@mui/material';\nimport { PanelDivider } from './PanelDivider';\nimport { PanelItem } from './PanelItem';\nimport { theme } from '../../shared/mui/theme';\nimport PowerSettingsNewIcon from '@mui/icons-material/PowerSettingsNew';\nimport { handleLogout } from './panel.actions';\nimport { useSession } from '../session/session.hooks';\nimport React from 'react';\n\nexport interface PanelFooterProps {\n dividerProps?: DividerProps;\n listProps?: ListProps;\n listItemProps?: ListItemProps & { href?: string };\n listItemTextProps?: ListItemTextProps;\n}\n\nexport const PanelFooter: React.FC<PanelFooterProps> = ({\n dividerProps,\n listProps,\n listItemProps,\n listItemTextProps,\n}) => {\n const { config } = useSession();\n return (\n <List disablePadding {...listProps}>\n <PanelDivider {...dividerProps} />\n <PanelItem\n listItemProps={{\n onClick: () => handleLogout(config),\n secondaryAction: (\n <ListItemIcon sx={{ marginRight: theme.spacing(1.5), minWidth: 0 }}>\n <PowerSettingsNewIcon />\n </ListItemIcon>\n ),\n component: 'div',\n ...listItemProps,\n }}\n listItemTextProps={{\n primary: 'Cerrar sesión',\n primaryTypographyProps: { sx: { fontWeight: 'bold', fontSize: 18 } },\n ...listItemTextProps,\n }}\n />\n </List>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAwBO;AAML;AACA;AAKQ;;AAMA;AACA;AACD;AAEC;AACA;AACA;;AAKV;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelHeader.js","sources":["../../../../src/components/panel/PanelHeader.tsx"],"sourcesContent":["'use client';\nimport React from 'react';\nimport { BoxProps, Box } from '@mui/material';\n\nexport interface PanelHeaderProps {\n containerProps?: BoxProps;\n imageProps?: React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;\n}\n\nexport const PanelHeader: React.FC<PanelHeaderProps> = ({\n imageProps = {},\n containerProps = {},\n}) => {\n return (\n <Box {...containerProps}>\n <img {...imageProps} alt={imageProps?.alt} />\n </Box>\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PanelHeader.js","sources":["../../../../src/components/panel/PanelHeader.tsx"],"sourcesContent":["'use client';\nimport React from 'react';\nimport { BoxProps, Box } from '@mui/material';\n\nexport interface PanelHeaderProps {\n containerProps?: BoxProps;\n imageProps?: React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;\n}\n\nexport const PanelHeader: React.FC<PanelHeaderProps> = ({\n imageProps = {},\n containerProps = {},\n}) => {\n return (\n <Box {...containerProps}>\n <img {...imageProps} alt={imageProps?.alt} />\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;AASO;AAIL;AAKF;;"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
require('react');
|
|
6
5
|
var ArrowForwardIos = require('../../node_modules/@mui/icons-material/esm/ArrowForwardIos.js');
|
|
7
6
|
var theme = require('../../shared/mui/theme.js');
|
|
8
7
|
var ListItem = require('../../node_modules/@mui/material/esm/ListItem/ListItem.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelItem.js","sources":["../../../../src/components/panel/PanelItem.tsx"],"sourcesContent":["'use client'\nimport React from 'react';\nimport {\n ListItem,\n ListItemButton,\n ListItemText,\n IconButton,\n ListItemProps,\n ListItemTextProps,\n} from '@mui/material';\nimport ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos';\nimport { theme } from '../../shared/mui/theme';\n\nexport interface PanelItemProps {\n listItemProps?: ListItemProps & { href?: string };\n listItemTextProps?: ListItemTextProps;\n}\n\nexport const PanelItem: React.FC<PanelItemProps> = ({ listItemProps, listItemTextProps }) => {\n return (\n <ListItem\n disablePadding\n component=\"a\"\n secondaryAction={\n <IconButton>\n <ArrowForwardIosIcon fontSize=\"small\" />\n </IconButton>\n }\n {...listItemProps}>\n <ListItemButton sx={{ alignItems: 'center', paddingLeft: theme.spacing(1.5) }}>\n <ListItemText {...listItemTextProps} />\n </ListItemButton>\n </ListItem>\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PanelItem.js","sources":["../../../../src/components/panel/PanelItem.tsx"],"sourcesContent":["'use client'\nimport React from 'react';\nimport {\n ListItem,\n ListItemButton,\n ListItemText,\n IconButton,\n ListItemProps,\n ListItemTextProps,\n} from '@mui/material';\nimport ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos';\nimport { theme } from '../../shared/mui/theme';\n\nexport interface PanelItemProps {\n listItemProps?: ListItemProps & { href?: string };\n listItemTextProps?: ListItemTextProps;\n}\n\nexport const PanelItem: React.FC<PanelItemProps> = ({ listItemProps, listItemTextProps }) => {\n return (\n <ListItem\n disablePadding\n component=\"a\"\n secondaryAction={\n <IconButton>\n <ArrowForwardIosIcon fontSize=\"small\" />\n </IconButton>\n }\n {...listItemProps}>\n <ListItemButton sx={{ alignItems: 'center', paddingLeft: theme.spacing(1.5) }}>\n <ListItemText {...listItemTextProps} />\n </ListItemButton>\n </ListItem>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAkBO;;AAgBP;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelListItems.js","sources":["../../../../src/components/panel/PanelListItems.tsx"],"sourcesContent":["'use client';\nimport React from 'react';\nimport {\n ListProps,\n Box,\n Typography,\n DividerProps,\n BoxProps,\n List,\n TypographyProps,\n} from '@mui/material';\nimport { PanelDivider } from './PanelDivider';\nimport { theme } from '../../shared/mui/theme';\nimport { PanelListRoute } from './panel.types';\nimport { PanelItem } from './PanelItem';\n\nexport interface PanelListItems {\n dividerProps?: DividerProps;\n containerProps?: BoxProps;\n listProps?: ListProps;\n routes?: PanelListRoute[];\n titleProps?: TypographyProps;\n title?: string;\n}\n\nexport const PanelListItems: React.FC<PanelListItems> = ({\n dividerProps,\n containerProps,\n listProps,\n titleProps,\n routes = [],\n title = 'Title',\n}) => {\n return (\n <Box {...containerProps}>\n {title ? (\n <>\n <Typography\n px={1.5}\n mb={1}\n lineHeight={1.2}\n fontWeight=\"bold\"\n fontSize={16}\n {...titleProps}>\n {title}\n </Typography>\n <PanelDivider {...dividerProps} />\n </>\n ) : null}\n\n <List disablePadding sx={{ marginBottom: theme.spacing(1) }} {...listProps}>\n {routes.map((route, index) => (\n <PanelItem\n key={index}\n listItemProps={{\n href: route.path,\n }}\n listItemTextProps={{\n primary: route.name,\n primaryTypographyProps: { sx: { fontWeight: 400, fontSize: 16 } },\n }}\n />\n ))}\n </List>\n </Box>\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PanelListItems.js","sources":["../../../../src/components/panel/PanelListItems.tsx"],"sourcesContent":["'use client';\nimport React from 'react';\nimport {\n ListProps,\n Box,\n Typography,\n DividerProps,\n BoxProps,\n List,\n TypographyProps,\n} from '@mui/material';\nimport { PanelDivider } from './PanelDivider';\nimport { theme } from '../../shared/mui/theme';\nimport { PanelListRoute } from './panel.types';\nimport { PanelItem } from './PanelItem';\n\nexport interface PanelListItems {\n dividerProps?: DividerProps;\n containerProps?: BoxProps;\n listProps?: ListProps;\n routes?: PanelListRoute[];\n titleProps?: TypographyProps;\n title?: string;\n}\n\nexport const PanelListItems: React.FC<PanelListItems> = ({\n dividerProps,\n containerProps,\n listProps,\n titleProps,\n routes = [],\n title = 'Title',\n}) => {\n return (\n <Box {...containerProps}>\n {title ? (\n <>\n <Typography\n px={1.5}\n mb={1}\n lineHeight={1.2}\n fontWeight=\"bold\"\n fontSize={16}\n {...titleProps}>\n {title}\n </Typography>\n <PanelDivider {...dividerProps} />\n </>\n ) : null}\n\n <List disablePadding sx={{ marginBottom: theme.spacing(1) }} {...listProps}>\n {routes.map((route, index) => (\n <PanelItem\n key={index}\n listItemProps={{\n href: route.path,\n }}\n listItemTextProps={{\n primary: route.name,\n primaryTypographyProps: { sx: { fontWeight: 400, fontSize: 16 } },\n }}\n />\n ))}\n </List>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAiCE;;AAuBW;;AAGC;AACD;AAMb;;"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
require('react');
|
|
5
4
|
var SessionUserProvider = require('./SessionUserProvider.js');
|
|
6
5
|
var session_server_actions = require('./session.server.actions.js');
|
|
7
6
|
var appRouterV13 = require('../../node_modules/@mui/material-nextjs/esm/v13-appRouter/appRouterV13.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionProvider.js","sources":["../../../../src/components/session/SessionProvider.tsx"],"sourcesContent":["import React from 'react';\nimport { Config } from '../../config/config.types';\nimport { SessionUserProvider } from './SessionUserProvider';\nimport { AppRouterCacheProvider } from '@mui/material-nextjs/v15-appRouter';\nimport { getUserServer } from './session.server.actions';\n\ntype SessionProviderProps = {\n children: React.ReactNode;\n config: Config;\n};\n\nexport const SessionProvider: React.FC<SessionProviderProps> = async ({ children, config }) => {\n const user = await getUserServer(config);\n console.log({ user });\n return (\n <AppRouterCacheProvider>\n <SessionUserProvider initial={user} config={config}>\n {children}\n </SessionUserProvider>\n </AppRouterCacheProvider>\n );\n};\n"],"names":["getUserServer","_jsx","AppRouterCacheProvider","SessionUserProvider"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SessionProvider.js","sources":["../../../../src/components/session/SessionProvider.tsx"],"sourcesContent":["import React from 'react';\nimport { Config } from '../../config/config.types';\nimport { SessionUserProvider } from './SessionUserProvider';\nimport { AppRouterCacheProvider } from '@mui/material-nextjs/v15-appRouter';\nimport { getUserServer } from './session.server.actions';\n\ntype SessionProviderProps = {\n children: React.ReactNode;\n config: Config;\n};\n\nexport const SessionProvider: React.FC<SessionProviderProps> = async ({ children, config }) => {\n const user = await getUserServer(config);\n console.log({ user });\n return (\n <AppRouterCacheProvider>\n <SessionUserProvider initial={user} config={config}>\n {children}\n </SessionUserProvider>\n </AppRouterCacheProvider>\n );\n};\n"],"names":["getUserServer","_jsx","AppRouterCacheProvider","SessionUserProvider"],"mappings":";;;;;;;AAWO,MAAM,eAAe,GAAmC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAI;AAC5F,IAAA,MAAM,IAAI,GAAG,MAAMA,oCAAa,CAAC,MAAM,CAAC;AACxC,IAAA,OAAO,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC;AACrB,IAAA,QACEC,cAAA,CAACC,oBAAsB,cACrBD,cAAA,CAACE,uCAAmB,IAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAA,QAAA,EAC/C,QAAQ,EAAA,CACW,EAAA,CACC;AAE7B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionUserContext.js","sources":["../../../../src/components/session/SessionUserContext.tsx"],"sourcesContent":["'use client'\nimport { createContext } from 'react';\n\nimport { SessionContextDefaultValues } from './session.types';\nimport { DEFAULT_USER_CONTEXT } from './session.constants';\n\nexport const Context = createContext<SessionContextDefaultValues>(DEFAULT_USER_CONTEXT);\n\nexport const { Provider } = Context;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SessionUserContext.js","sources":["../../../../src/components/session/SessionUserContext.tsx"],"sourcesContent":["'use client'\nimport { createContext } from 'react';\n\nimport { SessionContextDefaultValues } from './session.types';\nimport { DEFAULT_USER_CONTEXT } from './session.constants';\n\nexport const Context = createContext<SessionContextDefaultValues>(DEFAULT_USER_CONTEXT);\n\nexport const { Provider } = Context;\n"],"names":[],"mappings":";;;;;;;AAQO;;;"}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var React = require('react');
|
|
6
|
-
require('../../shared/types/generated.js');
|
|
7
6
|
var SessionUserContext = require('./SessionUserContext.js');
|
|
8
7
|
var theme = require('../../shared/mui/theme.js');
|
|
9
8
|
var ThemeProvider = require('../../node_modules/@mui/material/esm/styles/ThemeProvider.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionUserProvider.js","sources":["../../../../src/components/session/SessionUserProvider.tsx"],"sourcesContent":["'use client';\nimport React, { useState } from 'react';\nimport { User } from '../../shared/types/generated';\nimport { Provider } from './SessionUserContext';\nimport { SessionContextDefaultValues } from './session.types';\nimport { Config } from '../../config/config.types';\nimport { ThemeProvider } from '@mui/material/styles';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport { theme } from '../../shared/mui/theme';\n\ntype SessionUserProviderProps = {\n children: React.ReactNode;\n initial: User | null | undefined;\n config: Config;\n};\n\nexport const SessionUserProvider: React.FC<SessionUserProviderProps> = ({\n children,\n initial,\n config,\n}) => {\n const [user] = useState<User | null | undefined>(initial);\n\n const values: SessionContextDefaultValues = {\n user,\n config,\n subscription: { id: 1 },\n };\n return (\n <Provider value={values}>\n <ThemeProvider theme={theme}>\n <CssBaseline />\n\n {children}\n </ThemeProvider>\n </Provider>\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SessionUserProvider.js","sources":["../../../../src/components/session/SessionUserProvider.tsx"],"sourcesContent":["'use client';\nimport React, { useState } from 'react';\nimport { User } from '../../shared/types/generated';\nimport { Provider } from './SessionUserContext';\nimport { SessionContextDefaultValues } from './session.types';\nimport { Config } from '../../config/config.types';\nimport { ThemeProvider } from '@mui/material/styles';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport { theme } from '../../shared/mui/theme';\n\ntype SessionUserProviderProps = {\n children: React.ReactNode;\n initial: User | null | undefined;\n config: Config;\n};\n\nexport const SessionUserProvider: React.FC<SessionUserProviderProps> = ({\n children,\n initial,\n config,\n}) => {\n const [user] = useState<User | null | undefined>(initial);\n\n const values: SessionContextDefaultValues = {\n user,\n config,\n subscription: { id: 1 },\n };\n return (\n <Provider value={values}>\n <ThemeProvider theme={theme}>\n <CssBaseline />\n\n {children}\n </ThemeProvider>\n </Provider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AAgBO;;AAOL;;;AAGE;;;AAWJ;;"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var utils = require('./utils.js');
|
|
4
|
+
|
|
5
|
+
function defaultFormatMessage(errors) {
|
|
6
|
+
return errors.map((e) => e.message || "Error message not found.").join("\n");
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Fatal transport-level errors returned when executing a subscription using the
|
|
10
|
+
* multipart HTTP subscription protocol. See the documentation on the
|
|
11
|
+
* [multipart HTTP protocol for GraphQL Subscriptions](https://www.apollographql.com/docs/graphos/routing/operations/subscriptions/multipart-protocol) for more information on these errors.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
*
|
|
15
|
+
* These errors indicate issues with the subscription transport itself, rather
|
|
16
|
+
* than GraphQL-level errors. They typically occur when there are problems
|
|
17
|
+
* communicating with subgraphs from the Apollo Router.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { CombinedProtocolErrors } from "@apollo/client/errors";
|
|
23
|
+
*
|
|
24
|
+
* // Check if an error is a CombinedProtocolErrors instance
|
|
25
|
+
* if (CombinedProtocolErrors.is(error)) {
|
|
26
|
+
* // Access individual protocol errors
|
|
27
|
+
* error.errors.forEach((protocolError) => {
|
|
28
|
+
* console.log(protocolError.message);
|
|
29
|
+
* console.log(protocolError.extensions);
|
|
30
|
+
* });
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
class CombinedProtocolErrors extends Error {
|
|
35
|
+
/**
|
|
36
|
+
* A method that determines whether an error is a `CombinedProtocolErrors`
|
|
37
|
+
* object. This method enables TypeScript to narrow the error type.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
*
|
|
41
|
+
* ```ts
|
|
42
|
+
* if (CombinedProtocolErrors.is(error)) {
|
|
43
|
+
* // TypeScript now knows `error` is a CombinedProtocolErrors object
|
|
44
|
+
* console.log(error.errors);
|
|
45
|
+
* }
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
static is(error) {
|
|
49
|
+
return utils.isBranded(error, "CombinedProtocolErrors");
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* A function that formats the error message used for the error's `message`
|
|
53
|
+
* property. Override this method to provide your own formatting.
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
*
|
|
57
|
+
* The `formatMessage` function is called by the `CombinedProtocolErrors`
|
|
58
|
+
* constructor to provide a formatted message as the `message` property of the
|
|
59
|
+
* `CombinedProtocolErrors` object. Follow the ["Providing a custom message
|
|
60
|
+
* formatter"](https://www.apollographql.com/docs/react/api/errors/CombinedProtocolErrors#providing-a-custom-message-formatter) guide to learn how to modify the message format.
|
|
61
|
+
*
|
|
62
|
+
* @param errors - The array of GraphQL errors returned from the server in the
|
|
63
|
+
* `errors` field of the response.
|
|
64
|
+
* @param options - Additional context that could be useful when formatting
|
|
65
|
+
* the message.
|
|
66
|
+
*/
|
|
67
|
+
static formatMessage = defaultFormatMessage;
|
|
68
|
+
/**
|
|
69
|
+
* The raw list of errors returned by the top-level `errors` field in the
|
|
70
|
+
* multipart HTTP subscription response.
|
|
71
|
+
*/
|
|
72
|
+
errors;
|
|
73
|
+
constructor(protocolErrors) {
|
|
74
|
+
super(CombinedProtocolErrors.formatMessage(protocolErrors, {
|
|
75
|
+
defaultFormatMessage,
|
|
76
|
+
}));
|
|
77
|
+
this.name = "CombinedProtocolErrors";
|
|
78
|
+
this.errors = protocolErrors;
|
|
79
|
+
utils.brand(this);
|
|
80
|
+
Object.setPrototypeOf(this, CombinedProtocolErrors.prototype);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
exports.CombinedProtocolErrors = CombinedProtocolErrors;
|
|
85
|
+
//# sourceMappingURL=CombinedProtocolErrors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CombinedProtocolErrors.js","sources":["../../../../../../node_modules/@apollo/client/errors/CombinedProtocolErrors.js"],"sourcesContent":["import { brand, isBranded } from \"./utils.js\";\nfunction defaultFormatMessage(errors) {\n return errors.map((e) => e.message || \"Error message not found.\").join(\"\\n\");\n}\n/**\n * Fatal transport-level errors returned when executing a subscription using the\n * multipart HTTP subscription protocol. See the documentation on the\n * [multipart HTTP protocol for GraphQL Subscriptions](https://www.apollographql.com/docs/graphos/routing/operations/subscriptions/multipart-protocol) for more information on these errors.\n *\n * @remarks\n *\n * These errors indicate issues with the subscription transport itself, rather\n * than GraphQL-level errors. They typically occur when there are problems\n * communicating with subgraphs from the Apollo Router.\n *\n * @example\n *\n * ```ts\n * import { CombinedProtocolErrors } from \"@apollo/client/errors\";\n *\n * // Check if an error is a CombinedProtocolErrors instance\n * if (CombinedProtocolErrors.is(error)) {\n * // Access individual protocol errors\n * error.errors.forEach((protocolError) => {\n * console.log(protocolError.message);\n * console.log(protocolError.extensions);\n * });\n * }\n * ```\n */\nexport class CombinedProtocolErrors extends Error {\n /**\n * A method that determines whether an error is a `CombinedProtocolErrors`\n * object. This method enables TypeScript to narrow the error type.\n *\n * @example\n *\n * ```ts\n * if (CombinedProtocolErrors.is(error)) {\n * // TypeScript now knows `error` is a CombinedProtocolErrors object\n * console.log(error.errors);\n * }\n * ```\n */\n static is(error) {\n return isBranded(error, \"CombinedProtocolErrors\");\n }\n /**\n * A function that formats the error message used for the error's `message`\n * property. Override this method to provide your own formatting.\n * \n * @remarks\n * \n * The `formatMessage` function is called by the `CombinedProtocolErrors`\n * constructor to provide a formatted message as the `message` property of the\n * `CombinedProtocolErrors` object. Follow the [\"Providing a custom message\n * formatter\"](https://www.apollographql.com/docs/react/api/errors/CombinedProtocolErrors#providing-a-custom-message-formatter) guide to learn how to modify the message format.\n * \n * @param errors - The array of GraphQL errors returned from the server in the\n * `errors` field of the response.\n * @param options - Additional context that could be useful when formatting\n * the message.\n */\n static formatMessage = defaultFormatMessage;\n /**\n * The raw list of errors returned by the top-level `errors` field in the\n * multipart HTTP subscription response.\n */\n errors;\n constructor(protocolErrors) {\n super(CombinedProtocolErrors.formatMessage(protocolErrors, {\n defaultFormatMessage,\n }));\n this.name = \"CombinedProtocolErrors\";\n this.errors = protocolErrors;\n brand(this);\n Object.setPrototypeOf(this, CombinedProtocolErrors.prototype);\n }\n}\n//# sourceMappingURL=CombinedProtocolErrors.js.map\n"],"names":["isBranded","brand"],"mappings":";;;;AACA,SAAS,oBAAoB,CAAC,MAAM,EAAE;AACtC,IAAI,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,IAAI,0BAA0B,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,sBAAsB,SAAS,KAAK,CAAC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,EAAE,CAAC,KAAK,EAAE;AACrB,QAAQ,OAAOA,eAAS,CAAC,KAAK,EAAE,wBAAwB,CAAC;AACzD,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,aAAa,GAAG,oBAAoB;AAC/C;AACA;AACA;AACA;AACA,IAAI,MAAM;AACV,IAAI,WAAW,CAAC,cAAc,EAAE;AAChC,QAAQ,KAAK,CAAC,sBAAsB,CAAC,aAAa,CAAC,cAAc,EAAE;AACnE,YAAY,oBAAoB;AAChC,SAAS,CAAC,CAAC;AACX,QAAQ,IAAI,CAAC,IAAI,GAAG,wBAAwB;AAC5C,QAAQ,IAAI,CAAC,MAAM,GAAG,cAAc;AACpC,QAAQC,WAAK,CAAC,IAAI,CAAC;AACnB,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,sBAAsB,CAAC,SAAS,CAAC;AACrE,IAAI;AACJ;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var utils = require('./utils.js');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Represents an error when a non-200 HTTP status code is returned from the
|
|
7
|
+
* server according to the [GraphQL Over HTTP specification](https://graphql.github.io/graphql-over-http/draft/). This error
|
|
8
|
+
* contains the full server response, including status code and body text.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
*
|
|
12
|
+
* This error occurs when your GraphQL server responds with an HTTP status code
|
|
13
|
+
* other than 200 (such as 4xx or 5xx status codes) with any media type other
|
|
14
|
+
* than [`application/graphql-response+json`](https://graphql.github.io/graphql-over-http/draft/#sec-application-graphql-response-json).
|
|
15
|
+
*
|
|
16
|
+
* Servers that return non-200 status codes with other media types are not
|
|
17
|
+
* guaranteed to contain a well-formed GraphQL response and may indicate issues
|
|
18
|
+
* at the HTTP level, such as authentication failures, server unavailability,
|
|
19
|
+
* or other HTTP-level problems.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
*
|
|
23
|
+
* ```ts
|
|
24
|
+
* import { ServerError } from "@apollo/client/errors";
|
|
25
|
+
*
|
|
26
|
+
* // Check if an error is a ServerError instance
|
|
27
|
+
* if (ServerError.is(error)) {
|
|
28
|
+
* console.log(`Server returned status: ${error.statusCode}`);
|
|
29
|
+
* console.log(`Response body: ${error.bodyText}`);
|
|
30
|
+
*
|
|
31
|
+
* // Handle specific status codes
|
|
32
|
+
* if (error.statusCode === 401) {
|
|
33
|
+
* // Handle unauthorized access
|
|
34
|
+
* }
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
class ServerError extends Error {
|
|
39
|
+
/**
|
|
40
|
+
* A method that determines whether an error is a `ServerError` object. This
|
|
41
|
+
* method enables TypeScript to narrow the error type.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
*
|
|
45
|
+
* ```ts
|
|
46
|
+
* if (ServerError.is(error)) {
|
|
47
|
+
* // TypeScript now knows `error` is a ServerError object
|
|
48
|
+
* console.log(error.errors);
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
static is(error) {
|
|
53
|
+
return utils.isBranded(error, "ServerError");
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The raw [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) object provided by the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
|
|
57
|
+
*/
|
|
58
|
+
response;
|
|
59
|
+
/**
|
|
60
|
+
* The status code returned by the server in the response. This is provided as
|
|
61
|
+
* a shortcut for `response.status`.
|
|
62
|
+
*/
|
|
63
|
+
statusCode;
|
|
64
|
+
/**
|
|
65
|
+
* The raw response body text.
|
|
66
|
+
*/
|
|
67
|
+
bodyText;
|
|
68
|
+
constructor(message, options) {
|
|
69
|
+
super(message);
|
|
70
|
+
this.name = "ServerError";
|
|
71
|
+
this.response = options.response;
|
|
72
|
+
this.statusCode = options.response.status;
|
|
73
|
+
this.bodyText = options.bodyText;
|
|
74
|
+
utils.brand(this);
|
|
75
|
+
Object.setPrototypeOf(this, ServerError.prototype);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
exports.ServerError = ServerError;
|
|
80
|
+
//# sourceMappingURL=ServerError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerError.js","sources":["../../../../../../node_modules/@apollo/client/errors/ServerError.js"],"sourcesContent":["import { brand, isBranded } from \"./utils.js\";\n/**\n * Represents an error when a non-200 HTTP status code is returned from the\n * server according to the [GraphQL Over HTTP specification](https://graphql.github.io/graphql-over-http/draft/). This error\n * contains the full server response, including status code and body text.\n *\n * @remarks\n *\n * This error occurs when your GraphQL server responds with an HTTP status code\n * other than 200 (such as 4xx or 5xx status codes) with any media type other\n * than [`application/graphql-response+json`](https://graphql.github.io/graphql-over-http/draft/#sec-application-graphql-response-json).\n *\n * Servers that return non-200 status codes with other media types are not\n * guaranteed to contain a well-formed GraphQL response and may indicate issues\n * at the HTTP level, such as authentication failures, server unavailability,\n * or other HTTP-level problems.\n *\n * @example\n *\n * ```ts\n * import { ServerError } from \"@apollo/client/errors\";\n *\n * // Check if an error is a ServerError instance\n * if (ServerError.is(error)) {\n * console.log(`Server returned status: ${error.statusCode}`);\n * console.log(`Response body: ${error.bodyText}`);\n *\n * // Handle specific status codes\n * if (error.statusCode === 401) {\n * // Handle unauthorized access\n * }\n * }\n * ```\n */\nexport class ServerError extends Error {\n /**\n * A method that determines whether an error is a `ServerError` object. This\n * method enables TypeScript to narrow the error type.\n *\n * @example\n *\n * ```ts\n * if (ServerError.is(error)) {\n * // TypeScript now knows `error` is a ServerError object\n * console.log(error.errors);\n * }\n * ```\n */\n static is(error) {\n return isBranded(error, \"ServerError\");\n }\n /**\n * The raw [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) object provided by the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).\n */\n response;\n /**\n * The status code returned by the server in the response. This is provided as\n * a shortcut for `response.status`.\n */\n statusCode;\n /**\n * The raw response body text.\n */\n bodyText;\n constructor(message, options) {\n super(message);\n this.name = \"ServerError\";\n this.response = options.response;\n this.statusCode = options.response.status;\n this.bodyText = options.bodyText;\n brand(this);\n Object.setPrototypeOf(this, ServerError.prototype);\n }\n}\n//# sourceMappingURL=ServerError.js.map\n"],"names":["isBranded","brand"],"mappings":";;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,WAAW,SAAS,KAAK,CAAC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,EAAE,CAAC,KAAK,EAAE;AACrB,QAAQ,OAAOA,eAAS,CAAC,KAAK,EAAE,aAAa,CAAC;AAC9C,IAAI;AACJ;AACA;AACA;AACA,IAAI,QAAQ;AACZ;AACA;AACA;AACA;AACA,IAAI,UAAU;AACd;AACA;AACA;AACA,IAAI,QAAQ;AACZ,IAAI,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE;AAClC,QAAQ,KAAK,CAAC,OAAO,CAAC;AACtB,QAAQ,IAAI,CAAC,IAAI,GAAG,aAAa;AACjC,QAAQ,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ;AACxC,QAAQ,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM;AACjD,QAAQ,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ;AACxC,QAAQC,WAAK,CAAC,IAAI,CAAC;AACnB,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,CAAC,SAAS,CAAC;AAC1D,IAAI;AACJ;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var utils = require('./utils.js');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Represents a failure to parse the response as JSON from the server. This
|
|
7
|
+
* error helps debug issues where the server returns malformed JSON or non-JSON
|
|
8
|
+
* content.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
*
|
|
12
|
+
* This error occurs when Apollo Client receives a response from the server but
|
|
13
|
+
* cannot parse it as valid JSON. This typically happens when the server returns
|
|
14
|
+
* HTML error pages, plain text responses, or malformed JSON instead of the
|
|
15
|
+
* expected GraphQL JSON response format.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
*
|
|
19
|
+
* ```ts
|
|
20
|
+
* import { ServerParseError } from "@apollo/client/errors";
|
|
21
|
+
*
|
|
22
|
+
* // Check if an error is a ServerParseError instance
|
|
23
|
+
* if (ServerParseError.is(error)) {
|
|
24
|
+
* console.log(`Failed to parse response from ${error.response.url}`);
|
|
25
|
+
* console.log(`Raw response: ${error.bodyText}`);
|
|
26
|
+
* console.log(`Status code: ${error.statusCode}`);
|
|
27
|
+
*
|
|
28
|
+
* // Access the original parse error
|
|
29
|
+
* console.log(`Parse error: ${error.cause}`);
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
class ServerParseError extends Error {
|
|
34
|
+
/**
|
|
35
|
+
* A method that determines whether an error is a `ServerParseError`
|
|
36
|
+
* object. This method enables TypeScript to narrow the error type.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
*
|
|
40
|
+
* ```ts
|
|
41
|
+
* if (ServerParseError.is(error)) {
|
|
42
|
+
* // TypeScript now knows `error` is a ServerParseError object
|
|
43
|
+
* console.log(error.statusCode);
|
|
44
|
+
* }
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
static is(error) {
|
|
48
|
+
return utils.isBranded(error, "ServerParseError");
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The raw [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) object provided by the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
|
|
52
|
+
*/
|
|
53
|
+
response;
|
|
54
|
+
/**
|
|
55
|
+
* The status code returned by the server in the response. This is provided
|
|
56
|
+
* as a shortcut for `response.status`.
|
|
57
|
+
*/
|
|
58
|
+
statusCode;
|
|
59
|
+
/**
|
|
60
|
+
* The raw response body text.
|
|
61
|
+
*/
|
|
62
|
+
bodyText;
|
|
63
|
+
constructor(originalParseError, options) {
|
|
64
|
+
super(originalParseError instanceof Error ?
|
|
65
|
+
originalParseError.message
|
|
66
|
+
: "Could not parse server response", { cause: originalParseError });
|
|
67
|
+
this.name = "ServerParseError";
|
|
68
|
+
this.response = options.response;
|
|
69
|
+
this.statusCode = options.response.status;
|
|
70
|
+
this.bodyText = options.bodyText;
|
|
71
|
+
utils.brand(this);
|
|
72
|
+
Object.setPrototypeOf(this, ServerParseError.prototype);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
exports.ServerParseError = ServerParseError;
|
|
77
|
+
//# sourceMappingURL=ServerParseError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerParseError.js","sources":["../../../../../../node_modules/@apollo/client/errors/ServerParseError.js"],"sourcesContent":["import { brand, isBranded } from \"./utils.js\";\n/**\n * Represents a failure to parse the response as JSON from the server. This\n * error helps debug issues where the server returns malformed JSON or non-JSON\n * content.\n *\n * @remarks\n *\n * This error occurs when Apollo Client receives a response from the server but\n * cannot parse it as valid JSON. This typically happens when the server returns\n * HTML error pages, plain text responses, or malformed JSON instead of the\n * expected GraphQL JSON response format.\n *\n * @example\n *\n * ```ts\n * import { ServerParseError } from \"@apollo/client/errors\";\n *\n * // Check if an error is a ServerParseError instance\n * if (ServerParseError.is(error)) {\n * console.log(`Failed to parse response from ${error.response.url}`);\n * console.log(`Raw response: ${error.bodyText}`);\n * console.log(`Status code: ${error.statusCode}`);\n *\n * // Access the original parse error\n * console.log(`Parse error: ${error.cause}`);\n * }\n * ```\n */\nexport class ServerParseError extends Error {\n /**\n * A method that determines whether an error is a `ServerParseError`\n * object. This method enables TypeScript to narrow the error type.\n *\n * @example\n *\n * ```ts\n * if (ServerParseError.is(error)) {\n * // TypeScript now knows `error` is a ServerParseError object\n * console.log(error.statusCode);\n * }\n * ```\n */\n static is(error) {\n return isBranded(error, \"ServerParseError\");\n }\n /**\n * The raw [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) object provided by the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).\n */\n response;\n /**\n * The status code returned by the server in the response. This is provided\n * as a shortcut for `response.status`.\n */\n statusCode;\n /**\n * The raw response body text.\n */\n bodyText;\n constructor(originalParseError, options) {\n super(originalParseError instanceof Error ?\n originalParseError.message\n : \"Could not parse server response\", { cause: originalParseError });\n this.name = \"ServerParseError\";\n this.response = options.response;\n this.statusCode = options.response.status;\n this.bodyText = options.bodyText;\n brand(this);\n Object.setPrototypeOf(this, ServerParseError.prototype);\n }\n}\n//# sourceMappingURL=ServerParseError.js.map\n"],"names":["isBranded","brand"],"mappings":";;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,gBAAgB,SAAS,KAAK,CAAC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,EAAE,CAAC,KAAK,EAAE;AACrB,QAAQ,OAAOA,eAAS,CAAC,KAAK,EAAE,kBAAkB,CAAC;AACnD,IAAI;AACJ;AACA;AACA;AACA,IAAI,QAAQ;AACZ;AACA;AACA;AACA;AACA,IAAI,UAAU;AACd;AACA;AACA;AACA,IAAI,QAAQ;AACZ,IAAI,WAAW,CAAC,kBAAkB,EAAE,OAAO,EAAE;AAC7C,QAAQ,KAAK,CAAC,kBAAkB,YAAY,KAAK;AACjD,YAAY,kBAAkB,CAAC;AAC/B,cAAc,iCAAiC,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAAC;AAC/E,QAAQ,IAAI,CAAC,IAAI,GAAG,kBAAkB;AACtC,QAAQ,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ;AACxC,QAAQ,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM;AACjD,QAAQ,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ;AACxC,QAAQC,WAAK,CAAC,IAAI,CAAC;AACnB,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,gBAAgB,CAAC,SAAS,CAAC;AAC/D,IAAI;AACJ;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// This Symbol allows us to pass transport-specific errors from the link chain
|
|
4
|
+
// into QueryManager/client internals without risking a naming collision within
|
|
5
|
+
// extensions (which implementers can use as they see fit).
|
|
6
|
+
const PROTOCOL_ERRORS_SYMBOL = Symbol();
|
|
7
|
+
|
|
8
|
+
exports.PROTOCOL_ERRORS_SYMBOL = PROTOCOL_ERRORS_SYMBOL;
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/@apollo/client/errors/index.js"],"sourcesContent":["import { CombinedProtocolErrors } from \"./CombinedProtocolErrors.js\";\nimport { isErrorLike } from \"./isErrorLike.js\";\nimport { UnconventionalError } from \"./UnconventionalError.js\";\n// This Symbol allows us to pass transport-specific errors from the link chain\n// into QueryManager/client internals without risking a naming collision within\n// extensions (which implementers can use as they see fit).\nexport const PROTOCOL_ERRORS_SYMBOL = Symbol();\nexport function graphQLResultHasProtocolErrors(result) {\n if (\"extensions\" in result) {\n return CombinedProtocolErrors.is(result.extensions[PROTOCOL_ERRORS_SYMBOL]);\n }\n return false;\n}\nexport function toErrorLike(error) {\n if (isErrorLike(error)) {\n return error;\n }\n if (typeof error === \"string\") {\n return new Error(error, { cause: error });\n }\n return new UnconventionalError(error);\n}\nexport { CombinedGraphQLErrors } from \"./CombinedGraphQLErrors.js\";\nexport { CombinedProtocolErrors } from \"./CombinedProtocolErrors.js\";\nexport { isErrorLike } from \"./isErrorLike.js\";\nexport { LinkError, registerLinkError } from \"./LinkError.js\";\nexport { LocalStateError } from \"./LocalStateError.js\";\nexport { ServerError } from \"./ServerError.js\";\nexport { ServerParseError } from \"./ServerParseError.js\";\nexport { UnconventionalError } from \"./UnconventionalError.js\";\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;AAGA;AACA;AACA;AACY,MAAC,sBAAsB,GAAG,MAAM;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function isBranded(error, name) {
|
|
4
|
+
return (typeof error === "object" &&
|
|
5
|
+
error !== null &&
|
|
6
|
+
error[Symbol.for("apollo.error")] === name);
|
|
7
|
+
}
|
|
8
|
+
function brand(error) {
|
|
9
|
+
Object.defineProperty(error, Symbol.for("apollo.error"), {
|
|
10
|
+
value: error.name,
|
|
11
|
+
enumerable: false,
|
|
12
|
+
writable: false,
|
|
13
|
+
configurable: false,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
exports.brand = brand;
|
|
18
|
+
exports.isBranded = isBranded;
|
|
19
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../node_modules/@apollo/client/errors/utils.js"],"sourcesContent":["export function isBranded(error, name) {\n return (typeof error === \"object\" &&\n error !== null &&\n error[Symbol.for(\"apollo.error\")] === name);\n}\nexport function brand(error) {\n Object.defineProperty(error, Symbol.for(\"apollo.error\"), {\n value: error.name,\n enumerable: false,\n writable: false,\n configurable: false,\n });\n}\n//# sourceMappingURL=utils.js.map"],"names":[],"mappings":";;AAAO,SAAS,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE;AACvC,IAAI,QAAQ,OAAO,KAAK,KAAK,QAAQ;AACrC,QAAQ,KAAK,KAAK,IAAI;AACtB,QAAQ,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,KAAK,IAAI;AAClD;AACO,SAAS,KAAK,CAAC,KAAK,EAAE;AAC7B,IAAI,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE;AAC7D,QAAQ,KAAK,EAAE,KAAK,CAAC,IAAI;AACzB,QAAQ,UAAU,EAAE,KAAK;AACzB,QAAQ,QAAQ,EAAE,KAAK;AACvB,QAAQ,YAAY,EAAE,KAAK;AAC3B,KAAK,CAAC;AACN;;;;;","x_google_ignoreList":[0]}
|