Project files
This commit is contained in:
22
receipeServer/frontend_old/node_modules/@apollo/react-hooks/LICENSE
generated
vendored
Normal file
22
receipeServer/frontend_old/node_modules/@apollo/react-hooks/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2019 Meteor Development Group, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
21
receipeServer/frontend_old/node_modules/@apollo/react-hooks/README.md
generated
vendored
Normal file
21
receipeServer/frontend_old/node_modules/@apollo/react-hooks/README.md
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# <a href="https://www.apollographql.com/"><img src="https://user-images.githubusercontent.com/841294/53402609-b97a2180-39ba-11e9-8100-812bab86357c.png" height="100" alt="React Apollo"></a>
|
||||
|
||||
## React Apollo - Hooks
|
||||
|
||||
[](https://badge.fury.io/js/%40apollo%2Freact-hooks)
|
||||
[](https://circleci.com/gh/apollographql/react-apollo)
|
||||
[](https://spectrum.chat/apollo)
|
||||
|
||||
React Apollo `useQuery`, `useLazyQuery`, `useMutation`, `useSubscription` and `useApolloClient` hooks.
|
||||
|
||||
### Installation
|
||||
|
||||
```
|
||||
npm install @apollo/react-hooks
|
||||
```
|
||||
|
||||
### Documentation
|
||||
|
||||
All Apollo Client documentation, including React Apollo usage articles and helpful recipes, lives on [https://www.apollographql.com/docs/react/](https://www.apollographql.com/docs/react/)
|
||||
|
||||
For the React Apollo API reference, visit [https://www.apollographql.com/docs/react/api/react-apollo.html](https://www.apollographql.com/docs/react/api/react-apollo.html)
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/index.d.ts
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@apollo/client';
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/index.esm.js
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/index.esm.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@apollo/client';
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/index.js
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('@apollo/client');
|
||||
22
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/LICENSE
generated
vendored
Normal file
22
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2021 Apollo Graph, Inc. (Formerly Meteor Development Group, Inc.)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
40
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/README.md
generated
vendored
Normal file
40
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/README.md
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
# <a href="https://www.apollographql.com/"><img src="https://user-images.githubusercontent.com/841294/53402609-b97a2180-39ba-11e9-8100-812bab86357c.png" height="100" alt="Apollo Client"></a>
|
||||
|
||||
## Apollo Client
|
||||
|
||||
[](https://badge.fury.io/js/%40apollo%2Fclient)
|
||||
[](https://circleci.com/gh/apollographql/apollo-client)
|
||||
[](https://community.apollographql.com)
|
||||
|
||||
Apollo Client is a fully-featured caching GraphQL client with integrations for React, Angular, and more. It allows you to easily build UI components that fetch data via GraphQL.
|
||||
|
||||
## Documentation
|
||||
|
||||
All Apollo Client documentation, including React integration articles and helpful recipes, can be found at: <br/>
|
||||
[https://www.apollographql.com/docs/react/](https://www.apollographql.com/docs/react/)
|
||||
|
||||
The Apollo Client API reference can be found at: <br/>
|
||||
[https://www.apollographql.com/docs/react/api/apollo-client/](https://www.apollographql.com/docs/react/api/apollo-client/)
|
||||
|
||||
Learn how to use Apollo Client with self-paced hands-on training on Odyssey, Apollo's official learning platform: <br/>
|
||||
[https://odyssey.apollographql.com/](https://odyssey.apollographql.com/)
|
||||
|
||||
## Maintainers
|
||||
|
||||
- [@benjamn](https://github.com/benjamn) (Apollo)
|
||||
- [@brainkim](https://github.com/brainkim) (Apollo)
|
||||
- [@jcreighton](https://github.com/jcreighton) (Netflix)
|
||||
- [@hwillson](https://github.com/hwillson) (Apollo)
|
||||
|
||||
## Who is Apollo?
|
||||
|
||||
[Apollo](https://apollographql.com/) builds open-source software and a graph platform to unify GraphQL across your apps and services. We help you ship faster with:
|
||||
|
||||
* [Apollo Studio](https://www.apollographql.com/studio/develop/) – A free, end-to-end platform for managing your GraphQL lifecycle. Track your GraphQL schemas in a hosted registry to create a source of truth for everything in your graph. Studio provides an IDE (Apollo Explorer) so you can explore data, collaborate on queries, observe usage, and safely make schema changes.
|
||||
* [Apollo Federation](https://www.apollographql.com/apollo-federation) – The industry-standard open architecture for building a distributed graph. Use Apollo’s gateway to compose a unified graph from multiple subgraphs, determine a query plan, and route requests across your services.
|
||||
* [Apollo Client](https://www.apollographql.com/apollo-client/) – The most popular GraphQL client for the web. Apollo also builds and maintains [Apollo iOS](https://github.com/apollographql/apollo-ios) and [Apollo Android](https://github.com/apollographql/apollo-android).
|
||||
* [Apollo Server](https://www.apollographql.com/docs/apollo-server/) – A production-ready JavaScript GraphQL server that connects to any microservice, API, or database. Compatible with all popular JavaScript frameworks and deployable in serverless environments.
|
||||
|
||||
## Learn how to build with Apollo
|
||||
|
||||
Check out the [Odyssey](https://odyssey.apollographql.com/) learning platform, the perfect place to start your GraphQL journey with videos and interactive code challenges. Join the [Apollo Community](https://community.apollographql.com/) to interact with and get technical help from the GraphQL community.
|
||||
6582
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/apollo-client.cjs
generated
vendored
Normal file
6582
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/apollo-client.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/apollo-client.cjs.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/apollo-client.cjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/apollo-client.min.cjs
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/apollo-client.min.cjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2289
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/cache.cjs
generated
vendored
Normal file
2289
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/cache.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/cache.cjs.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/cache.cjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
32
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/cache.d.ts
generated
vendored
Normal file
32
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/cache.d.ts
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import { DocumentNode } from 'graphql';
|
||||
import { StoreObject, Reference } from '../../utilities';
|
||||
import { DataProxy } from './types/DataProxy';
|
||||
import { Cache } from './types/Cache';
|
||||
export declare type Transaction<T> = (c: ApolloCache<T>) => void;
|
||||
export declare abstract class ApolloCache<TSerialized> implements DataProxy {
|
||||
abstract read<TData = any, TVariables = any>(query: Cache.ReadOptions<TVariables, TData>): TData | null;
|
||||
abstract write<TData = any, TVariables = any>(write: Cache.WriteOptions<TData, TVariables>): Reference | undefined;
|
||||
abstract diff<T>(query: Cache.DiffOptions): Cache.DiffResult<T>;
|
||||
abstract watch<TData = any, TVariables = any>(watch: Cache.WatchOptions<TData, TVariables>): () => void;
|
||||
abstract reset(options?: Cache.ResetOptions): Promise<void>;
|
||||
abstract evict(options: Cache.EvictOptions): boolean;
|
||||
abstract restore(serializedState: TSerialized): ApolloCache<TSerialized>;
|
||||
abstract extract(optimistic?: boolean): TSerialized;
|
||||
abstract removeOptimistic(id: string): void;
|
||||
batch<U>(options: Cache.BatchOptions<this, U>): U;
|
||||
abstract performTransaction(transaction: Transaction<TSerialized>, optimisticId?: string | null): void;
|
||||
recordOptimisticTransaction(transaction: Transaction<TSerialized>, optimisticId: string): void;
|
||||
transformDocument(document: DocumentNode): DocumentNode;
|
||||
identify(object: StoreObject | Reference): string | undefined;
|
||||
gc(): string[];
|
||||
modify(options: Cache.ModifyOptions): boolean;
|
||||
transformForLink(document: DocumentNode): DocumentNode;
|
||||
readQuery<QueryType, TVariables = any>(options: Cache.ReadQueryOptions<QueryType, TVariables>, optimistic?: boolean): QueryType | null;
|
||||
private getFragmentDoc;
|
||||
readFragment<FragmentType, TVariables = any>(options: Cache.ReadFragmentOptions<FragmentType, TVariables>, optimistic?: boolean): FragmentType | null;
|
||||
writeQuery<TData = any, TVariables = any>({ id, data, ...options }: Cache.WriteQueryOptions<TData, TVariables>): Reference | undefined;
|
||||
writeFragment<TData = any, TVariables = any>({ id, data, fragment, fragmentName, ...options }: Cache.WriteFragmentOptions<TData, TVariables>): Reference | undefined;
|
||||
updateQuery<TData = any, TVariables = any>(options: Cache.UpdateQueryOptions<TData, TVariables>, update: (data: TData | null) => TData | null | void): TData | null;
|
||||
updateFragment<TData = any, TVariables = any>(options: Cache.UpdateFragmentOptions<TData, TVariables>, update: (data: TData | null) => TData | null | void): TData | null;
|
||||
}
|
||||
//# sourceMappingURL=cache.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/cache.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/cache.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/cache/core/cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,OAAO,EACL,WAAW,EACX,SAAS,EAEV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,oBAAY,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AAEzD,8BAAsB,WAAW,CAAC,WAAW,CAAE,YAAW,SAAS;aAGjD,IAAI,CAAC,KAAK,GAAG,GAAG,EAAE,UAAU,GAAG,GAAG,EAChD,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,UAAU,EAAE,KAAK,CAAC,GAC1C,KAAK,GAAG,IAAI;aACC,KAAK,CAAC,KAAK,GAAG,GAAG,EAAE,UAAU,GAAG,GAAG,EACjD,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,UAAU,CAAC,GAC3C,SAAS,GAAG,SAAS;aACR,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;aACtD,KAAK,CAAC,KAAK,GAAG,GAAG,EAAE,UAAU,GAAG,GAAG,EACjD,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,UAAU,CAAC,GAC3C,MAAM,IAAI;aAIG,KAAK,CAAC,O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AAU,CAAC,KAAK,GAAG,GAAG,EAAE,UAAU,GAAG,GAAG,EAAE,EAC/C,EAAE,EACF,IAAI,EACJ,GAAG,OAAO,EACX,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,EAAE,UAAU,CAAC,GAAG,SAAS,GAAG,SAAS;IAO9D,aAAa,CAAC,KAAK,GAAG,GAAG,EAAE,UAAU,GAAG,GAAG,EAAE,EAClD,EAAE,EACF,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,GAAG,OAAO,EACX,EAAE,KAAK,CAAC,oBAAoB,CAAC,KAAK,EAAE,UAAU,CAAC,GAAG,SAAS,GAAG,SAAS;IAQjE,WAAW,CAAC,KAAK,GAAG,GAAG,EAAE,UAAU,GAAG,GAAG,EAC9C,OAAO,EAAE,KAAK,CAAC,kBAAkB,CAAC,KAAK,EAAE,UAAU,CAAC,EACpD,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,KAAK,KAAK,GAAG,IAAI,GAAG,IAAI,GAClD,KAAK,GAAG,IAAI;IAYR,cAAc,CAAC,KAAK,GAAG,GAAG,EAAE,UAAU,GAAG,GAAG,EACjD,OAAO,EAAE,KAAK,CAAC,qBAAqB,CAAC,KAAK,EAAE,UAAU,CAAC,EACvD,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,KAAK,KAAK,GAAG,IAAI,GAAG,IAAI,GAClD,KAAK,GAAG,IAAI;CAWhB"}
|
||||
84
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/cache.js
generated
vendored
Normal file
84
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/cache.js
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
import { __assign, __rest } from "tslib";
|
||||
import { wrap } from 'optimism';
|
||||
import { getFragmentQueryDocument, } from "../../utilities/index.js";
|
||||
var ApolloCache = (function () {
|
||||
function ApolloCache() {
|
||||
this.getFragmentDoc = wrap(getFragmentQueryDocument);
|
||||
}
|
||||
ApolloCache.prototype.batch = function (options) {
|
||||
var _this = this;
|
||||
var optimisticId = typeof options.optimistic === "string" ? options.optimistic :
|
||||
options.optimistic === false ? null : void 0;
|
||||
var updateResult;
|
||||
this.performTransaction(function () { return updateResult = options.update(_this); }, optimisticId);
|
||||
return updateResult;
|
||||
};
|
||||
ApolloCache.prototype.recordOptimisticTransaction = function (transaction, optimisticId) {
|
||||
this.performTransaction(transaction, optimisticId);
|
||||
};
|
||||
ApolloCache.prototype.transformDocument = function (document) {
|
||||
return document;
|
||||
};
|
||||
ApolloCache.prototype.identify = function (object) {
|
||||
return;
|
||||
};
|
||||
ApolloCache.prototype.gc = function () {
|
||||
return [];
|
||||
};
|
||||
ApolloCache.prototype.modify = function (options) {
|
||||
return false;
|
||||
};
|
||||
ApolloCache.prototype.transformForLink = function (document) {
|
||||
return document;
|
||||
};
|
||||
ApolloCache.prototype.readQuery = function (options, optimistic) {
|
||||
if (optimistic === void 0) { optimistic = !!options.optimistic; }
|
||||
return this.read(__assign(__assign({}, options), { rootId: options.id || 'ROOT_QUERY', optimistic: optimistic }));
|
||||
};
|
||||
ApolloCache.prototype.readFragment = function (options, optimistic) {
|
||||
if (optimistic === void 0) { optimistic = !!options.optimistic; }
|
||||
return this.read(__assign(__assign({}, options), { query: this.getFragmentDoc(options.fragment, options.fragmentName), rootId: options.id, optimistic: optimistic }));
|
||||
};
|
||||
ApolloCache.prototype.writeQuery = function (_a) {
|
||||
var id = _a.id, data = _a.data, options = __rest(_a, ["id", "data"]);
|
||||
return this.write(Object.assign(options, {
|
||||
dataId: id || 'ROOT_QUERY',
|
||||
result: data,
|
||||
}));
|
||||
};
|
||||
ApolloCache.prototype.writeFragment = function (_a) {
|
||||
var id = _a.id, data = _a.data, fragment = _a.fragment, fragmentName = _a.fragmentName, options = __rest(_a, ["id", "data", "fragment", "fragmentName"]);
|
||||
return this.write(Object.assign(options, {
|
||||
query: this.getFragmentDoc(fragment, fragmentName),
|
||||
dataId: id,
|
||||
result: data,
|
||||
}));
|
||||
};
|
||||
ApolloCache.prototype.updateQuery = function (options, update) {
|
||||
return this.batch({
|
||||
update: function (cache) {
|
||||
var value = cache.readQuery(options);
|
||||
var data = update(value);
|
||||
if (data === void 0 || data === null)
|
||||
return value;
|
||||
cache.writeQuery(__assign(__assign({}, options), { data: data }));
|
||||
return data;
|
||||
},
|
||||
});
|
||||
};
|
||||
ApolloCache.prototype.updateFragment = function (options, update) {
|
||||
return this.batch({
|
||||
update: function (cache) {
|
||||
var value = cache.readFragment(options);
|
||||
var data = update(value);
|
||||
if (data === void 0 || data === null)
|
||||
return value;
|
||||
cache.writeFragment(__assign(__assign({}, options), { data: data }));
|
||||
return data;
|
||||
},
|
||||
});
|
||||
};
|
||||
return ApolloCache;
|
||||
}());
|
||||
export { ApolloCache };
|
||||
//# sourceMappingURL=cache.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/cache.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/cache.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
55
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/Cache.d.ts
generated
vendored
Normal file
55
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/Cache.d.ts
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
import { DataProxy } from './DataProxy';
|
||||
import { Modifier, Modifiers } from './common';
|
||||
import { ApolloCache } from '../cache';
|
||||
export declare namespace Cache {
|
||||
type WatchCallback<TData = any> = (diff: Cache.DiffResult<TData>, lastDiff?: Cache.DiffResult<TData>) => void;
|
||||
interface ReadOptions<TVariables = any, TData = any> extends DataProxy.Query<TVariables, TData> {
|
||||
rootId?: string;
|
||||
previousResult?: any;
|
||||
optimistic: boolean;
|
||||
returnPartialData?: boolean;
|
||||
canonizeResults?: boolean;
|
||||
}
|
||||
interface WriteOptions<TResult = any, TVariables = any> extends Omit<DataProxy.Query<TVariables, TResult>, "id">, Omit<DataProxy.WriteOptions<TResult>, "data"> {
|
||||
dataId?: string;
|
||||
result: TResult;
|
||||
}
|
||||
interface DiffOptions<TData = any, TVariables = any> extends ReadOptions<TVariables, TData> {
|
||||
}
|
||||
interface WatchOptions<TData = any, TVariables = any> extends ReadOptions<TVariables, TData> {
|
||||
watcher?: object;
|
||||
immediate?: boolean;
|
||||
callback: WatchCallback<TData>;
|
||||
lastDiff?: DiffResult<TData>;
|
||||
}
|
||||
interface EvictOptions {
|
||||
id?: string;
|
||||
fieldName?: string;
|
||||
args?: Record<string, any>;
|
||||
broadcast?: boolean;
|
||||
}
|
||||
interface ResetOptions {
|
||||
discardWatches?: boolean;
|
||||
}
|
||||
interface ModifyOptions {
|
||||
id?: string;
|
||||
fields: Modifiers | Modifier<any>;
|
||||
optimistic?: boolean;
|
||||
broadcast?: boolean;
|
||||
}
|
||||
interface BatchOptions<TCache extends ApolloCache<any>, TUpdateResult = void> {
|
||||
update(cache: TCache): TUpdateResult;
|
||||
optimistic?: string | boolean;
|
||||
removeOptimistic?: string;
|
||||
onWatchUpdated?: (this: TCache, watch: Cache.WatchOptions, diff: Cache.DiffResult<any>, lastDiff: Cache.DiffResult<any> | undefined) => any;
|
||||
}
|
||||
export import DiffResult = DataProxy.DiffResult;
|
||||
export import ReadQueryOptions = DataProxy.ReadQueryOptions;
|
||||
export import ReadFragmentOptions = DataProxy.ReadFragmentOptions;
|
||||
export import WriteQueryOptions = DataProxy.WriteQueryOptions;
|
||||
export import WriteFragmentOptions = DataProxy.WriteFragmentOptions;
|
||||
export import UpdateQueryOptions = DataProxy.UpdateQueryOptions;
|
||||
export import UpdateFragmentOptions = DataProxy.UpdateFragmentOptions;
|
||||
export import Fragment = DataProxy.Fragment;
|
||||
}
|
||||
//# sourceMappingURL=Cache.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/Cache.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/Cache.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../../../src/cache/core/types/Cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,yBAAiB,KAAK,CAAC;IACrB,KAAY,aAAa,CAAC,KAAK,GAAG,GAAG,IAAI,CACvC,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,EAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,KAC/B,IAAI,CAAC;IAEV,UAAiB,WAAW,CAAC,UAAU,GAAG,GAAG,EAAE,KAAK,GAAG,GAAG,CACxD,SAAQ,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC;QAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,cAAc,CAAC,EAAE,GAAG,CAAC;QACrB,UAAU,EAAE,OAAO,CAAC;QACpB,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B;IAED,UAAiB,YAAY,CAAC,OAAO,GAAG,GAAG,EAAE,UAAU,GAAG,GAAG,CAC3D,SAAQ,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,EAChD,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAErD,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,OAAO,CA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AAC,UAAU,CAAC,GAAG,CAAC,EAC3B,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,SAAS,KACxC,GAAG,CAAC;KACV;IAED,MAAM,QAAQ,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC;IAChD,MAAM,QAAQ,gBAAgB,GAAG,SAAS,CAAC,gBAAgB,CAAC;IAC5D,MAAM,QAAQ,mBAAmB,GAAG,SAAS,CAAC,mBAAmB,CAAC;IAClE,MAAM,QAAQ,iBAAiB,GAAG,SAAS,CAAC,iBAAiB,CAAC;IAC9D,MAAM,QAAQ,oBAAoB,GAAG,SAAS,CAAC,oBAAoB,CAAC;IACpE,MAAM,QAAQ,kBAAkB,GAAG,SAAS,CAAC,kBAAkB,CAAC;IAChE,MAAM,QAAQ,qBAAqB,GAAG,SAAS,CAAC,qBAAqB,CAAC;IACtE,MAAM,QAAQ,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;CAC7C"}
|
||||
4
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/Cache.js
generated
vendored
Normal file
4
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/Cache.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export var Cache;
|
||||
(function (Cache) {
|
||||
})(Cache || (Cache = {}));
|
||||
//# sourceMappingURL=Cache.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/Cache.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/Cache.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../../../src/cache/core/types/Cache.ts"],"names":[],"mappings":"AAIA,MAAM,KAAW,KAAK,CA0GrB;AA1GD,WAAiB,KAAK;AA0GtB,CAAC,EA1GgB,KAAK,KAAL,KAAK,QA0GrB","sourcesContent":["import { DataProxy } from './DataProxy';\nimport { Modifier, Modifiers } from './common';\nimport { ApolloCache } from '../cache';\n\nexport namespace Cache {\n export type WatchCallback<TData = any> = (\n diff: Cache.DiffResult<TData>,\n lastDiff?: Cache.DiffResult<TData>,\n ) => void;\n\n export interface ReadOptions<TVariables = any, TData = any>\n extends DataProxy.Query<TVariables, TData> {\n rootId?: string;\n previousResult?: any;\n optimistic: boolean;\n returnPartialData?: boolean;\n canonizeResults?: boolean;\n }\n\n export interface WriteOptions<TResult = any, TVariables = any>\n extends Omit<DataProxy.Query<TVariables, TResult>, \"id\">,\n Omit<DataProxy.WriteOptions<TResult>, \"data\">\n {\n dataId?: string;\n result: TResult;\n }\n\n export interface DiffOptions<\n TData = any,\n TVariables = any,\n > extends ReadOptions<TVariables, TData> {\n // The DiffOptions interface is currently just an alias for\n // ReadOptions, though DiffOptions used to be responsible for\n // declaring the returnPartialData option.\n }\n\n export interface WatchOptions<\n TData = any,\n TVariables = any,\n > extends ReadOptions<TVariables, TData> {\n watcher?: object;\n immediate?: boolean;\n callback: WatchCallback<TData>;\n lastDiff?: DiffResult<TData>;\n }\n\n export interface EvictOptions {\n id?: string;\n fieldName?: string;\n args?: Record<string, any>;\n broadcast?: boolean;\n }\n\n // Although you can call cache.reset() without options, its behavior can be\n // configured by passing a Cache.ResetOptions object.\n export interface ResetOptions {\n discardWatches?: boolean;\n }\n\n export interface ModifyOptions {\n id?: string;\n fields: Modifiers | Modifier<any>;\n optimistic?: boolean;\n broadcast?: boolean;\n }\n\n export interface BatchOptions<\n TCache extends ApolloCache<any>,\n TUpdateResult = void,\n > {\n // Same as the first parameter of performTransaction, except the cache\n // argument will have the subclass type rather than ApolloCache.\n update(cache: TCache): TUpdateResult;\n\n // Passing a string for this option creates a new optimistic layer, with the\n // given string as its layer.id, just like passing a string for the\n // optimisticId parameter of performTransaction. Passing true is the same as\n // passing undefined to performTransaction (running the batch operation\n // against the current top layer of the cache), and passing false is the\n // same as passing null (running the operation against root/non-optimistic\n // cache data).\n optimistic?: string | boolean;\n\n // If you specify the ID of an optimistic layer using this option, that\n // layer will be removed as part of the batch transaction, triggering at\n // most one broadcast for both the transaction and the removal of the layer.\n // Note: this option is needed because calling cache.removeOptimistic during\n // the transaction function may not be not safe, since any modifications to\n // cache layers may be discarded after the transaction finishes.\n removeOptimistic?: string;\n\n // If you want to find out which watched queries were invalidated during\n // this batch operation, pass this optional callback function. Returning\n // false from the callback will prevent broadcasting this result.\n onWatchUpdated?: (\n this: TCache,\n watch: Cache.WatchOptions,\n diff: Cache.DiffResult<any>,\n lastDiff: Cache.DiffResult<any> | undefined,\n ) => any;\n }\n\n export import DiffResult = DataProxy.DiffResult;\n export import ReadQueryOptions = DataProxy.ReadQueryOptions;\n export import ReadFragmentOptions = DataProxy.ReadFragmentOptions;\n export import WriteQueryOptions = DataProxy.WriteQueryOptions;\n export import WriteFragmentOptions = DataProxy.WriteFragmentOptions;\n export import UpdateQueryOptions = DataProxy.UpdateQueryOptions;\n export import UpdateFragmentOptions = DataProxy.UpdateFragmentOptions;\n export import Fragment = DataProxy.Fragment;\n}\n"]}
|
||||
52
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/DataProxy.d.ts
generated
vendored
Normal file
52
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/DataProxy.d.ts
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
import { DocumentNode } from 'graphql';
|
||||
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
||||
import { MissingFieldError } from './common';
|
||||
export declare namespace DataProxy {
|
||||
interface Query<TVariables, TData> {
|
||||
query: DocumentNode | TypedDocumentNode<TData, TVariables>;
|
||||
variables?: TVariables;
|
||||
id?: string;
|
||||
}
|
||||
interface Fragment<TVariables, TData> {
|
||||
id?: string;
|
||||
fragment: DocumentNode | TypedDocumentNode<TData, TVariables>;
|
||||
fragmentName?: string;
|
||||
variables?: TVariables;
|
||||
}
|
||||
interface ReadQueryOptions<TData, TVariables> extends Query<TVariables, TData> {
|
||||
returnPartialData?: boolean;
|
||||
optimistic?: boolean;
|
||||
canonizeResults?: boolean;
|
||||
}
|
||||
interface ReadFragmentOptions<TData, TVariables> extends Fragment<TVariables, TData> {
|
||||
returnPartialData?: boolean;
|
||||
optimistic?: boolean;
|
||||
canonizeResults?: boolean;
|
||||
}
|
||||
interface WriteOptions<TData> {
|
||||
data: TData;
|
||||
broadcast?: boolean;
|
||||
overwrite?: boolean;
|
||||
}
|
||||
interface WriteQueryOptions<TData, TVariables> extends Query<TVariables, TData>, WriteOptions<TData> {
|
||||
}
|
||||
interface WriteFragmentOptions<TData, TVariables> extends Fragment<TVariables, TData>, WriteOptions<TData> {
|
||||
}
|
||||
interface UpdateQueryOptions<TData, TVariables> extends Omit<(ReadQueryOptions<TData, TVariables> & WriteQueryOptions<TData, TVariables>), 'data'> {
|
||||
}
|
||||
interface UpdateFragmentOptions<TData, TVariables> extends Omit<(ReadFragmentOptions<TData, TVariables> & WriteFragmentOptions<TData, TVariables>), 'data'> {
|
||||
}
|
||||
type DiffResult<T> = {
|
||||
result?: T;
|
||||
complete?: boolean;
|
||||
missing?: MissingFieldError[];
|
||||
fromOptimisticTransaction?: boolean;
|
||||
};
|
||||
}
|
||||
export interface DataProxy {
|
||||
readQuery<QueryType, TVariables = any>(options: DataProxy.ReadQueryOptions<QueryType, TVariables>, optimistic?: boolean): QueryType | null;
|
||||
readFragment<FragmentType, TVariables = any>(options: DataProxy.ReadFragmentOptions<FragmentType, TVariables>, optimistic?: boolean): FragmentType | null;
|
||||
writeQuery<TData = any, TVariables = any>(options: DataProxy.WriteQueryOptions<TData, TVariables>): void;
|
||||
writeFragment<TData = any, TVariables = any>(options: DataProxy.WriteFragmentOptions<TData, TVariables>): void;
|
||||
}
|
||||
//# sourceMappingURL=DataProxy.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/DataProxy.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/DataProxy.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"DataProxy.d.ts","sourceRoot":"","sources":["../../../../src/cache/core/types/DataProxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,yBAAiB,SAAS,CAAC;IACzB,UAAiB,KAAK,CAAC,UAAU,EAAE,KAAK;QAMtC,KAAK,EAAE,YAAY,GAAG,iBAAiB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QAK3D,SAAS,CAAC,EAAE,UAAU,CAAC;QAOvB,EAAE,CAAC,EAAE,MAAM,CAAC;KACb;IAED,UAAiB,QAAQ,CAAC,UAAU,EAAE,KAAK;QAMzC,EAAE,CAAC,EAAE,MAAM,CAAC;QAQZ,QAAQ,EAAE,YAAY,GAAG,iBAAiB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QAO9D,YAAY,CAAC,EAAE,MAAM,CAAC;QAKtB,SAAS,CAAC,EAAE,UAAU,CAAC;KACxB;IAED,UAAiB,gBAAgB,CAAC,KAAK,EAAE,UAAU,CACjD,SAAQ,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC;QAKhC,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAM5B,UAAU,CAAC,EAAE,OAAO,CAAC;QAMrB,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B;IAED,UAAiB,mBAAmB,CAAC,KAAK,EAAE,UAAU,CACpD,SAAQ,QAAQ,CAAC,UAAU,EAAE,KAAK,CAAC;QAKnC,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAM5B,UAAU,CAAC,EAAE,OAA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,GAAG,IAAI,CAAC;IAOpB,YAAY,CAAC,YAAY,EAAE,UAAU,GAAG,GAAG,EACzC,OAAO,EAAE,SAAS,CAAC,mBAAmB,CAAC,YAAY,EAAE,UAAU,CAAC,EAChE,UAAU,CAAC,EAAE,OAAO,GACnB,YAAY,GAAG,IAAI,CAAC;IAKvB,UAAU,CAAC,KAAK,GAAG,GAAG,EAAE,UAAU,GAAG,GAAG,EACtC,OAAO,EAAE,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,UAAU,CAAC,GACtD,IAAI,CAAC;IAOR,aAAa,CAAC,KAAK,GAAG,GAAG,EAAE,UAAU,GAAG,GAAG,EACzC,OAAO,EAAE,SAAS,CAAC,oBAAoB,CAAC,KAAK,EAAE,UAAU,CAAC,GACzD,IAAI,CAAC;CACT"}
|
||||
2
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/DataProxy.js
generated
vendored
Normal file
2
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/DataProxy.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=DataProxy.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/DataProxy.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/DataProxy.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
45
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/common.d.ts
generated
vendored
Normal file
45
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/common.d.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
import { DocumentNode, FieldNode } from 'graphql';
|
||||
import { Reference, StoreObject, StoreValue, isReference } from '../../../utilities';
|
||||
import { StorageType } from '../../inmemory/policies';
|
||||
export declare type SafeReadonly<T> = T extends object ? Readonly<T> : T;
|
||||
export declare type MissingTree = string | {
|
||||
readonly [key: string]: MissingTree;
|
||||
};
|
||||
export declare class MissingFieldError {
|
||||
readonly message: string;
|
||||
readonly path: MissingTree | Array<string | number>;
|
||||
readonly query: DocumentNode;
|
||||
readonly variables?: Record<string, any> | undefined;
|
||||
constructor(message: string, path: MissingTree | Array<string | number>, query: DocumentNode, variables?: Record<string, any> | undefined);
|
||||
}
|
||||
export interface FieldSpecifier {
|
||||
typename?: string;
|
||||
fieldName: string;
|
||||
field?: FieldNode;
|
||||
args?: Record<string, any>;
|
||||
variables?: Record<string, any>;
|
||||
}
|
||||
export interface ReadFieldOptions extends FieldSpecifier {
|
||||
from?: StoreObject | Reference;
|
||||
}
|
||||
export interface ReadFieldFunction {
|
||||
<V = StoreValue>(options: ReadFieldOptions): SafeReadonly<V> | undefined;
|
||||
<V = StoreValue>(fieldName: string, from?: StoreObject | Reference): SafeReadonly<V> | undefined;
|
||||
}
|
||||
export declare type ToReferenceFunction = (objOrIdOrRef: StoreObject | string | Reference, mergeIntoStore?: boolean) => Reference | undefined;
|
||||
export declare type CanReadFunction = (value: StoreValue) => boolean;
|
||||
export declare type Modifier<T> = (value: T, details: {
|
||||
DELETE: any;
|
||||
INVALIDATE: any;
|
||||
fieldName: string;
|
||||
storeFieldName: string;
|
||||
readField: ReadFieldFunction;
|
||||
canRead: CanReadFunction;
|
||||
isReference: typeof isReference;
|
||||
toReference: ToReferenceFunction;
|
||||
storage: StorageType;
|
||||
}) => T;
|
||||
export declare type Modifiers = {
|
||||
[fieldName: string]: Modifier<any>;
|
||||
};
|
||||
//# sourceMappingURL=common.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/common.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/common.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
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AY,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IACzE,CAAC,CAAC,GAAG,UAAU,EACb,SAAS,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,GAC7B,YAAY,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;CAChC;AAED,oBAAY,mBAAmB,GAAG,CAChC,YAAY,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,EAC9C,cAAc,CAAC,EAAE,OAAO,KACrB,SAAS,GAAG,SAAS,CAAC;AAE3B,oBAAY,eAAe,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC;AAE7D,oBAAY,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE;IAC5C,MAAM,EAAE,GAAG,CAAC;IACZ,UAAU,EAAE,GAAG,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,iBAAiB,CAAC;IAC7B,OAAO,EAAE,eAAe,CAAC;IACzB,WAAW,EAAE,OAAO,WAAW,CAAC;IAChC,WAAW,EAAE,mBAAmB,CAAC;IACjC,OAAO,EAAE,WAAW,CAAC;CACtB,KAAK,CAAC,CAAC;AAER,oBAAY,SAAS,GAAG;IACtB,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;CACpC,CAAC"}
|
||||
11
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/common.js
generated
vendored
Normal file
11
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/common.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
var MissingFieldError = (function () {
|
||||
function MissingFieldError(message, path, query, variables) {
|
||||
this.message = message;
|
||||
this.path = path;
|
||||
this.query = query;
|
||||
this.variables = variables;
|
||||
}
|
||||
return MissingFieldError;
|
||||
}());
|
||||
export { MissingFieldError };
|
||||
//# sourceMappingURL=common.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/common.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/core/types/common.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/cache/core/types/common.ts"],"names":[],"mappings":"AAwBA;IACE,2BACkB,OAAe,EACf,IAA0C,EAC1C,KAAmB,EACnB,SAA+B;QAH/B,YAAO,GAAP,OAAO,CAAQ;QACf,SAAI,GAAJ,IAAI,CAAsC;QAC1C,UAAK,GAAL,KAAK,CAAc;QACnB,cAAS,GAAT,SAAS,CAAsB;IAC9C,CAAC;IACN,wBAAC;AAAD,CAAC,AAPD,IAOC","sourcesContent":["import { DocumentNode, FieldNode } from 'graphql';\n\nimport {\n Reference,\n StoreObject,\n StoreValue,\n isReference,\n} from '../../../utilities';\n\nimport { StorageType } from '../../inmemory/policies';\n\n// The Readonly<T> type only really works for object types, since it marks\n// all of the object's properties as readonly, but there are many cases when\n// a generic type parameter like TExisting might be a string or some other\n// primitive type, in which case we need to avoid wrapping it with Readonly.\n// SafeReadonly<string> collapses to just string, which makes string\n// assignable to SafeReadonly<any>, whereas string is not assignable to\n// Readonly<any>, somewhat surprisingly.\nexport type SafeReadonly<T> = T extends object ? Readonly<T> : T;\n\nexport type MissingTree = string | {\n readonly [key: string]: MissingTree;\n};\n\nexport class MissingFieldError {\n constructor(\n public readonly message: string,\n public readonly path: MissingTree | Array<string | number>,\n public readonly query: DocumentNode,\n public readonly variables?: Record<string, any>,\n ) {}\n}\n\nexport interface FieldSpecifier {\n typename?: string;\n fieldName: string;\n field?: FieldNode;\n args?: Record<string, any>;\n variables?: Record<string, any>;\n}\n\nexport interface ReadFieldOptions extends FieldSpecifier {\n from?: StoreObject | Reference;\n}\n\nexport interface ReadFieldFunction {\n <V = StoreValue>(options: ReadFieldOptions): SafeReadonly<V> | undefined;\n <V = StoreValue>(\n fieldName: string,\n from?: StoreObject | Reference,\n ): SafeReadonly<V> | undefined;\n}\n\nexport type ToReferenceFunction = (\n objOrIdOrRef: StoreObject | string | Reference,\n mergeIntoStore?: boolean,\n) => Reference | undefined;\n\nexport type CanReadFunction = (value: StoreValue) => boolean;\n\nexport type Modifier<T> = (value: T, details: {\n DELETE: any;\n INVALIDATE: any;\n fieldName: string;\n storeFieldName: string;\n readField: ReadFieldFunction;\n canRead: CanReadFunction;\n isReference: typeof isReference;\n toReference: ToReferenceFunction;\n storage: StorageType;\n}) => T;\n\nexport type Modifiers = {\n [fieldName: string]: Modifier<any>;\n};\n"]}
|
||||
14
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/index.d.ts
generated
vendored
Normal file
14
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import '../utilities/globals';
|
||||
export { Transaction, ApolloCache } from './core/cache';
|
||||
export { Cache } from './core/types/Cache';
|
||||
export { DataProxy } from './core/types/DataProxy';
|
||||
export { MissingFieldError, ReadFieldOptions } from './core/types/common';
|
||||
export { Reference, isReference, makeReference, } from '../utilities';
|
||||
export { EntityStore } from './inmemory/entityStore';
|
||||
export { fieldNameFromStoreName, defaultDataIdFromObject, } from './inmemory/helpers';
|
||||
export { InMemoryCache, } from './inmemory/inMemoryCache';
|
||||
export { ReactiveVar, makeVar, cacheSlot, } from './inmemory/reactiveVars';
|
||||
export { TypePolicies, TypePolicy, FieldPolicy, FieldReadFunction, FieldMergeFunction, FieldFunctionOptions, PossibleTypesMap, Policies, } from './inmemory/policies';
|
||||
export { canonicalStringify, } from './inmemory/object-canon';
|
||||
export * from './inmemory/types';
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/index.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/index.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cache/index.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,SAAS,EACT,WAAW,EACX,aAAa,GACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACL,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EACL,aAAa,GACd,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,WAAW,EACX,OAAO,EACP,SAAS,GACV,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,YAAY,EACZ,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,QAAQ,GACT,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,cAAc,kBAAkB,CAAC"}
|
||||
13
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/index.js
generated
vendored
Normal file
13
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/index.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import "../utilities/globals/index.js";
|
||||
export { ApolloCache } from "./core/cache.js";
|
||||
export { Cache } from "./core/types/Cache.js";
|
||||
export { MissingFieldError } from "./core/types/common.js";
|
||||
export { isReference, makeReference, } from "../utilities/index.js";
|
||||
export { EntityStore } from "./inmemory/entityStore.js";
|
||||
export { fieldNameFromStoreName, defaultDataIdFromObject, } from "./inmemory/helpers.js";
|
||||
export { InMemoryCache, } from "./inmemory/inMemoryCache.js";
|
||||
export { makeVar, cacheSlot, } from "./inmemory/reactiveVars.js";
|
||||
export { Policies, } from "./inmemory/policies.js";
|
||||
export { canonicalStringify, } from "./inmemory/object-canon.js";
|
||||
export * from "./inmemory/types.js";
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/index.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cache/index.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAe,WAAW,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EACL,iBAAiB,EAElB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAEL,WAAW,EACX,aAAa,GACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACL,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EACL,aAAa,GACd,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAEL,OAAO,EACP,SAAS,GACV,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAQL,QAAQ,GACT,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,cAAc,kBAAkB,CAAC","sourcesContent":["import '../utilities/globals';\n\nexport { Transaction, ApolloCache } from './core/cache';\nexport { Cache } from './core/types/Cache';\nexport { DataProxy } from './core/types/DataProxy';\nexport {\n MissingFieldError,\n ReadFieldOptions\n} from './core/types/common';\n\nexport {\n Reference,\n isReference,\n makeReference,\n} from '../utilities';\n\nexport { EntityStore } from './inmemory/entityStore';\nexport {\n fieldNameFromStoreName,\n defaultDataIdFromObject,\n} from './inmemory/helpers'\n\nexport {\n InMemoryCache,\n} from './inmemory/inMemoryCache';\n\nexport {\n ReactiveVar,\n makeVar,\n cacheSlot,\n} from './inmemory/reactiveVars';\n\nexport {\n TypePolicies,\n TypePolicy,\n FieldPolicy,\n FieldReadFunction,\n FieldMergeFunction,\n FieldFunctionOptions,\n PossibleTypesMap,\n Policies,\n} from './inmemory/policies';\n\nexport {\n canonicalStringify,\n} from './inmemory/object-canon';\n\nexport * from './inmemory/types';\n"]}
|
||||
2
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/__mocks__/optimism.d.ts
generated
vendored
Normal file
2
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/__mocks__/optimism.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
declare const optimism: any;
|
||||
//# sourceMappingURL=optimism.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/__mocks__/optimism.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/__mocks__/optimism.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"optimism.d.ts","sourceRoot":"","sources":["../../../../src/cache/inmemory/__mocks__/optimism.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,QAAQ,KAAiC,CAAC"}
|
||||
14
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/__mocks__/optimism.js
generated
vendored
Normal file
14
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/__mocks__/optimism.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
var __assign = (this && this.__assign) || function () {
|
||||
__assign = Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
return __assign.apply(this, arguments);
|
||||
};
|
||||
var optimism = jest.requireActual('optimism');
|
||||
module.exports = __assign(__assign({}, optimism), { wrap: jest.fn(optimism.wrap) });
|
||||
//# sourceMappingURL=optimism.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/__mocks__/optimism.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/__mocks__/optimism.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"optimism.js","sourceRoot":"","sources":["../../../../src/cache/inmemory/__mocks__/optimism.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,IAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;AAChD,MAAM,CAAC,OAAO,yBACT,QAAQ,KACX,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,GAC7B,CAAC","sourcesContent":["const optimism = jest.requireActual('optimism');\nmodule.exports = {\n ...optimism,\n wrap: jest.fn(optimism.wrap),\n};\n"]}
|
||||
83
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/entityStore.d.ts
generated
vendored
Normal file
83
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/entityStore.d.ts
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
import { Trie } from '@wry/trie';
|
||||
import { StoreValue, StoreObject, Reference } from '../../utilities';
|
||||
import { NormalizedCache, NormalizedCacheObject } from './types';
|
||||
import { Policies, StorageType } from './policies';
|
||||
import { Cache } from '../core/types/Cache';
|
||||
import { SafeReadonly, Modifier, Modifiers, ToReferenceFunction, CanReadFunction } from '../core/types/common';
|
||||
export declare abstract class EntityStore implements NormalizedCache {
|
||||
readonly policies: Policies;
|
||||
readonly group: CacheGroup;
|
||||
protected data: NormalizedCacheObject;
|
||||
constructor(policies: Policies, group: CacheGroup);
|
||||
abstract addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer;
|
||||
abstract removeLayer(layerId: string): EntityStore;
|
||||
toObject(): NormalizedCacheObject;
|
||||
has(dataId: string): boolean;
|
||||
get(dataId: string, fieldName: string): StoreValue;
|
||||
protected lookup(dataId: string, dependOnExistence?: boolean): StoreObject | undefined;
|
||||
merge(older: string | StoreObject, newer: StoreObject | string): void;
|
||||
modify(dataId: string, fields: Modifier<any> | Modifiers): boolean;
|
||||
delete(dataId: string, fieldName?: string, args?: Record<string, any>): boolean;
|
||||
evict(options: Cache.EvictOptions, limit: EntityStore): boolean;
|
||||
clear(): void;
|
||||
extract(): NormalizedCacheObject;
|
||||
replace(newData: NormalizedCacheObject | null): void;
|
||||
abstract getStorage(idOrObj: string | StoreObject, ...storeFieldNames: (string | number)[]): StorageType;
|
||||
private rootIds;
|
||||
retain(rootId: string): number;
|
||||
release(rootId: string): number;
|
||||
getRootIdSet(ids?: Set<string>): Set<string>;
|
||||
gc(): string[];
|
||||
private refs;
|
||||
findChildRefIds(dataId: string): Record<string, true>;
|
||||
makeCacheKey(...args: any[]): object;
|
||||
getFieldValue: <T = StoreValue>(objectOrReference: StoreObject | Reference | undefined, storeFieldName: string) => SafeReadonly<T>;
|
||||
canRead: CanReadFunction;
|
||||
toReference: ToReferenceFunction;
|
||||
}
|
||||
export declare type FieldValueGetter = EntityStore["getFieldValue"];
|
||||
declare class CacheGroup {
|
||||
readonly caching: boolean;
|
||||
private parent;
|
||||
private d;
|
||||
keyMaker: Trie<object>;
|
||||
constructor(caching: boolean, parent?: CacheGroup | null);
|
||||
resetCaching(): void;
|
||||
depend(dataId: string, storeFieldName: string): void;
|
||||
dirty(dataId: string, storeFieldName: string): void;
|
||||
}
|
||||
export declare function maybeDependOnExistenceOfEntity(store: NormalizedCache, entityId: string): void;
|
||||
export declare namespace EntityStore {
|
||||
class Root extends EntityStore {
|
||||
constructor({ policies, resultCaching, seed, }: {
|
||||
policies: Policies;
|
||||
resultCaching?: boolean;
|
||||
seed?: NormalizedCacheObject;
|
||||
});
|
||||
readonly stump: Stump;
|
||||
addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer;
|
||||
removeLayer(): Root;
|
||||
readonly storageTrie: Trie<StorageType>;
|
||||
getStorage(): StorageType;
|
||||
}
|
||||
}
|
||||
declare class Layer extends EntityStore {
|
||||
readonly id: string;
|
||||
readonly parent: EntityStore;
|
||||
readonly replay: (layer: EntityStore) => any;
|
||||
readonly group: CacheGroup;
|
||||
constructor(id: string, parent: EntityStore, replay: (layer: EntityStore) => any, group: CacheGroup);
|
||||
addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer;
|
||||
removeLayer(layerId: string): EntityStore;
|
||||
toObject(): NormalizedCacheObject;
|
||||
findChildRefIds(dataId: string): Record<string, true>;
|
||||
getStorage(): StorageType;
|
||||
}
|
||||
declare class Stump extends Layer {
|
||||
constructor(root: EntityStore.Root);
|
||||
removeLayer(): this;
|
||||
merge(): any;
|
||||
}
|
||||
export declare function supportsResultCaching(store: any): store is EntityStore;
|
||||
export {};
|
||||
//# sourceMappingURL=entityStore.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/entityStore.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/entityStore.d.ts.map
generated
vendored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M,EAAE,IAAI,CAAC;IAQrD,UAAU,IAAI,WAAW;CAKjC;AAMD,cAAM,KAAM,SAAQ,KAAK;gBACX,IAAI,EAAE,WAAW,CAAC,IAAI;IAS3B,WAAW;IAKX,KAAK;CAQb;AAiBD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,WAAW,CAGtE"}
|
||||
467
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/entityStore.js
generated
vendored
Normal file
467
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/entityStore.js
generated
vendored
Normal file
@@ -0,0 +1,467 @@
|
||||
import { __assign, __extends, __rest } from "tslib";
|
||||
import { invariant } from "../../utilities/globals/index.js";
|
||||
import { dep } from 'optimism';
|
||||
import { equal } from '@wry/equality';
|
||||
import { Trie } from '@wry/trie';
|
||||
import { isReference, makeReference, DeepMerger, maybeDeepFreeze, canUseWeakMap, isNonNullObject, } from "../../utilities/index.js";
|
||||
import { hasOwn, fieldNameFromStoreName } from "./helpers.js";
|
||||
var DELETE = Object.create(null);
|
||||
var delModifier = function () { return DELETE; };
|
||||
var INVALIDATE = Object.create(null);
|
||||
var EntityStore = (function () {
|
||||
function EntityStore(policies, group) {
|
||||
var _this = this;
|
||||
this.policies = policies;
|
||||
this.group = group;
|
||||
this.data = Object.create(null);
|
||||
this.rootIds = Object.create(null);
|
||||
this.refs = Object.create(null);
|
||||
this.getFieldValue = function (objectOrReference, storeFieldName) { return maybeDeepFreeze(isReference(objectOrReference)
|
||||
? _this.get(objectOrReference.__ref, storeFieldName)
|
||||
: objectOrReference && objectOrReference[storeFieldName]); };
|
||||
this.canRead = function (objOrRef) {
|
||||
return isReference(objOrRef)
|
||||
? _this.has(objOrRef.__ref)
|
||||
: typeof objOrRef === "object";
|
||||
};
|
||||
this.toReference = function (objOrIdOrRef, mergeIntoStore) {
|
||||
if (typeof objOrIdOrRef === "string") {
|
||||
return makeReference(objOrIdOrRef);
|
||||
}
|
||||
if (isReference(objOrIdOrRef)) {
|
||||
return objOrIdOrRef;
|
||||
}
|
||||
var id = _this.policies.identify(objOrIdOrRef)[0];
|
||||
if (id) {
|
||||
var ref = makeReference(id);
|
||||
if (mergeIntoStore) {
|
||||
_this.merge(id, objOrIdOrRef);
|
||||
}
|
||||
return ref;
|
||||
}
|
||||
};
|
||||
}
|
||||
EntityStore.prototype.toObject = function () {
|
||||
return __assign({}, this.data);
|
||||
};
|
||||
EntityStore.prototype.has = function (dataId) {
|
||||
return this.lookup(dataId, true) !== void 0;
|
||||
};
|
||||
EntityStore.prototype.get = function (dataId, fieldName) {
|
||||
this.group.depend(dataId, fieldName);
|
||||
if (hasOwn.call(this.data, dataId)) {
|
||||
var storeObject = this.data[dataId];
|
||||
if (storeObject && hasOwn.call(storeObject, fieldName)) {
|
||||
return storeObject[fieldName];
|
||||
}
|
||||
}
|
||||
if (fieldName === "__typename" &&
|
||||
hasOwn.call(this.policies.rootTypenamesById, dataId)) {
|
||||
return this.policies.rootTypenamesById[dataId];
|
||||
}
|
||||
if (this instanceof Layer) {
|
||||
return this.parent.get(dataId, fieldName);
|
||||
}
|
||||
};
|
||||
EntityStore.prototype.lookup = function (dataId, dependOnExistence) {
|
||||
if (dependOnExistence)
|
||||
this.group.depend(dataId, "__exists");
|
||||
if (hasOwn.call(this.data, dataId)) {
|
||||
return this.data[dataId];
|
||||
}
|
||||
if (this instanceof Layer) {
|
||||
return this.parent.lookup(dataId, dependOnExistence);
|
||||
}
|
||||
if (this.policies.rootTypenamesById[dataId]) {
|
||||
return Object.create(null);
|
||||
}
|
||||
};
|
||||
EntityStore.prototype.merge = function (older, newer) {
|
||||
var _this = this;
|
||||
var dataId;
|
||||
if (isReference(older))
|
||||
older = older.__ref;
|
||||
if (isReference(newer))
|
||||
newer = newer.__ref;
|
||||
var existing = typeof older === "string"
|
||||
? this.lookup(dataId = older)
|
||||
: older;
|
||||
var incoming = typeof newer === "string"
|
||||
? this.lookup(dataId = newer)
|
||||
: newer;
|
||||
if (!incoming)
|
||||
return;
|
||||
__DEV__ ? invariant(typeof dataId === "string", "store.merge expects a string ID") : invariant(typeof dataId === "string", 1);
|
||||
var merged = new DeepMerger(storeObjectReconciler).merge(existing, incoming);
|
||||
this.data[dataId] = merged;
|
||||
if (merged !== existing) {
|
||||
delete this.refs[dataId];
|
||||
if (this.group.caching) {
|
||||
var fieldsToDirty_1 = Object.create(null);
|
||||
if (!existing)
|
||||
fieldsToDirty_1.__exists = 1;
|
||||
Object.keys(incoming).forEach(function (storeFieldName) {
|
||||
if (!existing || existing[storeFieldName] !== merged[storeFieldName]) {
|
||||
fieldsToDirty_1[storeFieldName] = 1;
|
||||
var fieldName = fieldNameFromStoreName(storeFieldName);
|
||||
if (fieldName !== storeFieldName &&
|
||||
!_this.policies.hasKeyArgs(merged.__typename, fieldName)) {
|
||||
fieldsToDirty_1[fieldName] = 1;
|
||||
}
|
||||
if (merged[storeFieldName] === void 0 && !(_this instanceof Layer)) {
|
||||
delete merged[storeFieldName];
|
||||
}
|
||||
}
|
||||
});
|
||||
if (fieldsToDirty_1.__typename &&
|
||||
!(existing && existing.__typename) &&
|
||||
this.policies.rootTypenamesById[dataId] === merged.__typename) {
|
||||
delete fieldsToDirty_1.__typename;
|
||||
}
|
||||
Object.keys(fieldsToDirty_1).forEach(function (fieldName) { return _this.group.dirty(dataId, fieldName); });
|
||||
}
|
||||
}
|
||||
};
|
||||
EntityStore.prototype.modify = function (dataId, fields) {
|
||||
var _this = this;
|
||||
var storeObject = this.lookup(dataId);
|
||||
if (storeObject) {
|
||||
var changedFields_1 = Object.create(null);
|
||||
var needToMerge_1 = false;
|
||||
var allDeleted_1 = true;
|
||||
var sharedDetails_1 = {
|
||||
DELETE: DELETE,
|
||||
INVALIDATE: INVALIDATE,
|
||||
isReference: isReference,
|
||||
toReference: this.toReference,
|
||||
canRead: this.canRead,
|
||||
readField: function (fieldNameOrOptions, from) { return _this.policies.readField(typeof fieldNameOrOptions === "string" ? {
|
||||
fieldName: fieldNameOrOptions,
|
||||
from: from || makeReference(dataId),
|
||||
} : fieldNameOrOptions, { store: _this }); },
|
||||
};
|
||||
Object.keys(storeObject).forEach(function (storeFieldName) {
|
||||
var fieldName = fieldNameFromStoreName(storeFieldName);
|
||||
var fieldValue = storeObject[storeFieldName];
|
||||
if (fieldValue === void 0)
|
||||
return;
|
||||
var modify = typeof fields === "function"
|
||||
? fields
|
||||
: fields[storeFieldName] || fields[fieldName];
|
||||
if (modify) {
|
||||
var newValue = modify === delModifier ? DELETE :
|
||||
modify(maybeDeepFreeze(fieldValue), __assign(__assign({}, sharedDetails_1), { fieldName: fieldName, storeFieldName: storeFieldName, storage: _this.getStorage(dataId, storeFieldName) }));
|
||||
if (newValue === INVALIDATE) {
|
||||
_this.group.dirty(dataId, storeFieldName);
|
||||
}
|
||||
else {
|
||||
if (newValue === DELETE)
|
||||
newValue = void 0;
|
||||
if (newValue !== fieldValue) {
|
||||
changedFields_1[storeFieldName] = newValue;
|
||||
needToMerge_1 = true;
|
||||
fieldValue = newValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (fieldValue !== void 0) {
|
||||
allDeleted_1 = false;
|
||||
}
|
||||
});
|
||||
if (needToMerge_1) {
|
||||
this.merge(dataId, changedFields_1);
|
||||
if (allDeleted_1) {
|
||||
if (this instanceof Layer) {
|
||||
this.data[dataId] = void 0;
|
||||
}
|
||||
else {
|
||||
delete this.data[dataId];
|
||||
}
|
||||
this.group.dirty(dataId, "__exists");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
EntityStore.prototype.delete = function (dataId, fieldName, args) {
|
||||
var _a;
|
||||
var storeObject = this.lookup(dataId);
|
||||
if (storeObject) {
|
||||
var typename = this.getFieldValue(storeObject, "__typename");
|
||||
var storeFieldName = fieldName && args
|
||||
? this.policies.getStoreFieldName({ typename: typename, fieldName: fieldName, args: args })
|
||||
: fieldName;
|
||||
return this.modify(dataId, storeFieldName ? (_a = {},
|
||||
_a[storeFieldName] = delModifier,
|
||||
_a) : delModifier);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
EntityStore.prototype.evict = function (options, limit) {
|
||||
var evicted = false;
|
||||
if (options.id) {
|
||||
if (hasOwn.call(this.data, options.id)) {
|
||||
evicted = this.delete(options.id, options.fieldName, options.args);
|
||||
}
|
||||
if (this instanceof Layer && this !== limit) {
|
||||
evicted = this.parent.evict(options, limit) || evicted;
|
||||
}
|
||||
if (options.fieldName || evicted) {
|
||||
this.group.dirty(options.id, options.fieldName || "__exists");
|
||||
}
|
||||
}
|
||||
return evicted;
|
||||
};
|
||||
EntityStore.prototype.clear = function () {
|
||||
this.replace(null);
|
||||
};
|
||||
EntityStore.prototype.extract = function () {
|
||||
var _this = this;
|
||||
var obj = this.toObject();
|
||||
var extraRootIds = [];
|
||||
this.getRootIdSet().forEach(function (id) {
|
||||
if (!hasOwn.call(_this.policies.rootTypenamesById, id)) {
|
||||
extraRootIds.push(id);
|
||||
}
|
||||
});
|
||||
if (extraRootIds.length) {
|
||||
obj.__META = { extraRootIds: extraRootIds.sort() };
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
EntityStore.prototype.replace = function (newData) {
|
||||
var _this = this;
|
||||
Object.keys(this.data).forEach(function (dataId) {
|
||||
if (!(newData && hasOwn.call(newData, dataId))) {
|
||||
_this.delete(dataId);
|
||||
}
|
||||
});
|
||||
if (newData) {
|
||||
var __META = newData.__META, rest_1 = __rest(newData, ["__META"]);
|
||||
Object.keys(rest_1).forEach(function (dataId) {
|
||||
_this.merge(dataId, rest_1[dataId]);
|
||||
});
|
||||
if (__META) {
|
||||
__META.extraRootIds.forEach(this.retain, this);
|
||||
}
|
||||
}
|
||||
};
|
||||
EntityStore.prototype.retain = function (rootId) {
|
||||
return this.rootIds[rootId] = (this.rootIds[rootId] || 0) + 1;
|
||||
};
|
||||
EntityStore.prototype.release = function (rootId) {
|
||||
if (this.rootIds[rootId] > 0) {
|
||||
var count = --this.rootIds[rootId];
|
||||
if (!count)
|
||||
delete this.rootIds[rootId];
|
||||
return count;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
EntityStore.prototype.getRootIdSet = function (ids) {
|
||||
if (ids === void 0) { ids = new Set(); }
|
||||
Object.keys(this.rootIds).forEach(ids.add, ids);
|
||||
if (this instanceof Layer) {
|
||||
this.parent.getRootIdSet(ids);
|
||||
}
|
||||
else {
|
||||
Object.keys(this.policies.rootTypenamesById).forEach(ids.add, ids);
|
||||
}
|
||||
return ids;
|
||||
};
|
||||
EntityStore.prototype.gc = function () {
|
||||
var _this = this;
|
||||
var ids = this.getRootIdSet();
|
||||
var snapshot = this.toObject();
|
||||
ids.forEach(function (id) {
|
||||
if (hasOwn.call(snapshot, id)) {
|
||||
Object.keys(_this.findChildRefIds(id)).forEach(ids.add, ids);
|
||||
delete snapshot[id];
|
||||
}
|
||||
});
|
||||
var idsToRemove = Object.keys(snapshot);
|
||||
if (idsToRemove.length) {
|
||||
var root_1 = this;
|
||||
while (root_1 instanceof Layer)
|
||||
root_1 = root_1.parent;
|
||||
idsToRemove.forEach(function (id) { return root_1.delete(id); });
|
||||
}
|
||||
return idsToRemove;
|
||||
};
|
||||
EntityStore.prototype.findChildRefIds = function (dataId) {
|
||||
if (!hasOwn.call(this.refs, dataId)) {
|
||||
var found_1 = this.refs[dataId] = Object.create(null);
|
||||
var root = this.data[dataId];
|
||||
if (!root)
|
||||
return found_1;
|
||||
var workSet_1 = new Set([root]);
|
||||
workSet_1.forEach(function (obj) {
|
||||
if (isReference(obj)) {
|
||||
found_1[obj.__ref] = true;
|
||||
}
|
||||
if (isNonNullObject(obj)) {
|
||||
Object.keys(obj).forEach(function (key) {
|
||||
var child = obj[key];
|
||||
if (isNonNullObject(child)) {
|
||||
workSet_1.add(child);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
return this.refs[dataId];
|
||||
};
|
||||
EntityStore.prototype.makeCacheKey = function () {
|
||||
return this.group.keyMaker.lookupArray(arguments);
|
||||
};
|
||||
return EntityStore;
|
||||
}());
|
||||
export { EntityStore };
|
||||
var CacheGroup = (function () {
|
||||
function CacheGroup(caching, parent) {
|
||||
if (parent === void 0) { parent = null; }
|
||||
this.caching = caching;
|
||||
this.parent = parent;
|
||||
this.d = null;
|
||||
this.resetCaching();
|
||||
}
|
||||
CacheGroup.prototype.resetCaching = function () {
|
||||
this.d = this.caching ? dep() : null;
|
||||
this.keyMaker = new Trie(canUseWeakMap);
|
||||
};
|
||||
CacheGroup.prototype.depend = function (dataId, storeFieldName) {
|
||||
if (this.d) {
|
||||
this.d(makeDepKey(dataId, storeFieldName));
|
||||
var fieldName = fieldNameFromStoreName(storeFieldName);
|
||||
if (fieldName !== storeFieldName) {
|
||||
this.d(makeDepKey(dataId, fieldName));
|
||||
}
|
||||
if (this.parent) {
|
||||
this.parent.depend(dataId, storeFieldName);
|
||||
}
|
||||
}
|
||||
};
|
||||
CacheGroup.prototype.dirty = function (dataId, storeFieldName) {
|
||||
if (this.d) {
|
||||
this.d.dirty(makeDepKey(dataId, storeFieldName), storeFieldName === "__exists" ? "forget" : "setDirty");
|
||||
}
|
||||
};
|
||||
return CacheGroup;
|
||||
}());
|
||||
function makeDepKey(dataId, storeFieldName) {
|
||||
return storeFieldName + '#' + dataId;
|
||||
}
|
||||
export function maybeDependOnExistenceOfEntity(store, entityId) {
|
||||
if (supportsResultCaching(store)) {
|
||||
store.group.depend(entityId, "__exists");
|
||||
}
|
||||
}
|
||||
(function (EntityStore) {
|
||||
var Root = (function (_super) {
|
||||
__extends(Root, _super);
|
||||
function Root(_a) {
|
||||
var policies = _a.policies, _b = _a.resultCaching, resultCaching = _b === void 0 ? true : _b, seed = _a.seed;
|
||||
var _this = _super.call(this, policies, new CacheGroup(resultCaching)) || this;
|
||||
_this.stump = new Stump(_this);
|
||||
_this.storageTrie = new Trie(canUseWeakMap);
|
||||
if (seed)
|
||||
_this.replace(seed);
|
||||
return _this;
|
||||
}
|
||||
Root.prototype.addLayer = function (layerId, replay) {
|
||||
return this.stump.addLayer(layerId, replay);
|
||||
};
|
||||
Root.prototype.removeLayer = function () {
|
||||
return this;
|
||||
};
|
||||
Root.prototype.getStorage = function () {
|
||||
return this.storageTrie.lookupArray(arguments);
|
||||
};
|
||||
return Root;
|
||||
}(EntityStore));
|
||||
EntityStore.Root = Root;
|
||||
})(EntityStore || (EntityStore = {}));
|
||||
var Layer = (function (_super) {
|
||||
__extends(Layer, _super);
|
||||
function Layer(id, parent, replay, group) {
|
||||
var _this = _super.call(this, parent.policies, group) || this;
|
||||
_this.id = id;
|
||||
_this.parent = parent;
|
||||
_this.replay = replay;
|
||||
_this.group = group;
|
||||
replay(_this);
|
||||
return _this;
|
||||
}
|
||||
Layer.prototype.addLayer = function (layerId, replay) {
|
||||
return new Layer(layerId, this, replay, this.group);
|
||||
};
|
||||
Layer.prototype.removeLayer = function (layerId) {
|
||||
var _this = this;
|
||||
var parent = this.parent.removeLayer(layerId);
|
||||
if (layerId === this.id) {
|
||||
if (this.group.caching) {
|
||||
Object.keys(this.data).forEach(function (dataId) {
|
||||
var ownStoreObject = _this.data[dataId];
|
||||
var parentStoreObject = parent["lookup"](dataId);
|
||||
if (!parentStoreObject) {
|
||||
_this.delete(dataId);
|
||||
}
|
||||
else if (!ownStoreObject) {
|
||||
_this.group.dirty(dataId, "__exists");
|
||||
Object.keys(parentStoreObject).forEach(function (storeFieldName) {
|
||||
_this.group.dirty(dataId, storeFieldName);
|
||||
});
|
||||
}
|
||||
else if (ownStoreObject !== parentStoreObject) {
|
||||
Object.keys(ownStoreObject).forEach(function (storeFieldName) {
|
||||
if (!equal(ownStoreObject[storeFieldName], parentStoreObject[storeFieldName])) {
|
||||
_this.group.dirty(dataId, storeFieldName);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
return parent;
|
||||
}
|
||||
if (parent === this.parent)
|
||||
return this;
|
||||
return parent.addLayer(this.id, this.replay);
|
||||
};
|
||||
Layer.prototype.toObject = function () {
|
||||
return __assign(__assign({}, this.parent.toObject()), this.data);
|
||||
};
|
||||
Layer.prototype.findChildRefIds = function (dataId) {
|
||||
var fromParent = this.parent.findChildRefIds(dataId);
|
||||
return hasOwn.call(this.data, dataId) ? __assign(__assign({}, fromParent), _super.prototype.findChildRefIds.call(this, dataId)) : fromParent;
|
||||
};
|
||||
Layer.prototype.getStorage = function () {
|
||||
var p = this.parent;
|
||||
while (p.parent)
|
||||
p = p.parent;
|
||||
return p.getStorage.apply(p, arguments);
|
||||
};
|
||||
return Layer;
|
||||
}(EntityStore));
|
||||
var Stump = (function (_super) {
|
||||
__extends(Stump, _super);
|
||||
function Stump(root) {
|
||||
return _super.call(this, "EntityStore.Stump", root, function () { }, new CacheGroup(root.group.caching, root.group)) || this;
|
||||
}
|
||||
Stump.prototype.removeLayer = function () {
|
||||
return this;
|
||||
};
|
||||
Stump.prototype.merge = function () {
|
||||
return this.parent.merge.apply(this.parent, arguments);
|
||||
};
|
||||
return Stump;
|
||||
}(Layer));
|
||||
function storeObjectReconciler(existingObject, incomingObject, property) {
|
||||
var existingValue = existingObject[property];
|
||||
var incomingValue = incomingObject[property];
|
||||
return equal(existingValue, incomingValue) ? existingValue : incomingValue;
|
||||
}
|
||||
export function supportsResultCaching(store) {
|
||||
return !!(store instanceof EntityStore && store.group.caching);
|
||||
}
|
||||
//# sourceMappingURL=entityStore.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/entityStore.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/entityStore.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/fixPolyfills.d.ts
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/fixPolyfills.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
//# sourceMappingURL=fixPolyfills.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/fixPolyfills.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/fixPolyfills.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"fixPolyfills.d.ts","sourceRoot":"","sources":["../../../src/cache/inmemory/fixPolyfills.ts"],"names":[],"mappings":""}
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/fixPolyfills.js
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/fixPolyfills.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
//# sourceMappingURL=fixPolyfills.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/fixPolyfills.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/fixPolyfills.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"fixPolyfills.js","sourceRoot":"","sources":["../../../src/cache/inmemory/fixPolyfills.ts"],"names":[],"mappings":"","sourcesContent":["// Most JavaScript environments do not need the workarounds implemented in\n// fixPolyfills.native.ts, so importing fixPolyfills.ts merely imports\n// this empty module, adding nothing to bundle sizes or execution times.\n// When bundling for React Native, we substitute fixPolyfills.native.js\n// for fixPolyfills.js (see the \"react-native\" section of package.json),\n// to work around problems with Map and Set polyfills in older versions of\n// React Native (which should have been fixed in react-native@0.59.0):\n// https://github.com/apollographql/apollo-client/pull/5962\n"]}
|
||||
2
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/fixPolyfills.native.d.ts
generated
vendored
Normal file
2
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/fixPolyfills.native.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=fixPolyfills.native.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/fixPolyfills.native.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/fixPolyfills.native.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"fixPolyfills.native.d.ts","sourceRoot":"","sources":["../../../src/cache/inmemory/fixPolyfills.native.ts"],"names":[],"mappings":"AAoDA,OAAO,EAAE,CAAA"}
|
||||
48
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/fixPolyfills.native.js
generated
vendored
Normal file
48
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/fixPolyfills.native.js
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
var testMap = new Map();
|
||||
if (testMap.set(1, 2) !== testMap) {
|
||||
var set_1 = testMap.set;
|
||||
Map.prototype.set = function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
set_1.apply(this, args);
|
||||
return this;
|
||||
};
|
||||
}
|
||||
var testSet = new Set();
|
||||
if (testSet.add(3) !== testSet) {
|
||||
var add_1 = testSet.add;
|
||||
Set.prototype.add = function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
add_1.apply(this, args);
|
||||
return this;
|
||||
};
|
||||
}
|
||||
var frozen = {};
|
||||
if (typeof Object.freeze === 'function') {
|
||||
Object.freeze(frozen);
|
||||
}
|
||||
try {
|
||||
testMap.set(frozen, frozen).delete(frozen);
|
||||
}
|
||||
catch (_a) {
|
||||
var wrap = function (method) {
|
||||
return method && (function (obj) {
|
||||
try {
|
||||
testMap.set(obj, obj).delete(obj);
|
||||
}
|
||||
finally {
|
||||
return method.call(Object, obj);
|
||||
}
|
||||
});
|
||||
};
|
||||
Object.freeze = wrap(Object.freeze);
|
||||
Object.seal = wrap(Object.seal);
|
||||
Object.preventExtensions = wrap(Object.preventExtensions);
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=fixPolyfills.native.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/fixPolyfills.native.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/fixPolyfills.native.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"fixPolyfills.native.js","sourceRoot":"","sources":["../../../src/cache/inmemory/fixPolyfills.native.ts"],"names":[],"mappings":"AAEA,IAAM,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;AAC1B,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,OAAO,EAAE;IACzB,IAAA,KAAG,GAAK,OAAO,IAAZ,CAAa;IACxB,GAAG,CAAC,SAAS,CAAC,GAAG,GAAG;QAAU,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACnC,KAAG,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;CACH;AAGD,IAAM,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;AAC1B,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE;IACtB,IAAA,KAAG,GAAK,OAAO,IAAZ,CAAa;IACxB,GAAG,CAAC,SAAS,CAAC,GAAG,GAAG;QAAU,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACnC,KAAG,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;CACH;AAED,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,UAAU,EAAE;IACvC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;CACvB;AAED,IAAI;IAOF,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;CAC5C;AAAC,WAAM;IACN,IAAM,IAAI,GAAG,UAAC,MAAwB;QACpC,OAAO,MAAM,IAAI,CAAC,UAAA,GAAG;YACnB,IAAI;gBAEF,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;aACnC;oBAAS;gBAGR,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;aACjC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IACF,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,CAAC,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;CAC3D","sourcesContent":["// Make sure Map.prototype.set returns the Map instance, per spec.\n// https://github.com/apollographql/apollo-client/issues/4024\nconst testMap = new Map();\nif (testMap.set(1, 2) !== testMap) {\n const { set } = testMap;\n Map.prototype.set = function (...args) {\n set.apply(this, args);\n return this;\n };\n}\n\n// Make sure Set.prototype.add returns the Set instance, per spec.\nconst testSet = new Set();\nif (testSet.add(3) !== testSet) {\n const { add } = testSet;\n Set.prototype.add = function (...args) {\n add.apply(this, args);\n return this;\n };\n}\n\nconst frozen = {};\nif (typeof Object.freeze === 'function') {\n Object.freeze(frozen);\n}\n\ntry {\n // If non-extensible objects can't be stored as keys in a Map, make sure we\n // do not freeze/seal/etc. an object without first attempting to put it in a\n // Map. For example, this gives the React Native Map polyfill a chance to tag\n // objects before they become non-extensible:\n // https://github.com/facebook/react-native/blob/98a6f19d7c/Libraries/vendor/core/Map.js#L44-L50\n // https://github.com/apollographql/react-apollo/issues/2442#issuecomment-426489517\n testMap.set(frozen, frozen).delete(frozen);\n} catch {\n const wrap = (method: <T>(obj: T) => T): typeof method => {\n return method && (obj => {\n try {\n // If .set succeeds, also call .delete to avoid leaking memory.\n testMap.set(obj, obj).delete(obj);\n } finally {\n // If .set or .delete fails, the exception will be silently swallowed\n // by this return-from-finally statement:\n return method.call(Object, obj);\n }\n });\n };\n Object.freeze = wrap(Object.freeze);\n Object.seal = wrap(Object.seal);\n Object.preventExtensions = wrap(Object.preventExtensions);\n}\n\nexport {}\n"]}
|
||||
21
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/helpers.d.ts
generated
vendored
Normal file
21
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/helpers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import { SelectionSetNode } from 'graphql';
|
||||
import { NormalizedCache, InMemoryCacheConfig } from './types';
|
||||
import { KeyFieldsContext } from './policies';
|
||||
import { Reference, StoreValue, StoreObject, DeepMerger } from '../../utilities';
|
||||
export declare const hasOwn: (v: PropertyKey) => boolean;
|
||||
export declare function defaultDataIdFromObject({ __typename, id, _id }: Readonly<StoreObject>, context?: KeyFieldsContext): string | undefined;
|
||||
export declare function normalizeConfig(config: InMemoryCacheConfig): {
|
||||
dataIdFromObject: typeof defaultDataIdFromObject;
|
||||
addTypename: boolean;
|
||||
resultCaching: boolean;
|
||||
canonizeResults: boolean;
|
||||
} & InMemoryCacheConfig;
|
||||
export declare function shouldCanonizeResults(config: Pick<InMemoryCacheConfig, "canonizeResults">): boolean;
|
||||
export declare function getTypenameFromStoreObject(store: NormalizedCache, objectOrReference: StoreObject | Reference): string | undefined;
|
||||
export declare const TypeOrFieldNameRegExp: RegExp;
|
||||
export declare function fieldNameFromStoreName(storeFieldName: string): string;
|
||||
export declare function selectionSetMatchesResult(selectionSet: SelectionSetNode, result: Record<string, any>, variables?: Record<string, any>): boolean;
|
||||
export declare function storeValueIsStoreObject(value: StoreValue): value is StoreObject;
|
||||
export declare function makeProcessedFieldsMerger(): DeepMerger<any[]>;
|
||||
export declare const isArray: (a: any) => a is any[] | readonly any[];
|
||||
//# sourceMappingURL=helpers.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/helpers.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/helpers.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/cache/inmemory/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EACL,eAAe,EACf,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,EACL,SAAS,EAET,UAAU,EACV,WAAW,EAEX,UAAU,EAKX,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MACW,MAAM,6BACJ,CAAC;AAErB,wBAAgB,uBAAuB,CACrC,EAAE,UAAU,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,QAAQ,CAAC,WAAW,CAAC,EAC9C,OAAO,CAAC,EAAE,gBAAgB,GACzB,MAAM,GAAG,SAAS,CAiBpB;AAWD,wBAAgB,eAAe,CAAC,MAAM,EAAE,mBAAmB;;;;;wBAE1D;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,IAAI,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,GACnD,OAAO,CAGT;AAED,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,eAAe,EACtB,iBAAiB,EAAE,WAAW,GAAG,SAAS,GACzC,MAAM,GAAG,SAAS,CAIpB;AAED,eAAO,MAAM,qBAAqB,QAAuB,CAAC;AAE1D,wBAAgB,sBAAsB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAGrE;AAED,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,gBAAgB,EAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC9B,OAAO,CAoBT;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,UAAU,GAChB,KAAK,IAAI,WAAW,CAItB;AAED,wBAAgB,yBAAyB,sBAExC;AAED,eAAO,MAAM,OAAO,MAAO,GAAG,gCAAkD,CAAA"}
|
||||
68
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/helpers.js
generated
vendored
Normal file
68
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/helpers.js
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
import { isReference, isField, DeepMerger, resultKeyNameFromField, shouldInclude, isNonNullObject, compact, } from "../../utilities/index.js";
|
||||
export var hasOwn = Object.prototype.hasOwnProperty;
|
||||
export function defaultDataIdFromObject(_a, context) {
|
||||
var __typename = _a.__typename, id = _a.id, _id = _a._id;
|
||||
if (typeof __typename === "string") {
|
||||
if (context) {
|
||||
context.keyObject =
|
||||
id !== void 0 ? { id: id } :
|
||||
_id !== void 0 ? { _id: _id } :
|
||||
void 0;
|
||||
}
|
||||
if (id === void 0)
|
||||
id = _id;
|
||||
if (id !== void 0) {
|
||||
return "".concat(__typename, ":").concat((typeof id === "number" ||
|
||||
typeof id === "string") ? id : JSON.stringify(id));
|
||||
}
|
||||
}
|
||||
}
|
||||
var defaultConfig = {
|
||||
dataIdFromObject: defaultDataIdFromObject,
|
||||
addTypename: true,
|
||||
resultCaching: true,
|
||||
canonizeResults: false,
|
||||
};
|
||||
export function normalizeConfig(config) {
|
||||
return compact(defaultConfig, config);
|
||||
}
|
||||
export function shouldCanonizeResults(config) {
|
||||
var value = config.canonizeResults;
|
||||
return value === void 0 ? defaultConfig.canonizeResults : value;
|
||||
}
|
||||
export function getTypenameFromStoreObject(store, objectOrReference) {
|
||||
return isReference(objectOrReference)
|
||||
? store.get(objectOrReference.__ref, "__typename")
|
||||
: objectOrReference && objectOrReference.__typename;
|
||||
}
|
||||
export var TypeOrFieldNameRegExp = /^[_a-z][_0-9a-z]*/i;
|
||||
export function fieldNameFromStoreName(storeFieldName) {
|
||||
var match = storeFieldName.match(TypeOrFieldNameRegExp);
|
||||
return match ? match[0] : storeFieldName;
|
||||
}
|
||||
export function selectionSetMatchesResult(selectionSet, result, variables) {
|
||||
if (isNonNullObject(result)) {
|
||||
return isArray(result)
|
||||
? result.every(function (item) { return selectionSetMatchesResult(selectionSet, item, variables); })
|
||||
: selectionSet.selections.every(function (field) {
|
||||
if (isField(field) && shouldInclude(field, variables)) {
|
||||
var key = resultKeyNameFromField(field);
|
||||
return hasOwn.call(result, key) &&
|
||||
(!field.selectionSet ||
|
||||
selectionSetMatchesResult(field.selectionSet, result[key], variables));
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
export function storeValueIsStoreObject(value) {
|
||||
return isNonNullObject(value) &&
|
||||
!isReference(value) &&
|
||||
!isArray(value);
|
||||
}
|
||||
export function makeProcessedFieldsMerger() {
|
||||
return new DeepMerger;
|
||||
}
|
||||
export var isArray = function (a) { return Array.isArray(a); };
|
||||
//# sourceMappingURL=helpers.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/helpers.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/helpers.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
50
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/inMemoryCache.d.ts
generated
vendored
Normal file
50
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/inMemoryCache.d.ts
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
import './fixPolyfills';
|
||||
import { DocumentNode } from 'graphql';
|
||||
import { ApolloCache } from '../core/cache';
|
||||
import { Cache } from '../core/types/Cache';
|
||||
import { StoreObject, Reference } from '../../utilities';
|
||||
import { InMemoryCacheConfig, NormalizedCacheObject } from './types';
|
||||
import { makeVar } from './reactiveVars';
|
||||
import { Policies } from './policies';
|
||||
declare type BroadcastOptions = Pick<Cache.BatchOptions<InMemoryCache>, "optimistic" | "onWatchUpdated">;
|
||||
export declare class InMemoryCache extends ApolloCache<NormalizedCacheObject> {
|
||||
private data;
|
||||
private optimisticData;
|
||||
protected config: InMemoryCacheConfig;
|
||||
private watches;
|
||||
private addTypename;
|
||||
private typenameDocumentCache;
|
||||
private storeReader;
|
||||
private storeWriter;
|
||||
private maybeBroadcastWatch;
|
||||
readonly policies: Policies;
|
||||
readonly makeVar: typeof makeVar;
|
||||
constructor(config?: InMemoryCacheConfig);
|
||||
private init;
|
||||
private resetResultCache;
|
||||
restore(data: NormalizedCacheObject): this;
|
||||
extract(optimistic?: boolean): NormalizedCacheObject;
|
||||
read<T>(options: Cache.ReadOptions): T | null;
|
||||
write(options: Cache.WriteOptions): Reference | undefined;
|
||||
modify(options: Cache.ModifyOptions): boolean;
|
||||
diff<TData, TVariables = any>(options: Cache.DiffOptions<TData, TVariables>): Cache.DiffResult<TData>;
|
||||
watch<TData = any, TVariables = any>(watch: Cache.WatchOptions<TData, TVariables>): () => void;
|
||||
gc(options?: {
|
||||
resetResultCache?: boolean;
|
||||
resetResultIdentities?: boolean;
|
||||
}): string[];
|
||||
retain(rootId: string, optimistic?: boolean): number;
|
||||
release(rootId: string, optimistic?: boolean): number;
|
||||
identify(object: StoreObject | Reference): string | undefined;
|
||||
evict(options: Cache.EvictOptions): boolean;
|
||||
reset(options?: Cache.ResetOptions): Promise<void>;
|
||||
removeOptimistic(idToRemove: string): void;
|
||||
private txCount;
|
||||
batch<TUpdateResult>(options: Cache.BatchOptions<InMemoryCache, TUpdateResult>): TUpdateResult;
|
||||
performTransaction(update: (cache: InMemoryCache) => any, optimisticId?: string | null): any;
|
||||
transformDocument(document: DocumentNode): DocumentNode;
|
||||
protected broadcastWatches(options?: BroadcastOptions): void;
|
||||
private broadcastWatch;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=inMemoryCache.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/inMemoryCache.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/inMemoryCache.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"inMemoryCache.d.ts","sourceRoot":"","sources":["../../../src/cache/inmemory/inMemoryCache.ts"],"names":[],"mappings":"AAGA,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAIvC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAEL,WAAW,EACX,SAAS,EAEV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAIrE,OAAO,EAAE,OAAO,EAA4B,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EACxC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,UAAU,CAAC,GAC3C,MAAM,IAAI;IAgCN,EAAE,CAAC,OAAO,CAAC,EAAE;QAGlB,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAI3B,qBAAqB,CAAC,EAAE,OAAO,CAAC;KACjC;IAoBM,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM;IASpD,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM;IAUrD,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS;IAS7D,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,YAAY,GAAG,OAAO;IA0B3C,KAAK,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBlD,gBAAgB,CAAC,UAAU,EAAE,MAAM;IAQ1C,OAAO,CAAC,OAAO,CAAK;IAEb,KAAK,CAAC,aAAa,EACxB,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,aAAa,EAAE,aAAa,CAAC,GACxD,aAAa;IAmGT,kBAAkB,CACvB,MAAM,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,GAAG,EACrC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI;IAQvB,iBAAiB,CAAC,QAAQ,EAAE,YAAY,GAAG,YAAY;IAgB9D,SAAS,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,gBAAgB;IAYrD,OAAO,CAAC,cAAc;CAgCvB"}
|
||||
308
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/inMemoryCache.js
generated
vendored
Normal file
308
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/inMemoryCache.js
generated
vendored
Normal file
@@ -0,0 +1,308 @@
|
||||
import { __assign, __extends } from "tslib";
|
||||
import { invariant } from "../../utilities/globals/index.js";
|
||||
import "./fixPolyfills.js";
|
||||
import { wrap } from 'optimism';
|
||||
import { equal } from '@wry/equality';
|
||||
import { ApolloCache } from "../core/cache.js";
|
||||
import { MissingFieldError } from "../core/types/common.js";
|
||||
import { addTypenameToDocument, isReference, } from "../../utilities/index.js";
|
||||
import { StoreReader } from "./readFromStore.js";
|
||||
import { StoreWriter } from "./writeToStore.js";
|
||||
import { EntityStore, supportsResultCaching } from "./entityStore.js";
|
||||
import { makeVar, forgetCache, recallCache } from "./reactiveVars.js";
|
||||
import { Policies } from "./policies.js";
|
||||
import { hasOwn, normalizeConfig, shouldCanonizeResults } from "./helpers.js";
|
||||
import { canonicalStringify } from "./object-canon.js";
|
||||
var InMemoryCache = (function (_super) {
|
||||
__extends(InMemoryCache, _super);
|
||||
function InMemoryCache(config) {
|
||||
if (config === void 0) { config = {}; }
|
||||
var _this = _super.call(this) || this;
|
||||
_this.watches = new Set();
|
||||
_this.typenameDocumentCache = new Map();
|
||||
_this.makeVar = makeVar;
|
||||
_this.txCount = 0;
|
||||
_this.config = normalizeConfig(config);
|
||||
_this.addTypename = !!_this.config.addTypename;
|
||||
_this.policies = new Policies({
|
||||
cache: _this,
|
||||
dataIdFromObject: _this.config.dataIdFromObject,
|
||||
possibleTypes: _this.config.possibleTypes,
|
||||
typePolicies: _this.config.typePolicies,
|
||||
});
|
||||
_this.init();
|
||||
return _this;
|
||||
}
|
||||
InMemoryCache.prototype.init = function () {
|
||||
var rootStore = this.data = new EntityStore.Root({
|
||||
policies: this.policies,
|
||||
resultCaching: this.config.resultCaching,
|
||||
});
|
||||
this.optimisticData = rootStore.stump;
|
||||
this.resetResultCache();
|
||||
};
|
||||
InMemoryCache.prototype.resetResultCache = function (resetResultIdentities) {
|
||||
var _this = this;
|
||||
var previousReader = this.storeReader;
|
||||
this.storeWriter = new StoreWriter(this, this.storeReader = new StoreReader({
|
||||
cache: this,
|
||||
addTypename: this.addTypename,
|
||||
resultCacheMaxSize: this.config.resultCacheMaxSize,
|
||||
canonizeResults: shouldCanonizeResults(this.config),
|
||||
canon: resetResultIdentities
|
||||
? void 0
|
||||
: previousReader && previousReader.canon,
|
||||
}));
|
||||
this.maybeBroadcastWatch = wrap(function (c, options) {
|
||||
return _this.broadcastWatch(c, options);
|
||||
}, {
|
||||
max: this.config.resultCacheMaxSize,
|
||||
makeCacheKey: function (c) {
|
||||
var store = c.optimistic ? _this.optimisticData : _this.data;
|
||||
if (supportsResultCaching(store)) {
|
||||
var optimistic = c.optimistic, rootId = c.rootId, variables = c.variables;
|
||||
return store.makeCacheKey(c.query, c.callback, canonicalStringify({ optimistic: optimistic, rootId: rootId, variables: variables }));
|
||||
}
|
||||
}
|
||||
});
|
||||
new Set([
|
||||
this.data.group,
|
||||
this.optimisticData.group,
|
||||
]).forEach(function (group) { return group.resetCaching(); });
|
||||
};
|
||||
InMemoryCache.prototype.restore = function (data) {
|
||||
this.init();
|
||||
if (data)
|
||||
this.data.replace(data);
|
||||
return this;
|
||||
};
|
||||
InMemoryCache.prototype.extract = function (optimistic) {
|
||||
if (optimistic === void 0) { optimistic = false; }
|
||||
return (optimistic ? this.optimisticData : this.data).extract();
|
||||
};
|
||||
InMemoryCache.prototype.read = function (options) {
|
||||
var _a = options.returnPartialData, returnPartialData = _a === void 0 ? false : _a;
|
||||
try {
|
||||
return this.storeReader.diffQueryAgainstStore(__assign(__assign({}, options), { store: options.optimistic ? this.optimisticData : this.data, config: this.config, returnPartialData: returnPartialData })).result || null;
|
||||
}
|
||||
catch (e) {
|
||||
if (e instanceof MissingFieldError) {
|
||||
return null;
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
};
|
||||
InMemoryCache.prototype.write = function (options) {
|
||||
try {
|
||||
++this.txCount;
|
||||
return this.storeWriter.writeToStore(this.data, options);
|
||||
}
|
||||
finally {
|
||||
if (!--this.txCount && options.broadcast !== false) {
|
||||
this.broadcastWatches();
|
||||
}
|
||||
}
|
||||
};
|
||||
InMemoryCache.prototype.modify = function (options) {
|
||||
if (hasOwn.call(options, "id") && !options.id) {
|
||||
return false;
|
||||
}
|
||||
var store = options.optimistic
|
||||
? this.optimisticData
|
||||
: this.data;
|
||||
try {
|
||||
++this.txCount;
|
||||
return store.modify(options.id || "ROOT_QUERY", options.fields);
|
||||
}
|
||||
finally {
|
||||
if (!--this.txCount && options.broadcast !== false) {
|
||||
this.broadcastWatches();
|
||||
}
|
||||
}
|
||||
};
|
||||
InMemoryCache.prototype.diff = function (options) {
|
||||
return this.storeReader.diffQueryAgainstStore(__assign(__assign({}, options), { store: options.optimistic ? this.optimisticData : this.data, rootId: options.id || "ROOT_QUERY", config: this.config }));
|
||||
};
|
||||
InMemoryCache.prototype.watch = function (watch) {
|
||||
var _this = this;
|
||||
if (!this.watches.size) {
|
||||
recallCache(this);
|
||||
}
|
||||
this.watches.add(watch);
|
||||
if (watch.immediate) {
|
||||
this.maybeBroadcastWatch(watch);
|
||||
}
|
||||
return function () {
|
||||
if (_this.watches.delete(watch) && !_this.watches.size) {
|
||||
forgetCache(_this);
|
||||
}
|
||||
_this.maybeBroadcastWatch.forget(watch);
|
||||
};
|
||||
};
|
||||
InMemoryCache.prototype.gc = function (options) {
|
||||
canonicalStringify.reset();
|
||||
var ids = this.optimisticData.gc();
|
||||
if (options && !this.txCount) {
|
||||
if (options.resetResultCache) {
|
||||
this.resetResultCache(options.resetResultIdentities);
|
||||
}
|
||||
else if (options.resetResultIdentities) {
|
||||
this.storeReader.resetCanon();
|
||||
}
|
||||
}
|
||||
return ids;
|
||||
};
|
||||
InMemoryCache.prototype.retain = function (rootId, optimistic) {
|
||||
return (optimistic ? this.optimisticData : this.data).retain(rootId);
|
||||
};
|
||||
InMemoryCache.prototype.release = function (rootId, optimistic) {
|
||||
return (optimistic ? this.optimisticData : this.data).release(rootId);
|
||||
};
|
||||
InMemoryCache.prototype.identify = function (object) {
|
||||
if (isReference(object))
|
||||
return object.__ref;
|
||||
try {
|
||||
return this.policies.identify(object)[0];
|
||||
}
|
||||
catch (e) {
|
||||
__DEV__ && invariant.warn(e);
|
||||
}
|
||||
};
|
||||
InMemoryCache.prototype.evict = function (options) {
|
||||
if (!options.id) {
|
||||
if (hasOwn.call(options, "id")) {
|
||||
return false;
|
||||
}
|
||||
options = __assign(__assign({}, options), { id: "ROOT_QUERY" });
|
||||
}
|
||||
try {
|
||||
++this.txCount;
|
||||
return this.optimisticData.evict(options, this.data);
|
||||
}
|
||||
finally {
|
||||
if (!--this.txCount && options.broadcast !== false) {
|
||||
this.broadcastWatches();
|
||||
}
|
||||
}
|
||||
};
|
||||
InMemoryCache.prototype.reset = function (options) {
|
||||
var _this = this;
|
||||
this.init();
|
||||
canonicalStringify.reset();
|
||||
if (options && options.discardWatches) {
|
||||
this.watches.forEach(function (watch) { return _this.maybeBroadcastWatch.forget(watch); });
|
||||
this.watches.clear();
|
||||
forgetCache(this);
|
||||
}
|
||||
else {
|
||||
this.broadcastWatches();
|
||||
}
|
||||
return Promise.resolve();
|
||||
};
|
||||
InMemoryCache.prototype.removeOptimistic = function (idToRemove) {
|
||||
var newOptimisticData = this.optimisticData.removeLayer(idToRemove);
|
||||
if (newOptimisticData !== this.optimisticData) {
|
||||
this.optimisticData = newOptimisticData;
|
||||
this.broadcastWatches();
|
||||
}
|
||||
};
|
||||
InMemoryCache.prototype.batch = function (options) {
|
||||
var _this = this;
|
||||
var update = options.update, _a = options.optimistic, optimistic = _a === void 0 ? true : _a, removeOptimistic = options.removeOptimistic, onWatchUpdated = options.onWatchUpdated;
|
||||
var updateResult;
|
||||
var perform = function (layer) {
|
||||
var _a = _this, data = _a.data, optimisticData = _a.optimisticData;
|
||||
++_this.txCount;
|
||||
if (layer) {
|
||||
_this.data = _this.optimisticData = layer;
|
||||
}
|
||||
try {
|
||||
return updateResult = update(_this);
|
||||
}
|
||||
finally {
|
||||
--_this.txCount;
|
||||
_this.data = data;
|
||||
_this.optimisticData = optimisticData;
|
||||
}
|
||||
};
|
||||
var alreadyDirty = new Set();
|
||||
if (onWatchUpdated && !this.txCount) {
|
||||
this.broadcastWatches(__assign(__assign({}, options), { onWatchUpdated: function (watch) {
|
||||
alreadyDirty.add(watch);
|
||||
return false;
|
||||
} }));
|
||||
}
|
||||
if (typeof optimistic === 'string') {
|
||||
this.optimisticData = this.optimisticData.addLayer(optimistic, perform);
|
||||
}
|
||||
else if (optimistic === false) {
|
||||
perform(this.data);
|
||||
}
|
||||
else {
|
||||
perform();
|
||||
}
|
||||
if (typeof removeOptimistic === "string") {
|
||||
this.optimisticData = this.optimisticData.removeLayer(removeOptimistic);
|
||||
}
|
||||
if (onWatchUpdated && alreadyDirty.size) {
|
||||
this.broadcastWatches(__assign(__assign({}, options), { onWatchUpdated: function (watch, diff) {
|
||||
var result = onWatchUpdated.call(this, watch, diff);
|
||||
if (result !== false) {
|
||||
alreadyDirty.delete(watch);
|
||||
}
|
||||
return result;
|
||||
} }));
|
||||
if (alreadyDirty.size) {
|
||||
alreadyDirty.forEach(function (watch) { return _this.maybeBroadcastWatch.dirty(watch); });
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.broadcastWatches(options);
|
||||
}
|
||||
return updateResult;
|
||||
};
|
||||
InMemoryCache.prototype.performTransaction = function (update, optimisticId) {
|
||||
return this.batch({
|
||||
update: update,
|
||||
optimistic: optimisticId || (optimisticId !== null),
|
||||
});
|
||||
};
|
||||
InMemoryCache.prototype.transformDocument = function (document) {
|
||||
if (this.addTypename) {
|
||||
var result = this.typenameDocumentCache.get(document);
|
||||
if (!result) {
|
||||
result = addTypenameToDocument(document);
|
||||
this.typenameDocumentCache.set(document, result);
|
||||
this.typenameDocumentCache.set(result, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return document;
|
||||
};
|
||||
InMemoryCache.prototype.broadcastWatches = function (options) {
|
||||
var _this = this;
|
||||
if (!this.txCount) {
|
||||
this.watches.forEach(function (c) { return _this.maybeBroadcastWatch(c, options); });
|
||||
}
|
||||
};
|
||||
InMemoryCache.prototype.broadcastWatch = function (c, options) {
|
||||
var lastDiff = c.lastDiff;
|
||||
var diff = this.diff(c);
|
||||
if (options) {
|
||||
if (c.optimistic &&
|
||||
typeof options.optimistic === "string") {
|
||||
diff.fromOptimisticTransaction = true;
|
||||
}
|
||||
if (options.onWatchUpdated &&
|
||||
options.onWatchUpdated.call(this, c, diff, lastDiff) === false) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!lastDiff || !equal(lastDiff.result, diff.result)) {
|
||||
c.callback(c.lastDiff = diff, lastDiff);
|
||||
}
|
||||
};
|
||||
return InMemoryCache;
|
||||
}(ApolloCache));
|
||||
export { InMemoryCache };
|
||||
//# sourceMappingURL=inMemoryCache.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/inMemoryCache.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/inMemoryCache.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
9
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/key-extractor.d.ts
generated
vendored
Normal file
9
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/key-extractor.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { KeySpecifier, KeyFieldsFunction, KeyArgsFunction } from "./policies";
|
||||
export declare function keyFieldsFnFromSpecifier(specifier: KeySpecifier): KeyFieldsFunction;
|
||||
export declare function keyArgsFnFromSpecifier(specifier: KeySpecifier): KeyArgsFunction;
|
||||
export declare function collectSpecifierPaths(specifier: KeySpecifier, extractor: (path: string[]) => any): Record<string, any>;
|
||||
export declare function getSpecifierPaths(spec: KeySpecifier): string[][];
|
||||
declare function extractKey<TObj extends Record<string, any>, TKey extends string>(object: TObj, key: TKey): TObj[TKey] | undefined;
|
||||
export declare function extractKeyPath(object: Record<string, any>, path: string[], extract?: typeof extractKey): any;
|
||||
export {};
|
||||
//# sourceMappingURL=key-extractor.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/key-extractor.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/key-extractor.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"key-extractor.d.ts","sourceRoot":"","sources":["../../../src/cache/inmemory/key-extractor.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,eAAe,EAChB,MAAM,YAAY,CAAC;AAkBpB,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,YAAY,GACtB,iBAAiB,CAoDnB;AASD,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,YAAY,GAAG,eAAe,CAyE/E;AAED,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,YAAY,EACvB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAG,GACjC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAgBrB;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,EAAE,EAAE,CAsBhE;AAED,iBAAS,UAAU,CACjB,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAChC,IAAI,SAAS,MAAM,EACnB,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,SAAS,CAEjD;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE,OAAO,UAAU,GAC1B,GAAG,CAkBL"}
|
||||
118
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/key-extractor.js
generated
vendored
Normal file
118
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/key-extractor.js
generated
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
import { invariant } from "../../utilities/globals/index.js";
|
||||
import { argumentsObjectFromField, DeepMerger, isNonEmptyArray, isNonNullObject, } from "../../utilities/index.js";
|
||||
import { hasOwn, isArray } from "./helpers.js";
|
||||
var specifierInfoCache = Object.create(null);
|
||||
function lookupSpecifierInfo(spec) {
|
||||
var cacheKey = JSON.stringify(spec);
|
||||
return specifierInfoCache[cacheKey] ||
|
||||
(specifierInfoCache[cacheKey] = Object.create(null));
|
||||
}
|
||||
export function keyFieldsFnFromSpecifier(specifier) {
|
||||
var info = lookupSpecifierInfo(specifier);
|
||||
return info.keyFieldsFn || (info.keyFieldsFn = function (object, context) {
|
||||
var extract = function (from, key) { return context.readField(key, from); };
|
||||
var keyObject = context.keyObject = collectSpecifierPaths(specifier, function (schemaKeyPath) {
|
||||
var extracted = extractKeyPath(context.storeObject, schemaKeyPath, extract);
|
||||
if (extracted === void 0 &&
|
||||
object !== context.storeObject &&
|
||||
hasOwn.call(object, schemaKeyPath[0])) {
|
||||
extracted = extractKeyPath(object, schemaKeyPath, extractKey);
|
||||
}
|
||||
__DEV__ ? invariant(extracted !== void 0, "Missing field '".concat(schemaKeyPath.join('.'), "' while extracting keyFields from ").concat(JSON.stringify(object))) : invariant(extracted !== void 0, 2);
|
||||
return extracted;
|
||||
});
|
||||
return "".concat(context.typename, ":").concat(JSON.stringify(keyObject));
|
||||
});
|
||||
}
|
||||
export function keyArgsFnFromSpecifier(specifier) {
|
||||
var info = lookupSpecifierInfo(specifier);
|
||||
return info.keyArgsFn || (info.keyArgsFn = function (args, _a) {
|
||||
var field = _a.field, variables = _a.variables, fieldName = _a.fieldName;
|
||||
var collected = collectSpecifierPaths(specifier, function (keyPath) {
|
||||
var firstKey = keyPath[0];
|
||||
var firstChar = firstKey.charAt(0);
|
||||
if (firstChar === "@") {
|
||||
if (field && isNonEmptyArray(field.directives)) {
|
||||
var directiveName_1 = firstKey.slice(1);
|
||||
var d = field.directives.find(function (d) { return d.name.value === directiveName_1; });
|
||||
var directiveArgs = d && argumentsObjectFromField(d, variables);
|
||||
return directiveArgs && extractKeyPath(directiveArgs, keyPath.slice(1));
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (firstChar === "$") {
|
||||
var variableName = firstKey.slice(1);
|
||||
if (variables && hasOwn.call(variables, variableName)) {
|
||||
var varKeyPath = keyPath.slice(0);
|
||||
varKeyPath[0] = variableName;
|
||||
return extractKeyPath(variables, varKeyPath);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (args) {
|
||||
return extractKeyPath(args, keyPath);
|
||||
}
|
||||
});
|
||||
var suffix = JSON.stringify(collected);
|
||||
if (args || suffix !== "{}") {
|
||||
fieldName += ":" + suffix;
|
||||
}
|
||||
return fieldName;
|
||||
});
|
||||
}
|
||||
export function collectSpecifierPaths(specifier, extractor) {
|
||||
var merger = new DeepMerger;
|
||||
return getSpecifierPaths(specifier).reduce(function (collected, path) {
|
||||
var _a;
|
||||
var toMerge = extractor(path);
|
||||
if (toMerge !== void 0) {
|
||||
for (var i = path.length - 1; i >= 0; --i) {
|
||||
toMerge = (_a = {}, _a[path[i]] = toMerge, _a);
|
||||
}
|
||||
collected = merger.merge(collected, toMerge);
|
||||
}
|
||||
return collected;
|
||||
}, Object.create(null));
|
||||
}
|
||||
export function getSpecifierPaths(spec) {
|
||||
var info = lookupSpecifierInfo(spec);
|
||||
if (!info.paths) {
|
||||
var paths_1 = info.paths = [];
|
||||
var currentPath_1 = [];
|
||||
spec.forEach(function (s, i) {
|
||||
if (isArray(s)) {
|
||||
getSpecifierPaths(s).forEach(function (p) { return paths_1.push(currentPath_1.concat(p)); });
|
||||
currentPath_1.length = 0;
|
||||
}
|
||||
else {
|
||||
currentPath_1.push(s);
|
||||
if (!isArray(spec[i + 1])) {
|
||||
paths_1.push(currentPath_1.slice(0));
|
||||
currentPath_1.length = 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
return info.paths;
|
||||
}
|
||||
function extractKey(object, key) {
|
||||
return object[key];
|
||||
}
|
||||
export function extractKeyPath(object, path, extract) {
|
||||
extract = extract || extractKey;
|
||||
return normalize(path.reduce(function reducer(obj, key) {
|
||||
return isArray(obj)
|
||||
? obj.map(function (child) { return reducer(child, key); })
|
||||
: obj && extract(obj, key);
|
||||
}, object));
|
||||
}
|
||||
function normalize(value) {
|
||||
if (isNonNullObject(value)) {
|
||||
if (isArray(value)) {
|
||||
return value.map(normalize);
|
||||
}
|
||||
return collectSpecifierPaths(Object.keys(value).sort(), function (path) { return extractKeyPath(value, path); });
|
||||
}
|
||||
return value;
|
||||
}
|
||||
//# sourceMappingURL=key-extractor.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/key-extractor.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/key-extractor.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
18
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/object-canon.d.ts
generated
vendored
Normal file
18
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/object-canon.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import "../../utilities/globals";
|
||||
export declare class ObjectCanon {
|
||||
private known;
|
||||
private pool;
|
||||
isKnown(value: any): boolean;
|
||||
private passes;
|
||||
pass<T>(value: T): T;
|
||||
admit<T>(value: T): T;
|
||||
private sortedKeys;
|
||||
private keysByJSON;
|
||||
readonly empty: {};
|
||||
}
|
||||
export declare const canonicalStringify: ((value: any) => string) & {
|
||||
reset: typeof resetCanonicalStringify;
|
||||
};
|
||||
declare function resetCanonicalStringify(): void;
|
||||
export {};
|
||||
//# sourceMappingURL=object-canon.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/object-canon.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/object-canon.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"object-canon.d.ts","sourceRoot":"","sources":["../../../src/cache/inmemory/object-canon.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AA0EjC,qBAAa,WAAW;IAGtB,OAAO,CAAC,KAAK,CAAiD;IAG9D,OAAO,CAAC,IAAI,CAIM;IAEX,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO;IAMnC,OAAO,CAAC,MAAM,CAAiC;IACxC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC;IAWpB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC;IAuE5B,OAAO,CAAC,UAAU;IAclB,OAAO,CAAC,UAAU,CAAqC;IAGvD,SAAgB,KAAK,KAAkB;CACxC;AAUD,eAAO,MAAM,kBAAkB,WAAkC,GAAG,KAAG,MAAM;;CAkB3E,CAAC;AAMH,iBAAS,uBAAuB,SAG/B"}
|
||||
120
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/object-canon.js
generated
vendored
Normal file
120
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/object-canon.js
generated
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
import { __assign } from "tslib";
|
||||
import "../../utilities/globals/index.js";
|
||||
import { Trie } from "@wry/trie";
|
||||
import { canUseWeakMap, canUseWeakSet, isNonNullObject as isObjectOrArray, } from "../../utilities/index.js";
|
||||
import { isArray } from "./helpers.js";
|
||||
function shallowCopy(value) {
|
||||
if (isObjectOrArray(value)) {
|
||||
return isArray(value)
|
||||
? value.slice(0)
|
||||
: __assign({ __proto__: Object.getPrototypeOf(value) }, value);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
var ObjectCanon = (function () {
|
||||
function ObjectCanon() {
|
||||
this.known = new (canUseWeakSet ? WeakSet : Set)();
|
||||
this.pool = new Trie(canUseWeakMap);
|
||||
this.passes = new WeakMap();
|
||||
this.keysByJSON = new Map();
|
||||
this.empty = this.admit({});
|
||||
}
|
||||
ObjectCanon.prototype.isKnown = function (value) {
|
||||
return isObjectOrArray(value) && this.known.has(value);
|
||||
};
|
||||
ObjectCanon.prototype.pass = function (value) {
|
||||
if (isObjectOrArray(value)) {
|
||||
var copy = shallowCopy(value);
|
||||
this.passes.set(copy, value);
|
||||
return copy;
|
||||
}
|
||||
return value;
|
||||
};
|
||||
ObjectCanon.prototype.admit = function (value) {
|
||||
var _this = this;
|
||||
if (isObjectOrArray(value)) {
|
||||
var original = this.passes.get(value);
|
||||
if (original)
|
||||
return original;
|
||||
var proto = Object.getPrototypeOf(value);
|
||||
switch (proto) {
|
||||
case Array.prototype: {
|
||||
if (this.known.has(value))
|
||||
return value;
|
||||
var array = value.map(this.admit, this);
|
||||
var node = this.pool.lookupArray(array);
|
||||
if (!node.array) {
|
||||
this.known.add(node.array = array);
|
||||
if (__DEV__) {
|
||||
Object.freeze(array);
|
||||
}
|
||||
}
|
||||
return node.array;
|
||||
}
|
||||
case null:
|
||||
case Object.prototype: {
|
||||
if (this.known.has(value))
|
||||
return value;
|
||||
var proto_1 = Object.getPrototypeOf(value);
|
||||
var array_1 = [proto_1];
|
||||
var keys = this.sortedKeys(value);
|
||||
array_1.push(keys.json);
|
||||
var firstValueIndex_1 = array_1.length;
|
||||
keys.sorted.forEach(function (key) {
|
||||
array_1.push(_this.admit(value[key]));
|
||||
});
|
||||
var node = this.pool.lookupArray(array_1);
|
||||
if (!node.object) {
|
||||
var obj_1 = node.object = Object.create(proto_1);
|
||||
this.known.add(obj_1);
|
||||
keys.sorted.forEach(function (key, i) {
|
||||
obj_1[key] = array_1[firstValueIndex_1 + i];
|
||||
});
|
||||
if (__DEV__) {
|
||||
Object.freeze(obj_1);
|
||||
}
|
||||
}
|
||||
return node.object;
|
||||
}
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
ObjectCanon.prototype.sortedKeys = function (obj) {
|
||||
var keys = Object.keys(obj);
|
||||
var node = this.pool.lookupArray(keys);
|
||||
if (!node.keys) {
|
||||
keys.sort();
|
||||
var json = JSON.stringify(keys);
|
||||
if (!(node.keys = this.keysByJSON.get(json))) {
|
||||
this.keysByJSON.set(json, node.keys = { sorted: keys, json: json });
|
||||
}
|
||||
}
|
||||
return node.keys;
|
||||
};
|
||||
return ObjectCanon;
|
||||
}());
|
||||
export { ObjectCanon };
|
||||
export var canonicalStringify = Object.assign(function (value) {
|
||||
if (isObjectOrArray(value)) {
|
||||
if (stringifyCanon === void 0) {
|
||||
resetCanonicalStringify();
|
||||
}
|
||||
var canonical = stringifyCanon.admit(value);
|
||||
var json = stringifyCache.get(canonical);
|
||||
if (json === void 0) {
|
||||
stringifyCache.set(canonical, json = JSON.stringify(canonical));
|
||||
}
|
||||
return json;
|
||||
}
|
||||
return JSON.stringify(value);
|
||||
}, {
|
||||
reset: resetCanonicalStringify,
|
||||
});
|
||||
var stringifyCanon;
|
||||
var stringifyCache;
|
||||
function resetCanonicalStringify() {
|
||||
stringifyCanon = new ObjectCanon;
|
||||
stringifyCache = new (canUseWeakMap ? WeakMap : Map)();
|
||||
}
|
||||
//# sourceMappingURL=object-canon.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/object-canon.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/object-canon.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
96
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/policies.d.ts
generated
vendored
Normal file
96
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/policies.d.ts
generated
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
import { InlineFragmentNode, FragmentDefinitionNode, SelectionSetNode, FieldNode } from 'graphql';
|
||||
import { FragmentMap, StoreValue, StoreObject, Reference, isReference } from '../../utilities';
|
||||
import { IdGetter, MergeInfo, ReadMergeModifyContext } from "./types";
|
||||
import { InMemoryCache } from './inMemoryCache';
|
||||
import { SafeReadonly, FieldSpecifier, ToReferenceFunction, ReadFieldFunction, ReadFieldOptions, CanReadFunction } from '../core/types/common';
|
||||
import { WriteContext } from './writeToStore';
|
||||
export declare type TypePolicies = {
|
||||
[__typename: string]: TypePolicy;
|
||||
};
|
||||
export declare type KeySpecifier = ReadonlyArray<string | KeySpecifier>;
|
||||
export declare type KeyFieldsContext = {
|
||||
typename: string | undefined;
|
||||
storeObject: StoreObject;
|
||||
readField: ReadFieldFunction;
|
||||
selectionSet?: SelectionSetNode;
|
||||
fragmentMap?: FragmentMap;
|
||||
keyObject?: Record<string, any>;
|
||||
};
|
||||
export declare type KeyFieldsFunction = (object: Readonly<StoreObject>, context: KeyFieldsContext) => KeySpecifier | false | ReturnType<IdGetter>;
|
||||
export declare type TypePolicy = {
|
||||
keyFields?: KeySpecifier | KeyFieldsFunction | false;
|
||||
merge?: FieldMergeFunction | boolean;
|
||||
queryType?: true;
|
||||
mutationType?: true;
|
||||
subscriptionType?: true;
|
||||
fields?: {
|
||||
[fieldName: string]: FieldPolicy<any> | FieldReadFunction<any>;
|
||||
};
|
||||
};
|
||||
export declare type KeyArgsFunction = (args: Record<string, any> | null, context: {
|
||||
typename: string;
|
||||
fieldName: string;
|
||||
field: FieldNode | null;
|
||||
variables?: Record<string, any>;
|
||||
}) => KeySpecifier | false | ReturnType<IdGetter>;
|
||||
export declare type FieldPolicy<TExisting = any, TIncoming = TExisting, TReadResult = TIncoming, TOptions extends FieldFunctionOptions = FieldFunctionOptions> = {
|
||||
keyArgs?: KeySpecifier | KeyArgsFunction | false;
|
||||
read?: FieldReadFunction<TExisting, TReadResult, TOptions>;
|
||||
merge?: FieldMergeFunction<TExisting, TIncoming, TOptions> | boolean;
|
||||
};
|
||||
export declare type StorageType = Record<string, any>;
|
||||
export interface FieldFunctionOptions<TArgs = Record<string, any>, TVars = Record<string, any>> {
|
||||
args: TArgs | null;
|
||||
fieldName: string;
|
||||
storeFieldName: string;
|
||||
field: FieldNode | null;
|
||||
variables?: TVars;
|
||||
isReference: typeof isReference;
|
||||
toReference: ToReferenceFunction;
|
||||
storage: StorageType;
|
||||
cache: InMemoryCache;
|
||||
readField: ReadFieldFunction;
|
||||
canRead: CanReadFunction;
|
||||
mergeObjects: MergeObjectsFunction;
|
||||
}
|
||||
declare type MergeObjectsFunction = <T extends StoreObject | Reference>(existing: T, incoming: T) => T;
|
||||
export declare type FieldReadFunction<TExisting = any, TReadResult = TExisting, TOptions extends FieldFunctionOptions = FieldFunctionOptions> = (existing: SafeReadonly<TExisting> | undefined, options: TOptions) => TReadResult | undefined;
|
||||
export declare type FieldMergeFunction<TExisting = any, TIncoming = TExisting, TOptions extends FieldFunctionOptions = FieldFunctionOptions> = (existing: SafeReadonly<TExisting> | undefined, incoming: SafeReadonly<TIncoming>, options: TOptions) => SafeReadonly<TExisting>;
|
||||
export declare type PossibleTypesMap = {
|
||||
[supertype: string]: string[];
|
||||
};
|
||||
export declare class Policies {
|
||||
private config;
|
||||
private typePolicies;
|
||||
private toBeAdded;
|
||||
private supertypeMap;
|
||||
private fuzzySubtypes;
|
||||
readonly cache: InMemoryCache;
|
||||
readonly rootIdsByTypename: Record<string, string>;
|
||||
readonly rootTypenamesById: Record<string, string>;
|
||||
readonly usingPossibleTypes = false;
|
||||
constructor(config: {
|
||||
cache: InMemoryCache;
|
||||
dataIdFromObject?: KeyFieldsFunction;
|
||||
possibleTypes?: PossibleTypesMap;
|
||||
typePolicies?: TypePolicies;
|
||||
});
|
||||
identify(object: StoreObject, partialContext?: Partial<KeyFieldsContext>): [string?, StoreObject?];
|
||||
addTypePolicies(typePolicies: TypePolicies): void;
|
||||
private updateTypePolicy;
|
||||
private setRootTypename;
|
||||
addPossibleTypes(possibleTypes: PossibleTypesMap): void;
|
||||
private getTypePolicy;
|
||||
private getFieldPolicy;
|
||||
private getSupertypeSet;
|
||||
fragmentMatches(fragment: InlineFragmentNode | FragmentDefinitionNode, typename: string | undefined, result?: Record<string, any>, variables?: Record<string, any>): boolean;
|
||||
hasKeyArgs(typename: string | undefined, fieldName: string): boolean;
|
||||
getStoreFieldName(fieldSpec: FieldSpecifier): string;
|
||||
readField<V = StoreValue>(options: ReadFieldOptions, context: ReadMergeModifyContext): SafeReadonly<V> | undefined;
|
||||
getReadFunction(typename: string | undefined, fieldName: string): FieldReadFunction | undefined;
|
||||
getMergeFunction(parentTypename: string | undefined, fieldName: string, childTypename: string | undefined): FieldMergeFunction | undefined;
|
||||
runMergeFunction(existing: StoreValue, incoming: StoreValue, { field, typename, merge }: MergeInfo, context: WriteContext, storage?: StorageType): any;
|
||||
}
|
||||
export declare function normalizeReadFieldOptions(readFieldArgs: IArguments, objectOrReference: StoreObject | Reference | undefined, variables?: ReadMergeModifyContext["variables"]): ReadFieldOptions;
|
||||
export {};
|
||||
//# sourceMappingURL=policies.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/policies.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/policies.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"policies.d.ts","sourceRoot":"","sources":["../../../src/cache/inmemory/policies.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,SAAS,EACV,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,WAAW,EAEX,UAAU,EACV,WAAW,EAEX,SAAS,EACT,WAAW,EAIZ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AAgB,CACrB,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,kBAAkB,GAAG,SAAS;IAc1B,gBAAgB,CACrB,QAAQ,EAAE,UAAU,EACpB,QAAQ,EAAE,UAAU,EACpB,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,SAAS,EACrC,OAAO,EAAE,YAAY,EACrB,OAAO,CAAC,EAAE,WAAW;CA+CxB;AAmCD,wBAAgB,yBAAyB,CACvC,aAAa,EAAE,UAAU,EACzB,iBAAiB,EAAE,WAAW,GAAG,SAAS,GAAG,SAAS,EACtD,SAAS,CAAC,EAAE,sBAAsB,CAAC,WAAW,CAAC,GAC9C,gBAAgB,CAqClB"}
|
||||
416
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/policies.js
generated
vendored
Normal file
416
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/policies.js
generated
vendored
Normal file
@@ -0,0 +1,416 @@
|
||||
import { __assign, __rest } from "tslib";
|
||||
import { invariant, InvariantError } from "../../utilities/globals/index.js";
|
||||
import { storeKeyNameFromField, argumentsObjectFromField, isReference, getStoreKeyName, isNonNullObject, stringifyForDisplay, } from "../../utilities/index.js";
|
||||
import { hasOwn, fieldNameFromStoreName, storeValueIsStoreObject, selectionSetMatchesResult, TypeOrFieldNameRegExp, defaultDataIdFromObject, isArray, } from "./helpers.js";
|
||||
import { cacheSlot } from "./reactiveVars.js";
|
||||
import { canonicalStringify } from "./object-canon.js";
|
||||
import { keyArgsFnFromSpecifier, keyFieldsFnFromSpecifier } from "./key-extractor.js";
|
||||
getStoreKeyName.setStringify(canonicalStringify);
|
||||
function argsFromFieldSpecifier(spec) {
|
||||
return spec.args !== void 0 ? spec.args :
|
||||
spec.field ? argumentsObjectFromField(spec.field, spec.variables) : null;
|
||||
}
|
||||
var nullKeyFieldsFn = function () { return void 0; };
|
||||
var simpleKeyArgsFn = function (_args, context) { return context.fieldName; };
|
||||
var mergeTrueFn = function (existing, incoming, _a) {
|
||||
var mergeObjects = _a.mergeObjects;
|
||||
return mergeObjects(existing, incoming);
|
||||
};
|
||||
var mergeFalseFn = function (_, incoming) { return incoming; };
|
||||
var Policies = (function () {
|
||||
function Policies(config) {
|
||||
this.config = config;
|
||||
this.typePolicies = Object.create(null);
|
||||
this.toBeAdded = Object.create(null);
|
||||
this.supertypeMap = new Map();
|
||||
this.fuzzySubtypes = new Map();
|
||||
this.rootIdsByTypename = Object.create(null);
|
||||
this.rootTypenamesById = Object.create(null);
|
||||
this.usingPossibleTypes = false;
|
||||
this.config = __assign({ dataIdFromObject: defaultDataIdFromObject }, config);
|
||||
this.cache = this.config.cache;
|
||||
this.setRootTypename("Query");
|
||||
this.setRootTypename("Mutation");
|
||||
this.setRootTypename("Subscription");
|
||||
if (config.possibleTypes) {
|
||||
this.addPossibleTypes(config.possibleTypes);
|
||||
}
|
||||
if (config.typePolicies) {
|
||||
this.addTypePolicies(config.typePolicies);
|
||||
}
|
||||
}
|
||||
Policies.prototype.identify = function (object, partialContext) {
|
||||
var _a;
|
||||
var policies = this;
|
||||
var typename = partialContext && (partialContext.typename ||
|
||||
((_a = partialContext.storeObject) === null || _a === void 0 ? void 0 : _a.__typename)) || object.__typename;
|
||||
if (typename === this.rootTypenamesById.ROOT_QUERY) {
|
||||
return ["ROOT_QUERY"];
|
||||
}
|
||||
var storeObject = partialContext && partialContext.storeObject || object;
|
||||
var context = __assign(__assign({}, partialContext), { typename: typename, storeObject: storeObject, readField: partialContext && partialContext.readField || function () {
|
||||
var options = normalizeReadFieldOptions(arguments, storeObject);
|
||||
return policies.readField(options, {
|
||||
store: policies.cache["data"],
|
||||
variables: options.variables,
|
||||
});
|
||||
} });
|
||||
var id;
|
||||
var policy = typename && this.getTypePolicy(typename);
|
||||
var keyFn = policy && policy.keyFn || this.config.dataIdFromObject;
|
||||
while (keyFn) {
|
||||
var specifierOrId = keyFn(object, context);
|
||||
if (isArray(specifierOrId)) {
|
||||
keyFn = keyFieldsFnFromSpecifier(specifierOrId);
|
||||
}
|
||||
else {
|
||||
id = specifierOrId;
|
||||
break;
|
||||
}
|
||||
}
|
||||
id = id ? String(id) : void 0;
|
||||
return context.keyObject ? [id, context.keyObject] : [id];
|
||||
};
|
||||
Policies.prototype.addTypePolicies = function (typePolicies) {
|
||||
var _this = this;
|
||||
Object.keys(typePolicies).forEach(function (typename) {
|
||||
var _a = typePolicies[typename], queryType = _a.queryType, mutationType = _a.mutationType, subscriptionType = _a.subscriptionType, incoming = __rest(_a, ["queryType", "mutationType", "subscriptionType"]);
|
||||
if (queryType)
|
||||
_this.setRootTypename("Query", typename);
|
||||
if (mutationType)
|
||||
_this.setRootTypename("Mutation", typename);
|
||||
if (subscriptionType)
|
||||
_this.setRootTypename("Subscription", typename);
|
||||
if (hasOwn.call(_this.toBeAdded, typename)) {
|
||||
_this.toBeAdded[typename].push(incoming);
|
||||
}
|
||||
else {
|
||||
_this.toBeAdded[typename] = [incoming];
|
||||
}
|
||||
});
|
||||
};
|
||||
Policies.prototype.updateTypePolicy = function (typename, incoming) {
|
||||
var _this = this;
|
||||
var existing = this.getTypePolicy(typename);
|
||||
var keyFields = incoming.keyFields, fields = incoming.fields;
|
||||
function setMerge(existing, merge) {
|
||||
existing.merge =
|
||||
typeof merge === "function" ? merge :
|
||||
merge === true ? mergeTrueFn :
|
||||
merge === false ? mergeFalseFn :
|
||||
existing.merge;
|
||||
}
|
||||
setMerge(existing, incoming.merge);
|
||||
existing.keyFn =
|
||||
keyFields === false ? nullKeyFieldsFn :
|
||||
isArray(keyFields) ? keyFieldsFnFromSpecifier(keyFields) :
|
||||
typeof keyFields === "function" ? keyFields :
|
||||
existing.keyFn;
|
||||
if (fields) {
|
||||
Object.keys(fields).forEach(function (fieldName) {
|
||||
var existing = _this.getFieldPolicy(typename, fieldName, true);
|
||||
var incoming = fields[fieldName];
|
||||
if (typeof incoming === "function") {
|
||||
existing.read = incoming;
|
||||
}
|
||||
else {
|
||||
var keyArgs = incoming.keyArgs, read = incoming.read, merge = incoming.merge;
|
||||
existing.keyFn =
|
||||
keyArgs === false ? simpleKeyArgsFn :
|
||||
isArray(keyArgs) ? keyArgsFnFromSpecifier(keyArgs) :
|
||||
typeof keyArgs === "function" ? keyArgs :
|
||||
existing.keyFn;
|
||||
if (typeof read === "function") {
|
||||
existing.read = read;
|
||||
}
|
||||
setMerge(existing, merge);
|
||||
}
|
||||
if (existing.read && existing.merge) {
|
||||
existing.keyFn = existing.keyFn || simpleKeyArgsFn;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Policies.prototype.setRootTypename = function (which, typename) {
|
||||
if (typename === void 0) { typename = which; }
|
||||
var rootId = "ROOT_" + which.toUpperCase();
|
||||
var old = this.rootTypenamesById[rootId];
|
||||
if (typename !== old) {
|
||||
__DEV__ ? invariant(!old || old === which, "Cannot change root ".concat(which, " __typename more than once")) : invariant(!old || old === which, 3);
|
||||
if (old)
|
||||
delete this.rootIdsByTypename[old];
|
||||
this.rootIdsByTypename[typename] = rootId;
|
||||
this.rootTypenamesById[rootId] = typename;
|
||||
}
|
||||
};
|
||||
Policies.prototype.addPossibleTypes = function (possibleTypes) {
|
||||
var _this = this;
|
||||
this.usingPossibleTypes = true;
|
||||
Object.keys(possibleTypes).forEach(function (supertype) {
|
||||
_this.getSupertypeSet(supertype, true);
|
||||
possibleTypes[supertype].forEach(function (subtype) {
|
||||
_this.getSupertypeSet(subtype, true).add(supertype);
|
||||
var match = subtype.match(TypeOrFieldNameRegExp);
|
||||
if (!match || match[0] !== subtype) {
|
||||
_this.fuzzySubtypes.set(subtype, new RegExp(subtype));
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Policies.prototype.getTypePolicy = function (typename) {
|
||||
var _this = this;
|
||||
if (!hasOwn.call(this.typePolicies, typename)) {
|
||||
var policy_1 = this.typePolicies[typename] = Object.create(null);
|
||||
policy_1.fields = Object.create(null);
|
||||
var supertypes = this.supertypeMap.get(typename);
|
||||
if (supertypes && supertypes.size) {
|
||||
supertypes.forEach(function (supertype) {
|
||||
var _a = _this.getTypePolicy(supertype), fields = _a.fields, rest = __rest(_a, ["fields"]);
|
||||
Object.assign(policy_1, rest);
|
||||
Object.assign(policy_1.fields, fields);
|
||||
});
|
||||
}
|
||||
}
|
||||
var inbox = this.toBeAdded[typename];
|
||||
if (inbox && inbox.length) {
|
||||
inbox.splice(0).forEach(function (policy) {
|
||||
_this.updateTypePolicy(typename, policy);
|
||||
});
|
||||
}
|
||||
return this.typePolicies[typename];
|
||||
};
|
||||
Policies.prototype.getFieldPolicy = function (typename, fieldName, createIfMissing) {
|
||||
if (typename) {
|
||||
var fieldPolicies = this.getTypePolicy(typename).fields;
|
||||
return fieldPolicies[fieldName] || (createIfMissing && (fieldPolicies[fieldName] = Object.create(null)));
|
||||
}
|
||||
};
|
||||
Policies.prototype.getSupertypeSet = function (subtype, createIfMissing) {
|
||||
var supertypeSet = this.supertypeMap.get(subtype);
|
||||
if (!supertypeSet && createIfMissing) {
|
||||
this.supertypeMap.set(subtype, supertypeSet = new Set());
|
||||
}
|
||||
return supertypeSet;
|
||||
};
|
||||
Policies.prototype.fragmentMatches = function (fragment, typename, result, variables) {
|
||||
var _this = this;
|
||||
if (!fragment.typeCondition)
|
||||
return true;
|
||||
if (!typename)
|
||||
return false;
|
||||
var supertype = fragment.typeCondition.name.value;
|
||||
if (typename === supertype)
|
||||
return true;
|
||||
if (this.usingPossibleTypes &&
|
||||
this.supertypeMap.has(supertype)) {
|
||||
var typenameSupertypeSet = this.getSupertypeSet(typename, true);
|
||||
var workQueue_1 = [typenameSupertypeSet];
|
||||
var maybeEnqueue_1 = function (subtype) {
|
||||
var supertypeSet = _this.getSupertypeSet(subtype, false);
|
||||
if (supertypeSet &&
|
||||
supertypeSet.size &&
|
||||
workQueue_1.indexOf(supertypeSet) < 0) {
|
||||
workQueue_1.push(supertypeSet);
|
||||
}
|
||||
};
|
||||
var needToCheckFuzzySubtypes = !!(result && this.fuzzySubtypes.size);
|
||||
var checkingFuzzySubtypes = false;
|
||||
for (var i = 0; i < workQueue_1.length; ++i) {
|
||||
var supertypeSet = workQueue_1[i];
|
||||
if (supertypeSet.has(supertype)) {
|
||||
if (!typenameSupertypeSet.has(supertype)) {
|
||||
if (checkingFuzzySubtypes) {
|
||||
__DEV__ && invariant.warn("Inferring subtype ".concat(typename, " of supertype ").concat(supertype));
|
||||
}
|
||||
typenameSupertypeSet.add(supertype);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
supertypeSet.forEach(maybeEnqueue_1);
|
||||
if (needToCheckFuzzySubtypes &&
|
||||
i === workQueue_1.length - 1 &&
|
||||
selectionSetMatchesResult(fragment.selectionSet, result, variables)) {
|
||||
needToCheckFuzzySubtypes = false;
|
||||
checkingFuzzySubtypes = true;
|
||||
this.fuzzySubtypes.forEach(function (regExp, fuzzyString) {
|
||||
var match = typename.match(regExp);
|
||||
if (match && match[0] === typename) {
|
||||
maybeEnqueue_1(fuzzyString);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
Policies.prototype.hasKeyArgs = function (typename, fieldName) {
|
||||
var policy = this.getFieldPolicy(typename, fieldName, false);
|
||||
return !!(policy && policy.keyFn);
|
||||
};
|
||||
Policies.prototype.getStoreFieldName = function (fieldSpec) {
|
||||
var typename = fieldSpec.typename, fieldName = fieldSpec.fieldName;
|
||||
var policy = this.getFieldPolicy(typename, fieldName, false);
|
||||
var storeFieldName;
|
||||
var keyFn = policy && policy.keyFn;
|
||||
if (keyFn && typename) {
|
||||
var context = {
|
||||
typename: typename,
|
||||
fieldName: fieldName,
|
||||
field: fieldSpec.field || null,
|
||||
variables: fieldSpec.variables,
|
||||
};
|
||||
var args = argsFromFieldSpecifier(fieldSpec);
|
||||
while (keyFn) {
|
||||
var specifierOrString = keyFn(args, context);
|
||||
if (isArray(specifierOrString)) {
|
||||
keyFn = keyArgsFnFromSpecifier(specifierOrString);
|
||||
}
|
||||
else {
|
||||
storeFieldName = specifierOrString || fieldName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (storeFieldName === void 0) {
|
||||
storeFieldName = fieldSpec.field
|
||||
? storeKeyNameFromField(fieldSpec.field, fieldSpec.variables)
|
||||
: getStoreKeyName(fieldName, argsFromFieldSpecifier(fieldSpec));
|
||||
}
|
||||
if (storeFieldName === false) {
|
||||
return fieldName;
|
||||
}
|
||||
return fieldName === fieldNameFromStoreName(storeFieldName)
|
||||
? storeFieldName
|
||||
: fieldName + ":" + storeFieldName;
|
||||
};
|
||||
Policies.prototype.readField = function (options, context) {
|
||||
var objectOrReference = options.from;
|
||||
if (!objectOrReference)
|
||||
return;
|
||||
var nameOrField = options.field || options.fieldName;
|
||||
if (!nameOrField)
|
||||
return;
|
||||
if (options.typename === void 0) {
|
||||
var typename = context.store.getFieldValue(objectOrReference, "__typename");
|
||||
if (typename)
|
||||
options.typename = typename;
|
||||
}
|
||||
var storeFieldName = this.getStoreFieldName(options);
|
||||
var fieldName = fieldNameFromStoreName(storeFieldName);
|
||||
var existing = context.store.getFieldValue(objectOrReference, storeFieldName);
|
||||
var policy = this.getFieldPolicy(options.typename, fieldName, false);
|
||||
var read = policy && policy.read;
|
||||
if (read) {
|
||||
var readOptions = makeFieldFunctionOptions(this, objectOrReference, options, context, context.store.getStorage(isReference(objectOrReference)
|
||||
? objectOrReference.__ref
|
||||
: objectOrReference, storeFieldName));
|
||||
return cacheSlot.withValue(this.cache, read, [existing, readOptions]);
|
||||
}
|
||||
return existing;
|
||||
};
|
||||
Policies.prototype.getReadFunction = function (typename, fieldName) {
|
||||
var policy = this.getFieldPolicy(typename, fieldName, false);
|
||||
return policy && policy.read;
|
||||
};
|
||||
Policies.prototype.getMergeFunction = function (parentTypename, fieldName, childTypename) {
|
||||
var policy = this.getFieldPolicy(parentTypename, fieldName, false);
|
||||
var merge = policy && policy.merge;
|
||||
if (!merge && childTypename) {
|
||||
policy = this.getTypePolicy(childTypename);
|
||||
merge = policy && policy.merge;
|
||||
}
|
||||
return merge;
|
||||
};
|
||||
Policies.prototype.runMergeFunction = function (existing, incoming, _a, context, storage) {
|
||||
var field = _a.field, typename = _a.typename, merge = _a.merge;
|
||||
if (merge === mergeTrueFn) {
|
||||
return makeMergeObjectsFunction(context.store)(existing, incoming);
|
||||
}
|
||||
if (merge === mergeFalseFn) {
|
||||
return incoming;
|
||||
}
|
||||
if (context.overwrite) {
|
||||
existing = void 0;
|
||||
}
|
||||
return merge(existing, incoming, makeFieldFunctionOptions(this, void 0, { typename: typename, fieldName: field.name.value, field: field, variables: context.variables }, context, storage || Object.create(null)));
|
||||
};
|
||||
return Policies;
|
||||
}());
|
||||
export { Policies };
|
||||
function makeFieldFunctionOptions(policies, objectOrReference, fieldSpec, context, storage) {
|
||||
var storeFieldName = policies.getStoreFieldName(fieldSpec);
|
||||
var fieldName = fieldNameFromStoreName(storeFieldName);
|
||||
var variables = fieldSpec.variables || context.variables;
|
||||
var _a = context.store, toReference = _a.toReference, canRead = _a.canRead;
|
||||
return {
|
||||
args: argsFromFieldSpecifier(fieldSpec),
|
||||
field: fieldSpec.field || null,
|
||||
fieldName: fieldName,
|
||||
storeFieldName: storeFieldName,
|
||||
variables: variables,
|
||||
isReference: isReference,
|
||||
toReference: toReference,
|
||||
storage: storage,
|
||||
cache: policies.cache,
|
||||
canRead: canRead,
|
||||
readField: function () {
|
||||
return policies.readField(normalizeReadFieldOptions(arguments, objectOrReference, context), context);
|
||||
},
|
||||
mergeObjects: makeMergeObjectsFunction(context.store),
|
||||
};
|
||||
}
|
||||
export function normalizeReadFieldOptions(readFieldArgs, objectOrReference, variables) {
|
||||
var fieldNameOrOptions = readFieldArgs[0], from = readFieldArgs[1], argc = readFieldArgs.length;
|
||||
var options;
|
||||
if (typeof fieldNameOrOptions === "string") {
|
||||
options = {
|
||||
fieldName: fieldNameOrOptions,
|
||||
from: argc > 1 ? from : objectOrReference,
|
||||
};
|
||||
}
|
||||
else {
|
||||
options = __assign({}, fieldNameOrOptions);
|
||||
if (!hasOwn.call(options, "from")) {
|
||||
options.from = objectOrReference;
|
||||
}
|
||||
}
|
||||
if (__DEV__ && options.from === void 0) {
|
||||
__DEV__ && invariant.warn("Undefined 'from' passed to readField with arguments ".concat(stringifyForDisplay(Array.from(readFieldArgs))));
|
||||
}
|
||||
if (void 0 === options.variables) {
|
||||
options.variables = variables;
|
||||
}
|
||||
return options;
|
||||
}
|
||||
function makeMergeObjectsFunction(store) {
|
||||
return function mergeObjects(existing, incoming) {
|
||||
if (isArray(existing) || isArray(incoming)) {
|
||||
throw __DEV__ ? new InvariantError("Cannot automatically merge arrays") : new InvariantError(4);
|
||||
}
|
||||
if (isNonNullObject(existing) &&
|
||||
isNonNullObject(incoming)) {
|
||||
var eType = store.getFieldValue(existing, "__typename");
|
||||
var iType = store.getFieldValue(incoming, "__typename");
|
||||
var typesDiffer = eType && iType && eType !== iType;
|
||||
if (typesDiffer) {
|
||||
return incoming;
|
||||
}
|
||||
if (isReference(existing) &&
|
||||
storeValueIsStoreObject(incoming)) {
|
||||
store.merge(existing.__ref, incoming);
|
||||
return existing;
|
||||
}
|
||||
if (storeValueIsStoreObject(existing) &&
|
||||
isReference(incoming)) {
|
||||
store.merge(existing, incoming.__ref);
|
||||
return incoming;
|
||||
}
|
||||
if (storeValueIsStoreObject(existing) &&
|
||||
storeValueIsStoreObject(incoming)) {
|
||||
return __assign(__assign({}, existing), incoming);
|
||||
}
|
||||
}
|
||||
return incoming;
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=policies.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/policies.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/policies.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
18
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/reactiveVars.d.ts
generated
vendored
Normal file
18
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/reactiveVars.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { ApolloCache } from '../../core';
|
||||
export interface ReactiveVar<T> {
|
||||
(newValue?: T): T;
|
||||
onNextChange(listener: ReactiveListener<T>): () => void;
|
||||
attachCache(cache: ApolloCache<any>): this;
|
||||
forgetCache(cache: ApolloCache<any>): boolean;
|
||||
}
|
||||
export declare type ReactiveListener<T> = (value: T) => any;
|
||||
export declare const cacheSlot: {
|
||||
readonly id: string;
|
||||
hasValue(): boolean;
|
||||
getValue(): ApolloCache<any> | undefined;
|
||||
withValue<TResult, TArgs extends any[], TThis = any>(value: ApolloCache<any>, callback: (this: TThis, ...args: TArgs) => TResult, args?: TArgs | undefined, thisArg?: TThis | undefined): TResult;
|
||||
};
|
||||
export declare function forgetCache(cache: ApolloCache<any>): void;
|
||||
export declare function recallCache(cache: ApolloCache<any>): void;
|
||||
export declare function makeVar<T>(value: T): ReactiveVar<T>;
|
||||
//# sourceMappingURL=reactiveVars.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/reactiveVars.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/reactiveVars.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"reactiveVars.d.ts","sourceRoot":"","sources":["../../../src/cache/inmemory/reactiveVars.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAClB,YAAY,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,CAAC;IACxD,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAC3C,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;CAC/C;AAED,oBAAY,gBAAgB,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,GAAG,CAAC;AAIpD,eAAO,MAAM,SAAS;;;;;CAA+B,CAAC;AAkBtD,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,QAElD;AAUD,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,QAElD;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAoDnD"}
|
||||
65
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/reactiveVars.js
generated
vendored
Normal file
65
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/reactiveVars.js
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
import { dep } from "optimism";
|
||||
import { Slot } from "@wry/context";
|
||||
export var cacheSlot = new Slot();
|
||||
var cacheInfoMap = new WeakMap();
|
||||
function getCacheInfo(cache) {
|
||||
var info = cacheInfoMap.get(cache);
|
||||
if (!info) {
|
||||
cacheInfoMap.set(cache, info = {
|
||||
vars: new Set,
|
||||
dep: dep(),
|
||||
});
|
||||
}
|
||||
return info;
|
||||
}
|
||||
export function forgetCache(cache) {
|
||||
getCacheInfo(cache).vars.forEach(function (rv) { return rv.forgetCache(cache); });
|
||||
}
|
||||
export function recallCache(cache) {
|
||||
getCacheInfo(cache).vars.forEach(function (rv) { return rv.attachCache(cache); });
|
||||
}
|
||||
export function makeVar(value) {
|
||||
var caches = new Set();
|
||||
var listeners = new Set();
|
||||
var rv = function (newValue) {
|
||||
if (arguments.length > 0) {
|
||||
if (value !== newValue) {
|
||||
value = newValue;
|
||||
caches.forEach(function (cache) {
|
||||
getCacheInfo(cache).dep.dirty(rv);
|
||||
broadcast(cache);
|
||||
});
|
||||
var oldListeners = Array.from(listeners);
|
||||
listeners.clear();
|
||||
oldListeners.forEach(function (listener) { return listener(value); });
|
||||
}
|
||||
}
|
||||
else {
|
||||
var cache = cacheSlot.getValue();
|
||||
if (cache) {
|
||||
attach(cache);
|
||||
getCacheInfo(cache).dep(rv);
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
rv.onNextChange = function (listener) {
|
||||
listeners.add(listener);
|
||||
return function () {
|
||||
listeners.delete(listener);
|
||||
};
|
||||
};
|
||||
var attach = rv.attachCache = function (cache) {
|
||||
caches.add(cache);
|
||||
getCacheInfo(cache).vars.add(rv);
|
||||
return rv;
|
||||
};
|
||||
rv.forgetCache = function (cache) { return caches.delete(cache); };
|
||||
return rv;
|
||||
}
|
||||
function broadcast(cache) {
|
||||
if (cache.broadcastWatches) {
|
||||
cache.broadcastWatches();
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=reactiveVars.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/reactiveVars.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/reactiveVars.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
35
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/readFromStore.d.ts
generated
vendored
Normal file
35
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/readFromStore.d.ts
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
import { SelectionSetNode } from 'graphql';
|
||||
import { Reference, StoreObject } from '../../utilities';
|
||||
import { Cache } from '../core/types/Cache';
|
||||
import { DiffQueryAgainstStoreOptions, ReadMergeModifyContext } from './types';
|
||||
import { InMemoryCache } from './inMemoryCache';
|
||||
import { MissingTree } from '../core/types/common';
|
||||
import { ObjectCanon } from './object-canon';
|
||||
export declare type VariableMap = {
|
||||
[name: string]: any;
|
||||
};
|
||||
export declare type ExecResult<R = any> = {
|
||||
result: R;
|
||||
missing?: MissingTree;
|
||||
};
|
||||
export interface StoreReaderConfig {
|
||||
cache: InMemoryCache;
|
||||
addTypename?: boolean;
|
||||
resultCacheMaxSize?: number;
|
||||
canonizeResults?: boolean;
|
||||
canon?: ObjectCanon;
|
||||
}
|
||||
export declare class StoreReader {
|
||||
private executeSelectionSet;
|
||||
private executeSubSelectedArray;
|
||||
private config;
|
||||
private knownResults;
|
||||
canon: ObjectCanon;
|
||||
resetCanon(): void;
|
||||
constructor(config: StoreReaderConfig);
|
||||
diffQueryAgainstStore<T>({ store, query, rootId, variables, returnPartialData, canonizeResults, }: DiffQueryAgainstStoreOptions): Cache.DiffResult<T>;
|
||||
isFresh(result: Record<string, any>, parent: StoreObject | Reference, selectionSet: SelectionSetNode, context: ReadMergeModifyContext): boolean;
|
||||
private execSelectionSetImpl;
|
||||
private execSubSelectedArrayImpl;
|
||||
}
|
||||
//# sourceMappingURL=readFromStore.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/readFromStore.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/readFromStore.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"readFromStore.d.ts","sourceRoot":"","sources":["../../../src/cache/inmemory/readFromStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAGL,SAAS,EAGT,WAAW,EAeZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAq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V,OAAO,CAAC,oBAAoB;IAiI5B,OAAO,CAAC,wBAAwB;CAyDjC"}
|
||||
272
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/readFromStore.js
generated
vendored
Normal file
272
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/readFromStore.js
generated
vendored
Normal file
@@ -0,0 +1,272 @@
|
||||
import { __assign } from "tslib";
|
||||
import { invariant } from "../../utilities/globals/index.js";
|
||||
import { wrap } from 'optimism';
|
||||
import { isField, resultKeyNameFromField, isReference, makeReference, createFragmentMap, shouldInclude, addTypenameToDocument, getDefaultValues, getFragmentDefinitions, getMainDefinition, getQueryDefinition, DeepMerger, getFragmentFromSelection, maybeDeepFreeze, isNonNullObject, canUseWeakMap, compact, } from "../../utilities/index.js";
|
||||
import { maybeDependOnExistenceOfEntity, supportsResultCaching } from "./entityStore.js";
|
||||
import { getTypenameFromStoreObject, isArray, shouldCanonizeResults } from "./helpers.js";
|
||||
import { MissingFieldError } from "../core/types/common.js";
|
||||
import { canonicalStringify, ObjectCanon } from "./object-canon.js";
|
||||
;
|
||||
function execSelectionSetKeyArgs(options) {
|
||||
return [
|
||||
options.selectionSet,
|
||||
options.objectOrReference,
|
||||
options.context,
|
||||
options.context.canonizeResults,
|
||||
];
|
||||
}
|
||||
var StoreReader = (function () {
|
||||
function StoreReader(config) {
|
||||
var _this = this;
|
||||
this.knownResults = new (canUseWeakMap ? WeakMap : Map)();
|
||||
this.config = compact(config, {
|
||||
addTypename: config.addTypename !== false,
|
||||
canonizeResults: shouldCanonizeResults(config),
|
||||
});
|
||||
this.canon = config.canon || new ObjectCanon;
|
||||
this.executeSelectionSet = wrap(function (options) {
|
||||
var _a;
|
||||
var canonizeResults = options.context.canonizeResults;
|
||||
var peekArgs = execSelectionSetKeyArgs(options);
|
||||
peekArgs[3] = !canonizeResults;
|
||||
var other = (_a = _this.executeSelectionSet).peek.apply(_a, peekArgs);
|
||||
if (other) {
|
||||
if (canonizeResults) {
|
||||
return __assign(__assign({}, other), { result: _this.canon.admit(other.result) });
|
||||
}
|
||||
return other;
|
||||
}
|
||||
maybeDependOnExistenceOfEntity(options.context.store, options.enclosingRef.__ref);
|
||||
return _this.execSelectionSetImpl(options);
|
||||
}, {
|
||||
max: this.config.resultCacheMaxSize,
|
||||
keyArgs: execSelectionSetKeyArgs,
|
||||
makeCacheKey: function (selectionSet, parent, context, canonizeResults) {
|
||||
if (supportsResultCaching(context.store)) {
|
||||
return context.store.makeCacheKey(selectionSet, isReference(parent) ? parent.__ref : parent, context.varString, canonizeResults);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.executeSubSelectedArray = wrap(function (options) {
|
||||
maybeDependOnExistenceOfEntity(options.context.store, options.enclosingRef.__ref);
|
||||
return _this.execSubSelectedArrayImpl(options);
|
||||
}, {
|
||||
max: this.config.resultCacheMaxSize,
|
||||
makeCacheKey: function (_a) {
|
||||
var field = _a.field, array = _a.array, context = _a.context;
|
||||
if (supportsResultCaching(context.store)) {
|
||||
return context.store.makeCacheKey(field, array, context.varString);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
StoreReader.prototype.resetCanon = function () {
|
||||
this.canon = new ObjectCanon;
|
||||
};
|
||||
StoreReader.prototype.diffQueryAgainstStore = function (_a) {
|
||||
var store = _a.store, query = _a.query, _b = _a.rootId, rootId = _b === void 0 ? 'ROOT_QUERY' : _b, variables = _a.variables, _c = _a.returnPartialData, returnPartialData = _c === void 0 ? true : _c, _d = _a.canonizeResults, canonizeResults = _d === void 0 ? this.config.canonizeResults : _d;
|
||||
var policies = this.config.cache.policies;
|
||||
variables = __assign(__assign({}, getDefaultValues(getQueryDefinition(query))), variables);
|
||||
var rootRef = makeReference(rootId);
|
||||
var merger = new DeepMerger;
|
||||
var execResult = this.executeSelectionSet({
|
||||
selectionSet: getMainDefinition(query).selectionSet,
|
||||
objectOrReference: rootRef,
|
||||
enclosingRef: rootRef,
|
||||
context: {
|
||||
store: store,
|
||||
query: query,
|
||||
policies: policies,
|
||||
variables: variables,
|
||||
varString: canonicalStringify(variables),
|
||||
canonizeResults: canonizeResults,
|
||||
fragmentMap: createFragmentMap(getFragmentDefinitions(query)),
|
||||
merge: function (a, b) {
|
||||
return merger.merge(a, b);
|
||||
},
|
||||
},
|
||||
});
|
||||
var missing;
|
||||
if (execResult.missing) {
|
||||
missing = [new MissingFieldError(firstMissing(execResult.missing), execResult.missing, query, variables)];
|
||||
if (!returnPartialData) {
|
||||
throw missing[0];
|
||||
}
|
||||
}
|
||||
return {
|
||||
result: execResult.result,
|
||||
complete: !missing,
|
||||
missing: missing,
|
||||
};
|
||||
};
|
||||
StoreReader.prototype.isFresh = function (result, parent, selectionSet, context) {
|
||||
if (supportsResultCaching(context.store) &&
|
||||
this.knownResults.get(result) === selectionSet) {
|
||||
var latest = this.executeSelectionSet.peek(selectionSet, parent, context, this.canon.isKnown(result));
|
||||
if (latest && result === latest.result) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
StoreReader.prototype.execSelectionSetImpl = function (_a) {
|
||||
var _this = this;
|
||||
var selectionSet = _a.selectionSet, objectOrReference = _a.objectOrReference, enclosingRef = _a.enclosingRef, context = _a.context;
|
||||
if (isReference(objectOrReference) &&
|
||||
!context.policies.rootTypenamesById[objectOrReference.__ref] &&
|
||||
!context.store.has(objectOrReference.__ref)) {
|
||||
return {
|
||||
result: this.canon.empty,
|
||||
missing: "Dangling reference to missing ".concat(objectOrReference.__ref, " object"),
|
||||
};
|
||||
}
|
||||
var variables = context.variables, policies = context.policies, store = context.store;
|
||||
var typename = store.getFieldValue(objectOrReference, "__typename");
|
||||
var result = {};
|
||||
var missing;
|
||||
if (this.config.addTypename &&
|
||||
typeof typename === "string" &&
|
||||
!policies.rootIdsByTypename[typename]) {
|
||||
result = { __typename: typename };
|
||||
}
|
||||
function handleMissing(result, resultName) {
|
||||
var _a;
|
||||
if (result.missing) {
|
||||
missing = context.merge(missing, (_a = {}, _a[resultName] = result.missing, _a));
|
||||
}
|
||||
return result.result;
|
||||
}
|
||||
var workSet = new Set(selectionSet.selections);
|
||||
workSet.forEach(function (selection) {
|
||||
var _a, _b;
|
||||
if (!shouldInclude(selection, variables))
|
||||
return;
|
||||
if (isField(selection)) {
|
||||
var fieldValue = policies.readField({
|
||||
fieldName: selection.name.value,
|
||||
field: selection,
|
||||
variables: context.variables,
|
||||
from: objectOrReference,
|
||||
}, context);
|
||||
var resultName = resultKeyNameFromField(selection);
|
||||
if (fieldValue === void 0) {
|
||||
if (!addTypenameToDocument.added(selection)) {
|
||||
missing = context.merge(missing, (_a = {},
|
||||
_a[resultName] = "Can't find field '".concat(selection.name.value, "' on ").concat(isReference(objectOrReference)
|
||||
? objectOrReference.__ref + " object"
|
||||
: "object " + JSON.stringify(objectOrReference, null, 2)),
|
||||
_a));
|
||||
}
|
||||
}
|
||||
else if (isArray(fieldValue)) {
|
||||
fieldValue = handleMissing(_this.executeSubSelectedArray({
|
||||
field: selection,
|
||||
array: fieldValue,
|
||||
enclosingRef: enclosingRef,
|
||||
context: context,
|
||||
}), resultName);
|
||||
}
|
||||
else if (!selection.selectionSet) {
|
||||
if (context.canonizeResults) {
|
||||
fieldValue = _this.canon.pass(fieldValue);
|
||||
}
|
||||
}
|
||||
else if (fieldValue != null) {
|
||||
fieldValue = handleMissing(_this.executeSelectionSet({
|
||||
selectionSet: selection.selectionSet,
|
||||
objectOrReference: fieldValue,
|
||||
enclosingRef: isReference(fieldValue) ? fieldValue : enclosingRef,
|
||||
context: context,
|
||||
}), resultName);
|
||||
}
|
||||
if (fieldValue !== void 0) {
|
||||
result = context.merge(result, (_b = {}, _b[resultName] = fieldValue, _b));
|
||||
}
|
||||
}
|
||||
else {
|
||||
var fragment = getFragmentFromSelection(selection, context.fragmentMap);
|
||||
if (fragment && policies.fragmentMatches(fragment, typename)) {
|
||||
fragment.selectionSet.selections.forEach(workSet.add, workSet);
|
||||
}
|
||||
}
|
||||
});
|
||||
var finalResult = { result: result, missing: missing };
|
||||
var frozen = context.canonizeResults
|
||||
? this.canon.admit(finalResult)
|
||||
: maybeDeepFreeze(finalResult);
|
||||
if (frozen.result) {
|
||||
this.knownResults.set(frozen.result, selectionSet);
|
||||
}
|
||||
return frozen;
|
||||
};
|
||||
StoreReader.prototype.execSubSelectedArrayImpl = function (_a) {
|
||||
var _this = this;
|
||||
var field = _a.field, array = _a.array, enclosingRef = _a.enclosingRef, context = _a.context;
|
||||
var missing;
|
||||
function handleMissing(childResult, i) {
|
||||
var _a;
|
||||
if (childResult.missing) {
|
||||
missing = context.merge(missing, (_a = {}, _a[i] = childResult.missing, _a));
|
||||
}
|
||||
return childResult.result;
|
||||
}
|
||||
if (field.selectionSet) {
|
||||
array = array.filter(context.store.canRead);
|
||||
}
|
||||
array = array.map(function (item, i) {
|
||||
if (item === null) {
|
||||
return null;
|
||||
}
|
||||
if (isArray(item)) {
|
||||
return handleMissing(_this.executeSubSelectedArray({
|
||||
field: field,
|
||||
array: item,
|
||||
enclosingRef: enclosingRef,
|
||||
context: context,
|
||||
}), i);
|
||||
}
|
||||
if (field.selectionSet) {
|
||||
return handleMissing(_this.executeSelectionSet({
|
||||
selectionSet: field.selectionSet,
|
||||
objectOrReference: item,
|
||||
enclosingRef: isReference(item) ? item : enclosingRef,
|
||||
context: context,
|
||||
}), i);
|
||||
}
|
||||
if (__DEV__) {
|
||||
assertSelectionSetForIdValue(context.store, field, item);
|
||||
}
|
||||
return item;
|
||||
});
|
||||
return {
|
||||
result: context.canonizeResults ? this.canon.admit(array) : array,
|
||||
missing: missing,
|
||||
};
|
||||
};
|
||||
return StoreReader;
|
||||
}());
|
||||
export { StoreReader };
|
||||
function firstMissing(tree) {
|
||||
try {
|
||||
JSON.stringify(tree, function (_, value) {
|
||||
if (typeof value === "string")
|
||||
throw value;
|
||||
return value;
|
||||
});
|
||||
}
|
||||
catch (result) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
function assertSelectionSetForIdValue(store, field, fieldValue) {
|
||||
if (!field.selectionSet) {
|
||||
var workSet_1 = new Set([fieldValue]);
|
||||
workSet_1.forEach(function (value) {
|
||||
if (isNonNullObject(value)) {
|
||||
__DEV__ ? invariant(!isReference(value), "Missing selection set for object of type ".concat(getTypenameFromStoreObject(store, value), " returned for query field ").concat(field.name.value)) : invariant(!isReference(value), 5);
|
||||
Object.values(value).forEach(workSet_1.add, workSet_1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=readFromStore.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/readFromStore.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/readFromStore.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
79
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/types.d.ts
generated
vendored
Normal file
79
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
import { DocumentNode, FieldNode } from 'graphql';
|
||||
import { Transaction } from '../core/cache';
|
||||
import { StoreObject, StoreValue, Reference } from '../../utilities';
|
||||
import { FieldValueGetter } from './entityStore';
|
||||
import { TypePolicies, PossibleTypesMap, KeyFieldsFunction, StorageType, FieldMergeFunction } from './policies';
|
||||
import { Modifier, Modifiers, ToReferenceFunction, CanReadFunction } from '../core/types/common';
|
||||
export { StoreObject, StoreValue, Reference };
|
||||
export interface IdGetterObj extends Object {
|
||||
__typename?: string;
|
||||
id?: string;
|
||||
_id?: string;
|
||||
}
|
||||
export declare type IdGetter = (value: IdGetterObj) => string | undefined;
|
||||
export interface NormalizedCache {
|
||||
has(dataId: string): boolean;
|
||||
get(dataId: string, fieldName: string): StoreValue;
|
||||
merge(olderId: string, newerObject: StoreObject): void;
|
||||
merge(olderObject: StoreObject, newerId: string): void;
|
||||
modify(dataId: string, fields: Modifiers | Modifier<any>): boolean;
|
||||
delete(dataId: string, fieldName?: string): boolean;
|
||||
clear(): void;
|
||||
toObject(): NormalizedCacheObject;
|
||||
replace(newData: NormalizedCacheObject): void;
|
||||
retain(rootId: string): number;
|
||||
release(rootId: string): number;
|
||||
getFieldValue: FieldValueGetter;
|
||||
toReference: ToReferenceFunction;
|
||||
canRead: CanReadFunction;
|
||||
getStorage(idOrObj: string | StoreObject, ...storeFieldNames: (string | number)[]): StorageType;
|
||||
}
|
||||
export interface NormalizedCacheObject {
|
||||
__META?: {
|
||||
extraRootIds: string[];
|
||||
};
|
||||
[dataId: string]: StoreObject | undefined;
|
||||
}
|
||||
export declare type OptimisticStoreItem = {
|
||||
id: string;
|
||||
data: NormalizedCacheObject;
|
||||
transaction: Transaction<NormalizedCacheObject>;
|
||||
};
|
||||
export declare type ReadQueryOptions = {
|
||||
store: NormalizedCache;
|
||||
query: DocumentNode;
|
||||
variables?: Object;
|
||||
previousResult?: any;
|
||||
canonizeResults?: boolean;
|
||||
rootId?: string;
|
||||
config?: ApolloReducerConfig;
|
||||
};
|
||||
export declare type DiffQueryAgainstStoreOptions = ReadQueryOptions & {
|
||||
returnPartialData?: boolean;
|
||||
};
|
||||
export declare type ApolloReducerConfig = {
|
||||
dataIdFromObject?: KeyFieldsFunction;
|
||||
addTypename?: boolean;
|
||||
};
|
||||
export interface InMemoryCacheConfig extends ApolloReducerConfig {
|
||||
resultCaching?: boolean;
|
||||
possibleTypes?: PossibleTypesMap;
|
||||
typePolicies?: TypePolicies;
|
||||
resultCacheMaxSize?: number;
|
||||
canonizeResults?: boolean;
|
||||
}
|
||||
export interface MergeInfo {
|
||||
field: FieldNode;
|
||||
typename: string | undefined;
|
||||
merge: FieldMergeFunction;
|
||||
}
|
||||
export interface MergeTree {
|
||||
info?: MergeInfo;
|
||||
map: Map<string | number, MergeTree>;
|
||||
}
|
||||
export interface ReadMergeModifyContext {
|
||||
store: NormalizedCache;
|
||||
variables?: Record<string, any>;
|
||||
varString?: string;
|
||||
}
|
||||
//# sourceMappingURL=types.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/types.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/types.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/cache/inmemory/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EACL,WAAW,EACX,UAAU,EACV,SAAS,EACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,QAAQ,EACR,SAAS,EACT,mBAAmB,EACnB,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,CAAA;AAE7C,MAAM,WAAW,WAAY,SAAQ,MAAM;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,CAAC,OAAO,MAAM,QAAQ,GAAG,CAC7B,KAAK,EAAE,WAAW,KACf,MAAM,GAAG,SAAS,CAAC;AAMxB,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,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IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B,CAAC;AAEF,oBAAY,4BAA4B,GAAG,gBAAgB,GAAG;IAC5D,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,KAAK,EAAE,kBAAkB,CAAC;CAC3B;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,GAAG,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,SAAS,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,eAAe,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEhC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
||||
4
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/types.js
generated
vendored
Normal file
4
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/types.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
;
|
||||
;
|
||||
export {};
|
||||
//# sourceMappingURL=types.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/types.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/types.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/cache/inmemory/types.ts"],"names":[],"mappings":"AA0IC,CAAC;AAKD,CAAC","sourcesContent":["import { DocumentNode, FieldNode } from 'graphql';\n\nimport { Transaction } from '../core/cache';\nimport {\n StoreObject,\n StoreValue,\n Reference,\n} from '../../utilities';\nimport { FieldValueGetter } from './entityStore';\nimport {\n TypePolicies,\n PossibleTypesMap,\n KeyFieldsFunction,\n StorageType,\n FieldMergeFunction,\n} from './policies';\nimport {\n Modifier,\n Modifiers,\n ToReferenceFunction,\n CanReadFunction,\n} from '../core/types/common';\n\nexport { StoreObject, StoreValue, Reference }\n\nexport interface IdGetterObj extends Object {\n __typename?: string;\n id?: string;\n _id?: string;\n}\n\nexport declare type IdGetter = (\n value: IdGetterObj,\n) => string | undefined;\n\n/**\n * This is an interface used to access, set and remove\n * StoreObjects from the cache\n */\nexport interface NormalizedCache {\n has(dataId: string): boolean;\n get(dataId: string, fieldName: string): StoreValue;\n\n // The store.merge method allows either argument to be a string ID, but\n // the other argument has to be a StoreObject. Either way, newer fields\n // always take precedence over older fields.\n merge(olderId: string, newerObject: StoreObject): void;\n merge(olderObject: StoreObject, newerId: string): void;\n\n modify(dataId: string, fields: Modifiers | Modifier<any>): boolean;\n delete(dataId: string, fieldName?: string): boolean;\n clear(): void;\n\n // non-Map elements:\n /**\n * returns an Object with key-value pairs matching the contents of the store\n */\n toObject(): NormalizedCacheObject;\n /**\n * replace the state of the store\n */\n replace(newData: NormalizedCacheObject): void;\n\n /**\n * Retain (or release) a given root ID to protect (or expose) it and its\n * transitive child entities from (or to) garbage collection. The current\n * retainment count is returned by both methods. Note that releasing a root\n * ID does not cause that entity to be garbage collected, but merely removes\n * it from the set of root IDs that will be considered during the next\n * mark-and-sweep collection.\n */\n retain(rootId: string): number;\n release(rootId: string): number;\n\n getFieldValue: FieldValueGetter;\n toReference: ToReferenceFunction;\n canRead: CanReadFunction;\n\n getStorage(\n idOrObj: string | StoreObject,\n ...storeFieldNames: (string | number)[]\n ): StorageType;\n}\n\n/**\n * This is a normalized representation of the Apollo query result cache. It consists of\n * a flattened representation of query result trees.\n */\nexport interface NormalizedCacheObject {\n __META?: {\n // Well-known singleton IDs like ROOT_QUERY and ROOT_MUTATION are\n // always considered to be root IDs during cache.gc garbage\n // collection, but other IDs can become roots if they are written\n // directly with cache.writeFragment or retained explicitly with\n // cache.retain. When such IDs exist, we include them in the __META\n // section so that they can survive cache.{extract,restore}.\n extraRootIds: string[];\n };\n [dataId: string]: StoreObject | undefined;\n}\n\nexport type OptimisticStoreItem = {\n id: string;\n data: NormalizedCacheObject;\n transaction: Transaction<NormalizedCacheObject>;\n};\n\nexport type ReadQueryOptions = {\n store: NormalizedCache;\n query: DocumentNode;\n variables?: Object;\n previousResult?: any;\n canonizeResults?: boolean;\n rootId?: string;\n config?: ApolloReducerConfig;\n};\n\nexport type DiffQueryAgainstStoreOptions = ReadQueryOptions & {\n returnPartialData?: boolean;\n};\n\nexport type ApolloReducerConfig = {\n dataIdFromObject?: KeyFieldsFunction;\n addTypename?: boolean;\n};\n\nexport interface InMemoryCacheConfig extends ApolloReducerConfig {\n resultCaching?: boolean;\n possibleTypes?: PossibleTypesMap;\n typePolicies?: TypePolicies;\n resultCacheMaxSize?: number;\n canonizeResults?: boolean;\n}\n\nexport interface MergeInfo {\n field: FieldNode;\n typename: string | undefined;\n merge: FieldMergeFunction;\n};\n\nexport interface MergeTree {\n info?: MergeInfo;\n map: Map<string | number, MergeTree>;\n};\n\nexport interface ReadMergeModifyContext {\n store: NormalizedCache;\n variables?: Record<string, any>;\n // A JSON.stringify-serialized version of context.variables.\n varString?: string;\n}\n"]}
|
||||
35
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/writeToStore.d.ts
generated
vendored
Normal file
35
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/writeToStore.d.ts
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
import { SelectionSetNode, FieldNode } from 'graphql';
|
||||
import { FragmentMap, StoreObject, Reference } from '../../utilities';
|
||||
import { NormalizedCache, ReadMergeModifyContext, MergeTree } from './types';
|
||||
import { StoreReader } from './readFromStore';
|
||||
import { InMemoryCache } from './inMemoryCache';
|
||||
import { Cache } from '../../core';
|
||||
export interface WriteContext extends ReadMergeModifyContext {
|
||||
readonly written: {
|
||||
[dataId: string]: SelectionSetNode[];
|
||||
};
|
||||
readonly fragmentMap?: FragmentMap;
|
||||
merge<T>(existing: T, incoming: T): T;
|
||||
overwrite: boolean;
|
||||
incomingById: Map<string, {
|
||||
storeObject: StoreObject;
|
||||
mergeTree?: MergeTree;
|
||||
fieldNodeSet: Set<FieldNode>;
|
||||
}>;
|
||||
clientOnly: boolean;
|
||||
deferred: boolean;
|
||||
flavors: Map<string, FlavorableWriteContext>;
|
||||
}
|
||||
declare type FlavorableWriteContext = Pick<WriteContext, "clientOnly" | "deferred" | "flavors">;
|
||||
export declare class StoreWriter {
|
||||
readonly cache: InMemoryCache;
|
||||
private reader?;
|
||||
constructor(cache: InMemoryCache, reader?: StoreReader | undefined);
|
||||
writeToStore(store: NormalizedCache, { query, result, dataId, variables, overwrite, }: Cache.WriteOptions): Reference | undefined;
|
||||
private processSelectionSet;
|
||||
private processFieldValue;
|
||||
private flattenFields;
|
||||
private applyMerges;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=writeToStore.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/writeToStore.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/writeToStore.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"writeToStore.d.ts","sourceRoot":"","sources":["../../../src/cache/inmemory/writeToStore.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACV,MAAM,SAAS,CAAC;AAEjB,OAAO,EAEL,WAAW,EAUX,WAAW,EACX,SAAS,EAOV,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE7E,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAKnC,MAAM,WAAW,YAAa,SAAQ,sBAAsB;IAC1D,QAAQ,CAAC,OAAO,EAAE;QAChB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAC;KACtC,CAAC;IACF,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;IAEnC,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;IAEtC,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE;QACxB,WAAW,EAAE,WAAW,CAAC;QACzB,SAAS,CAAC,EAAE,SAAS,CAAC;QACtB,YAAY,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;KAC9B,CAAC,CAAC;IAIH,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;CAC9C;AAED,aAAK,sBAAsB,GAAG,IAAI,CAChC,YAAY,EACV,YAAY,GACZ,UAAU,GACV,SAAS,CACZ,CAAC;AAmCF,qBAAa,WAAW;aAEJ,KAAK,EAAE,aAAa;IACpC,OAAO,CAAC,MAAM,CAAC;gBADC,KAAK,EAAE,aAAa,EAC5B,MAAM,CAAC,yBAAa;IAGvB,YAAY,CAAC,KAAK,EAAE,eAAe,EAAE,EAC1C,KAAK,EACL,MAAM,EACN,MAAM,EACN,SAAS,EACT,SAAS,GACV,EAAE,KAAK,CAAC,YAAY,GAAG,SAAS,GAAG,SAAS;IAuG7C,OAAO,CAAC,mBAAmB;IA8N3B,OAAO,CAAC,iBAAiB;IAgCzB,OAAO,CAAC,aAAa;IA6GrB,OAAO,CAAC,WAAW;CA6FpB"}
|
||||
401
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/writeToStore.js
generated
vendored
Normal file
401
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/writeToStore.js
generated
vendored
Normal file
@@ -0,0 +1,401 @@
|
||||
import { __assign } from "tslib";
|
||||
import { invariant, InvariantError } from "../../utilities/globals/index.js";
|
||||
import { equal } from '@wry/equality';
|
||||
import { Trie } from '@wry/trie';
|
||||
import { createFragmentMap, getFragmentFromSelection, getDefaultValues, getFragmentDefinitions, getOperationDefinition, getTypenameFromResult, makeReference, isField, resultKeyNameFromField, isReference, shouldInclude, cloneDeep, addTypenameToDocument, isNonEmptyArray, argumentsObjectFromField, } from "../../utilities/index.js";
|
||||
import { makeProcessedFieldsMerger, fieldNameFromStoreName, storeValueIsStoreObject, isArray } from "./helpers.js";
|
||||
import { canonicalStringify } from "./object-canon.js";
|
||||
import { normalizeReadFieldOptions } from "./policies.js";
|
||||
;
|
||||
function getContextFlavor(context, clientOnly, deferred) {
|
||||
var key = "".concat(clientOnly).concat(deferred);
|
||||
var flavored = context.flavors.get(key);
|
||||
if (!flavored) {
|
||||
context.flavors.set(key, flavored = (context.clientOnly === clientOnly &&
|
||||
context.deferred === deferred) ? context : __assign(__assign({}, context), { clientOnly: clientOnly, deferred: deferred }));
|
||||
}
|
||||
return flavored;
|
||||
}
|
||||
var StoreWriter = (function () {
|
||||
function StoreWriter(cache, reader) {
|
||||
this.cache = cache;
|
||||
this.reader = reader;
|
||||
}
|
||||
StoreWriter.prototype.writeToStore = function (store, _a) {
|
||||
var _this = this;
|
||||
var query = _a.query, result = _a.result, dataId = _a.dataId, variables = _a.variables, overwrite = _a.overwrite;
|
||||
var operationDefinition = getOperationDefinition(query);
|
||||
var merger = makeProcessedFieldsMerger();
|
||||
variables = __assign(__assign({}, getDefaultValues(operationDefinition)), variables);
|
||||
var context = {
|
||||
store: store,
|
||||
written: Object.create(null),
|
||||
merge: function (existing, incoming) {
|
||||
return merger.merge(existing, incoming);
|
||||
},
|
||||
variables: variables,
|
||||
varString: canonicalStringify(variables),
|
||||
fragmentMap: createFragmentMap(getFragmentDefinitions(query)),
|
||||
overwrite: !!overwrite,
|
||||
incomingById: new Map,
|
||||
clientOnly: false,
|
||||
deferred: false,
|
||||
flavors: new Map,
|
||||
};
|
||||
var ref = this.processSelectionSet({
|
||||
result: result || Object.create(null),
|
||||
dataId: dataId,
|
||||
selectionSet: operationDefinition.selectionSet,
|
||||
mergeTree: { map: new Map },
|
||||
context: context,
|
||||
});
|
||||
if (!isReference(ref)) {
|
||||
throw __DEV__ ? new InvariantError("Could not identify object ".concat(JSON.stringify(result))) : new InvariantError(6);
|
||||
}
|
||||
context.incomingById.forEach(function (_a, dataId) {
|
||||
var storeObject = _a.storeObject, mergeTree = _a.mergeTree, fieldNodeSet = _a.fieldNodeSet;
|
||||
var entityRef = makeReference(dataId);
|
||||
if (mergeTree && mergeTree.map.size) {
|
||||
var applied = _this.applyMerges(mergeTree, entityRef, storeObject, context);
|
||||
if (isReference(applied)) {
|
||||
return;
|
||||
}
|
||||
storeObject = applied;
|
||||
}
|
||||
if (__DEV__ && !context.overwrite) {
|
||||
var fieldsWithSelectionSets_1 = Object.create(null);
|
||||
fieldNodeSet.forEach(function (field) {
|
||||
if (field.selectionSet) {
|
||||
fieldsWithSelectionSets_1[field.name.value] = true;
|
||||
}
|
||||
});
|
||||
var hasSelectionSet_1 = function (storeFieldName) {
|
||||
return fieldsWithSelectionSets_1[fieldNameFromStoreName(storeFieldName)] === true;
|
||||
};
|
||||
var hasMergeFunction_1 = function (storeFieldName) {
|
||||
var childTree = mergeTree && mergeTree.map.get(storeFieldName);
|
||||
return Boolean(childTree && childTree.info && childTree.info.merge);
|
||||
};
|
||||
Object.keys(storeObject).forEach(function (storeFieldName) {
|
||||
if (hasSelectionSet_1(storeFieldName) &&
|
||||
!hasMergeFunction_1(storeFieldName)) {
|
||||
warnAboutDataLoss(entityRef, storeObject, storeFieldName, context.store);
|
||||
}
|
||||
});
|
||||
}
|
||||
store.merge(dataId, storeObject);
|
||||
});
|
||||
store.retain(ref.__ref);
|
||||
return ref;
|
||||
};
|
||||
StoreWriter.prototype.processSelectionSet = function (_a) {
|
||||
var _this = this;
|
||||
var dataId = _a.dataId, result = _a.result, selectionSet = _a.selectionSet, context = _a.context, mergeTree = _a.mergeTree;
|
||||
var policies = this.cache.policies;
|
||||
var incoming = Object.create(null);
|
||||
var typename = (dataId && policies.rootTypenamesById[dataId]) ||
|
||||
getTypenameFromResult(result, selectionSet, context.fragmentMap) ||
|
||||
(dataId && context.store.get(dataId, "__typename"));
|
||||
if ("string" === typeof typename) {
|
||||
incoming.__typename = typename;
|
||||
}
|
||||
var readField = function () {
|
||||
var options = normalizeReadFieldOptions(arguments, incoming, context.variables);
|
||||
if (isReference(options.from)) {
|
||||
var info = context.incomingById.get(options.from.__ref);
|
||||
if (info) {
|
||||
var result_1 = policies.readField(__assign(__assign({}, options), { from: info.storeObject }), context);
|
||||
if (result_1 !== void 0) {
|
||||
return result_1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return policies.readField(options, context);
|
||||
};
|
||||
var fieldNodeSet = new Set();
|
||||
this.flattenFields(selectionSet, result, context, typename).forEach(function (context, field) {
|
||||
var _a;
|
||||
var resultFieldKey = resultKeyNameFromField(field);
|
||||
var value = result[resultFieldKey];
|
||||
fieldNodeSet.add(field);
|
||||
if (value !== void 0) {
|
||||
var storeFieldName = policies.getStoreFieldName({
|
||||
typename: typename,
|
||||
fieldName: field.name.value,
|
||||
field: field,
|
||||
variables: context.variables,
|
||||
});
|
||||
var childTree = getChildMergeTree(mergeTree, storeFieldName);
|
||||
var incomingValue = _this.processFieldValue(value, field, field.selectionSet
|
||||
? getContextFlavor(context, false, false)
|
||||
: context, childTree);
|
||||
var childTypename = void 0;
|
||||
if (field.selectionSet &&
|
||||
(isReference(incomingValue) ||
|
||||
storeValueIsStoreObject(incomingValue))) {
|
||||
childTypename = readField("__typename", incomingValue);
|
||||
}
|
||||
var merge = policies.getMergeFunction(typename, field.name.value, childTypename);
|
||||
if (merge) {
|
||||
childTree.info = {
|
||||
field: field,
|
||||
typename: typename,
|
||||
merge: merge,
|
||||
};
|
||||
}
|
||||
else {
|
||||
maybeRecycleChildMergeTree(mergeTree, storeFieldName);
|
||||
}
|
||||
incoming = context.merge(incoming, (_a = {},
|
||||
_a[storeFieldName] = incomingValue,
|
||||
_a));
|
||||
}
|
||||
else if (__DEV__ &&
|
||||
!context.clientOnly &&
|
||||
!context.deferred &&
|
||||
!addTypenameToDocument.added(field) &&
|
||||
!policies.getReadFunction(typename, field.name.value)) {
|
||||
__DEV__ && invariant.error("Missing field '".concat(resultKeyNameFromField(field), "' while writing result ").concat(JSON.stringify(result, null, 2)).substring(0, 1000));
|
||||
}
|
||||
});
|
||||
try {
|
||||
var _b = policies.identify(result, {
|
||||
typename: typename,
|
||||
selectionSet: selectionSet,
|
||||
fragmentMap: context.fragmentMap,
|
||||
storeObject: incoming,
|
||||
readField: readField,
|
||||
}), id = _b[0], keyObject = _b[1];
|
||||
dataId = dataId || id;
|
||||
if (keyObject) {
|
||||
incoming = context.merge(incoming, keyObject);
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
if (!dataId)
|
||||
throw e;
|
||||
}
|
||||
if ("string" === typeof dataId) {
|
||||
var dataRef = makeReference(dataId);
|
||||
var sets = context.written[dataId] || (context.written[dataId] = []);
|
||||
if (sets.indexOf(selectionSet) >= 0)
|
||||
return dataRef;
|
||||
sets.push(selectionSet);
|
||||
if (this.reader && this.reader.isFresh(result, dataRef, selectionSet, context)) {
|
||||
return dataRef;
|
||||
}
|
||||
var previous_1 = context.incomingById.get(dataId);
|
||||
if (previous_1) {
|
||||
previous_1.storeObject = context.merge(previous_1.storeObject, incoming);
|
||||
previous_1.mergeTree = mergeMergeTrees(previous_1.mergeTree, mergeTree);
|
||||
fieldNodeSet.forEach(function (field) { return previous_1.fieldNodeSet.add(field); });
|
||||
}
|
||||
else {
|
||||
context.incomingById.set(dataId, {
|
||||
storeObject: incoming,
|
||||
mergeTree: mergeTreeIsEmpty(mergeTree) ? void 0 : mergeTree,
|
||||
fieldNodeSet: fieldNodeSet,
|
||||
});
|
||||
}
|
||||
return dataRef;
|
||||
}
|
||||
return incoming;
|
||||
};
|
||||
StoreWriter.prototype.processFieldValue = function (value, field, context, mergeTree) {
|
||||
var _this = this;
|
||||
if (!field.selectionSet || value === null) {
|
||||
return __DEV__ ? cloneDeep(value) : value;
|
||||
}
|
||||
if (isArray(value)) {
|
||||
return value.map(function (item, i) {
|
||||
var value = _this.processFieldValue(item, field, context, getChildMergeTree(mergeTree, i));
|
||||
maybeRecycleChildMergeTree(mergeTree, i);
|
||||
return value;
|
||||
});
|
||||
}
|
||||
return this.processSelectionSet({
|
||||
result: value,
|
||||
selectionSet: field.selectionSet,
|
||||
context: context,
|
||||
mergeTree: mergeTree,
|
||||
});
|
||||
};
|
||||
StoreWriter.prototype.flattenFields = function (selectionSet, result, context, typename) {
|
||||
if (typename === void 0) { typename = getTypenameFromResult(result, selectionSet, context.fragmentMap); }
|
||||
var fieldMap = new Map();
|
||||
var policies = this.cache.policies;
|
||||
var limitingTrie = new Trie(false);
|
||||
(function flatten(selectionSet, inheritedContext) {
|
||||
var visitedNode = limitingTrie.lookup(selectionSet, inheritedContext.clientOnly, inheritedContext.deferred);
|
||||
if (visitedNode.visited)
|
||||
return;
|
||||
visitedNode.visited = true;
|
||||
selectionSet.selections.forEach(function (selection) {
|
||||
if (!shouldInclude(selection, context.variables))
|
||||
return;
|
||||
var clientOnly = inheritedContext.clientOnly, deferred = inheritedContext.deferred;
|
||||
if (!(clientOnly && deferred) &&
|
||||
isNonEmptyArray(selection.directives)) {
|
||||
selection.directives.forEach(function (dir) {
|
||||
var name = dir.name.value;
|
||||
if (name === "client")
|
||||
clientOnly = true;
|
||||
if (name === "defer") {
|
||||
var args = argumentsObjectFromField(dir, context.variables);
|
||||
if (!args || args.if !== false) {
|
||||
deferred = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (isField(selection)) {
|
||||
var existing = fieldMap.get(selection);
|
||||
if (existing) {
|
||||
clientOnly = clientOnly && existing.clientOnly;
|
||||
deferred = deferred && existing.deferred;
|
||||
}
|
||||
fieldMap.set(selection, getContextFlavor(context, clientOnly, deferred));
|
||||
}
|
||||
else {
|
||||
var fragment = getFragmentFromSelection(selection, context.fragmentMap);
|
||||
if (fragment &&
|
||||
policies.fragmentMatches(fragment, typename, result, context.variables)) {
|
||||
flatten(fragment.selectionSet, getContextFlavor(context, clientOnly, deferred));
|
||||
}
|
||||
}
|
||||
});
|
||||
})(selectionSet, context);
|
||||
return fieldMap;
|
||||
};
|
||||
StoreWriter.prototype.applyMerges = function (mergeTree, existing, incoming, context, getStorageArgs) {
|
||||
var _a;
|
||||
var _this = this;
|
||||
if (mergeTree.map.size && !isReference(incoming)) {
|
||||
var e_1 = (!isArray(incoming) &&
|
||||
(isReference(existing) || storeValueIsStoreObject(existing))) ? existing : void 0;
|
||||
var i_1 = incoming;
|
||||
if (e_1 && !getStorageArgs) {
|
||||
getStorageArgs = [isReference(e_1) ? e_1.__ref : e_1];
|
||||
}
|
||||
var changedFields_1;
|
||||
var getValue_1 = function (from, name) {
|
||||
return isArray(from)
|
||||
? (typeof name === "number" ? from[name] : void 0)
|
||||
: context.store.getFieldValue(from, String(name));
|
||||
};
|
||||
mergeTree.map.forEach(function (childTree, storeFieldName) {
|
||||
var eVal = getValue_1(e_1, storeFieldName);
|
||||
var iVal = getValue_1(i_1, storeFieldName);
|
||||
if (void 0 === iVal)
|
||||
return;
|
||||
if (getStorageArgs) {
|
||||
getStorageArgs.push(storeFieldName);
|
||||
}
|
||||
var aVal = _this.applyMerges(childTree, eVal, iVal, context, getStorageArgs);
|
||||
if (aVal !== iVal) {
|
||||
changedFields_1 = changedFields_1 || new Map;
|
||||
changedFields_1.set(storeFieldName, aVal);
|
||||
}
|
||||
if (getStorageArgs) {
|
||||
invariant(getStorageArgs.pop() === storeFieldName);
|
||||
}
|
||||
});
|
||||
if (changedFields_1) {
|
||||
incoming = (isArray(i_1) ? i_1.slice(0) : __assign({}, i_1));
|
||||
changedFields_1.forEach(function (value, name) {
|
||||
incoming[name] = value;
|
||||
});
|
||||
}
|
||||
}
|
||||
if (mergeTree.info) {
|
||||
return this.cache.policies.runMergeFunction(existing, incoming, mergeTree.info, context, getStorageArgs && (_a = context.store).getStorage.apply(_a, getStorageArgs));
|
||||
}
|
||||
return incoming;
|
||||
};
|
||||
return StoreWriter;
|
||||
}());
|
||||
export { StoreWriter };
|
||||
var emptyMergeTreePool = [];
|
||||
function getChildMergeTree(_a, name) {
|
||||
var map = _a.map;
|
||||
if (!map.has(name)) {
|
||||
map.set(name, emptyMergeTreePool.pop() || { map: new Map });
|
||||
}
|
||||
return map.get(name);
|
||||
}
|
||||
function mergeMergeTrees(left, right) {
|
||||
if (left === right || !right || mergeTreeIsEmpty(right))
|
||||
return left;
|
||||
if (!left || mergeTreeIsEmpty(left))
|
||||
return right;
|
||||
var info = left.info && right.info ? __assign(__assign({}, left.info), right.info) : left.info || right.info;
|
||||
var needToMergeMaps = left.map.size && right.map.size;
|
||||
var map = needToMergeMaps ? new Map :
|
||||
left.map.size ? left.map : right.map;
|
||||
var merged = { info: info, map: map };
|
||||
if (needToMergeMaps) {
|
||||
var remainingRightKeys_1 = new Set(right.map.keys());
|
||||
left.map.forEach(function (leftTree, key) {
|
||||
merged.map.set(key, mergeMergeTrees(leftTree, right.map.get(key)));
|
||||
remainingRightKeys_1.delete(key);
|
||||
});
|
||||
remainingRightKeys_1.forEach(function (key) {
|
||||
merged.map.set(key, mergeMergeTrees(right.map.get(key), left.map.get(key)));
|
||||
});
|
||||
}
|
||||
return merged;
|
||||
}
|
||||
function mergeTreeIsEmpty(tree) {
|
||||
return !tree || !(tree.info || tree.map.size);
|
||||
}
|
||||
function maybeRecycleChildMergeTree(_a, name) {
|
||||
var map = _a.map;
|
||||
var childTree = map.get(name);
|
||||
if (childTree && mergeTreeIsEmpty(childTree)) {
|
||||
emptyMergeTreePool.push(childTree);
|
||||
map.delete(name);
|
||||
}
|
||||
}
|
||||
var warnings = new Set();
|
||||
function warnAboutDataLoss(existingRef, incomingObj, storeFieldName, store) {
|
||||
var getChild = function (objOrRef) {
|
||||
var child = store.getFieldValue(objOrRef, storeFieldName);
|
||||
return typeof child === "object" && child;
|
||||
};
|
||||
var existing = getChild(existingRef);
|
||||
if (!existing)
|
||||
return;
|
||||
var incoming = getChild(incomingObj);
|
||||
if (!incoming)
|
||||
return;
|
||||
if (isReference(existing))
|
||||
return;
|
||||
if (equal(existing, incoming))
|
||||
return;
|
||||
if (Object.keys(existing).every(function (key) { return store.getFieldValue(incoming, key) !== void 0; })) {
|
||||
return;
|
||||
}
|
||||
var parentType = store.getFieldValue(existingRef, "__typename") ||
|
||||
store.getFieldValue(incomingObj, "__typename");
|
||||
var fieldName = fieldNameFromStoreName(storeFieldName);
|
||||
var typeDotName = "".concat(parentType, ".").concat(fieldName);
|
||||
if (warnings.has(typeDotName))
|
||||
return;
|
||||
warnings.add(typeDotName);
|
||||
var childTypenames = [];
|
||||
if (!isArray(existing) &&
|
||||
!isArray(incoming)) {
|
||||
[existing, incoming].forEach(function (child) {
|
||||
var typename = store.getFieldValue(child, "__typename");
|
||||
if (typeof typename === "string" &&
|
||||
!childTypenames.includes(typename)) {
|
||||
childTypenames.push(typename);
|
||||
}
|
||||
});
|
||||
}
|
||||
__DEV__ && invariant.warn("Cache data may be lost when replacing the ".concat(fieldName, " field of a ").concat(parentType, " object.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(childTypenames.length
|
||||
? "either ensure all objects of type " +
|
||||
childTypenames.join(" and ") + " have an ID or a custom merge function, or "
|
||||
: "", "define a custom merge function for the ").concat(typeDotName, " field, so InMemoryCache can safely merge these objects:\n\n existing: ").concat(JSON.stringify(existing).slice(0, 1000), "\n incoming: ").concat(JSON.stringify(incoming).slice(0, 1000), "\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"));
|
||||
}
|
||||
//# sourceMappingURL=writeToStore.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/writeToStore.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/inmemory/writeToStore.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
8
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/package.json
generated
vendored
Normal file
8
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/cache/package.json
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "@apollo/client/cache",
|
||||
"type": "module",
|
||||
"main": "cache.cjs",
|
||||
"module": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"sideEffects": false
|
||||
}
|
||||
2
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/config/jest/setup.d.ts
generated
vendored
Normal file
2
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/config/jest/setup.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=setup.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/config/jest/setup.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/config/jest/setup.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/config/jest/setup.ts"],"names":[],"mappings":""}
|
||||
4
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/config/jest/setup.js
generated
vendored
Normal file
4
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/config/jest/setup.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import gql from 'graphql-tag';
|
||||
gql.disableFragmentWarnings();
|
||||
process.on('unhandledRejection', function () { });
|
||||
//# sourceMappingURL=setup.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/config/jest/setup.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/config/jest/setup.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../src/config/jest/setup.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,aAAa,CAAC;AAG9B,GAAG,CAAC,uBAAuB,EAAE,CAAC;AAE9B,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,cAAO,CAAC,CAAC,CAAC","sourcesContent":["import gql from 'graphql-tag';\n\n// Turn off warnings for repeated fragment names\ngql.disableFragmentWarnings();\n\nprocess.on('unhandledRejection', () => {});\n"]}
|
||||
76
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/ApolloClient.d.ts
generated
vendored
Normal file
76
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/ApolloClient.d.ts
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
import { ExecutionResult, DocumentNode } from 'graphql';
|
||||
import { ApolloLink, FetchResult, GraphQLRequest } from '../link/core';
|
||||
import { ApolloCache, DataProxy } from '../cache';
|
||||
import { Observable } from '../utilities';
|
||||
import { UriFunction } from '../link/http';
|
||||
import { ObservableQuery } from './ObservableQuery';
|
||||
import { ApolloQueryResult, DefaultContext, OperationVariables, Resolvers, RefetchQueriesOptions, RefetchQueriesResult, RefetchQueriesInclude } from './types';
|
||||
import { QueryOptions, WatchQueryOptions, MutationOptions, SubscriptionOptions } from './watchQueryOptions';
|
||||
import { FragmentMatcher } from './LocalState';
|
||||
export interface DefaultOptions {
|
||||
watchQuery?: Partial<WatchQueryOptions<any, any>>;
|
||||
query?: Partial<QueryOptions<any, any>>;
|
||||
mutate?: Partial<MutationOptions<any, any, any>>;
|
||||
}
|
||||
export declare type ApolloClientOptions<TCacheShape> = {
|
||||
uri?: string | UriFunction;
|
||||
credentials?: string;
|
||||
headers?: Record<string, string>;
|
||||
link?: ApolloLink;
|
||||
cache: ApolloCache<TCacheShape>;
|
||||
ssrForceFetchDelay?: number;
|
||||
ssrMode?: boolean;
|
||||
connectToDevTools?: boolean;
|
||||
queryDeduplication?: boolean;
|
||||
defaultOptions?: DefaultOptions;
|
||||
assumeImmutableResults?: boolean;
|
||||
resolvers?: Resolvers | Resolvers[];
|
||||
typeDefs?: string | string[] | DocumentNode | DocumentNode[];
|
||||
fragmentMatcher?: FragmentMatcher;
|
||||
name?: string;
|
||||
version?: string;
|
||||
};
|
||||
declare type OptionsUnion<TData, TVariables, TContext> = WatchQueryOptions<TVariables, TData> | QueryOptions<TVariables, TData> | MutationOptions<TData, TVariables, TContext>;
|
||||
export declare function mergeOptions<TOptions extends OptionsUnion<any, any, any>>(defaults: Partial<TOptions>, options: TOptions): TOptions;
|
||||
export declare class ApolloClient<TCacheShape> implements DataProxy {
|
||||
link: ApolloLink;
|
||||
cache: ApolloCache<TCacheShape>;
|
||||
disableNetworkFetches: boolean;
|
||||
version: string;
|
||||
queryDeduplication: boolean;
|
||||
defaultOptions: DefaultOptions;
|
||||
readonly typeDefs: ApolloClientOptions<TCacheShape>['typeDefs'];
|
||||
private queryManager;
|
||||
private devToolsHookCb;
|
||||
private resetStoreCallbacks;
|
||||
private clearStoreCallbacks;
|
||||
private localState;
|
||||
constructor(options: ApolloClientOptions<TCacheShape>);
|
||||
stop(): void;
|
||||
watchQuery<T = any, TVariables = OperationVariables>(options: WatchQueryOptions<TVariables, T>): ObservableQuery<T, TVariables>;
|
||||
query<T = any, TVariables = OperationVariables>(options: QueryOptions<TVariables, T>): Promise<ApolloQueryResult<T>>;
|
||||
mutate<TData = any, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache<any> = ApolloCache<any>>(options: MutationOptions<TData, TVariables, TContext>): Promise<FetchResult<TData>>;
|
||||
subscribe<T = any, TVariables = OperationVariables>(options: SubscriptionOptions<TVariables, T>): Observable<FetchResult<T>>;
|
||||
readQuery<T = any, TVariables = OperationVariables>(options: DataProxy.Query<TVariables, T>, optimistic?: boolean): T | null;
|
||||
readFragment<T = any, TVariables = OperationVariables>(options: DataProxy.Fragment<TVariables, T>, optimistic?: boolean): T | null;
|
||||
writeQuery<TData = any, TVariables = OperationVariables>(options: DataProxy.WriteQueryOptions<TData, TVariables>): void;
|
||||
writeFragment<TData = any, TVariables = OperationVariables>(options: DataProxy.WriteFragmentOptions<TData, TVariables>): void;
|
||||
__actionHookForDevTools(cb: () => any): void;
|
||||
__requestRaw(payload: GraphQLRequest): Observable<ExecutionResult>;
|
||||
resetStore(): Promise<ApolloQueryResult<any>[] | null>;
|
||||
clearStore(): Promise<any[]>;
|
||||
onResetStore(cb: () => Promise<any>): () => void;
|
||||
onClearStore(cb: () => Promise<any>): () => void;
|
||||
reFetchObservableQueries(includeStandby?: boolean): Promise<ApolloQueryResult<any>[]>;
|
||||
refetchQueries<TCache extends ApolloCache<any> = ApolloCache<TCacheShape>, TResult = Promise<ApolloQueryResult<any>>>(options: RefetchQueriesOptions<TCache, TResult>): RefetchQueriesResult<TResult>;
|
||||
getObservableQueries(include?: RefetchQueriesInclude): Map<string, ObservableQuery<any>>;
|
||||
extract(optimistic?: boolean): TCacheShape;
|
||||
restore(serializedState: TCacheShape): ApolloCache<TCacheShape>;
|
||||
addResolvers(resolvers: Resolvers | Resolvers[]): void;
|
||||
setResolvers(resolvers: Resolvers | Resolvers[]): void;
|
||||
getResolvers(): Resolvers;
|
||||
setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void;
|
||||
setLink(newLink: ApolloLink): void;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=ApolloClient.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/ApolloClient.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/ApolloClient.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ApolloClient.d.ts","sourceRoot":"","sources":["../../src/core/ApolloClient.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAW,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,UAAU,EAAW,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAY,WAAW,EAAE,MAAM,cAAc,CAAC;AAGrD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB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ipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/ApolloClient.js
generated
vendored
Normal file
@@ -0,0 +1,244 @@
|
||||
import { __assign } from "tslib";
|
||||
import { invariant, InvariantError } from "../utilities/globals/index.js";
|
||||
import { ApolloLink, execute } from "../link/core/index.js";
|
||||
import { compact } from "../utilities/index.js";
|
||||
import { version } from "../version.js";
|
||||
import { HttpLink } from "../link/http/index.js";
|
||||
import { QueryManager } from "./QueryManager.js";
|
||||
import { LocalState, } from "./LocalState.js";
|
||||
var hasSuggestedDevtools = false;
|
||||
export function mergeOptions(defaults, options) {
|
||||
return compact(defaults, options, options.variables && {
|
||||
variables: __assign(__assign({}, defaults.variables), options.variables),
|
||||
});
|
||||
}
|
||||
var ApolloClient = (function () {
|
||||
function ApolloClient(options) {
|
||||
var _this = this;
|
||||
this.defaultOptions = {};
|
||||
this.resetStoreCallbacks = [];
|
||||
this.clearStoreCallbacks = [];
|
||||
var uri = options.uri, credentials = options.credentials, headers = options.headers, cache = options.cache, _a = options.ssrMode, ssrMode = _a === void 0 ? false : _a, _b = options.ssrForceFetchDelay, ssrForceFetchDelay = _b === void 0 ? 0 : _b, _c = options.connectToDevTools, connectToDevTools = _c === void 0 ? typeof window === 'object' &&
|
||||
!window.__APOLLO_CLIENT__ &&
|
||||
__DEV__ : _c, _d = options.queryDeduplication, queryDeduplication = _d === void 0 ? true : _d, defaultOptions = options.defaultOptions, _e = options.assumeImmutableResults, assumeImmutableResults = _e === void 0 ? false : _e, resolvers = options.resolvers, typeDefs = options.typeDefs, fragmentMatcher = options.fragmentMatcher, clientAwarenessName = options.name, clientAwarenessVersion = options.version;
|
||||
var link = options.link;
|
||||
if (!link) {
|
||||
link = uri
|
||||
? new HttpLink({ uri: uri, credentials: credentials, headers: headers })
|
||||
: ApolloLink.empty();
|
||||
}
|
||||
if (!cache) {
|
||||
throw __DEV__ ? new InvariantError("To initialize Apollo Client, you must specify a 'cache' property " +
|
||||
"in the options object. \n" +
|
||||
"For more information, please visit: https://go.apollo.dev/c/docs") : new InvariantError(7);
|
||||
}
|
||||
this.link = link;
|
||||
this.cache = cache;
|
||||
this.disableNetworkFetches = ssrMode || ssrForceFetchDelay > 0;
|
||||
this.queryDeduplication = queryDeduplication;
|
||||
this.defaultOptions = defaultOptions || {};
|
||||
this.typeDefs = typeDefs;
|
||||
if (ssrForceFetchDelay) {
|
||||
setTimeout(function () { return (_this.disableNetworkFetches = false); }, ssrForceFetchDelay);
|
||||
}
|
||||
this.watchQuery = this.watchQuery.bind(this);
|
||||
this.query = this.query.bind(this);
|
||||
this.mutate = this.mutate.bind(this);
|
||||
this.resetStore = this.resetStore.bind(this);
|
||||
this.reFetchObservableQueries = this.reFetchObservableQueries.bind(this);
|
||||
if (connectToDevTools && typeof window === 'object') {
|
||||
window.__APOLLO_CLIENT__ = this;
|
||||
}
|
||||
if (!hasSuggestedDevtools && __DEV__) {
|
||||
hasSuggestedDevtools = true;
|
||||
if (typeof window !== 'undefined' &&
|
||||
window.document &&
|
||||
window.top === window.self &&
|
||||
!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var nav = window.navigator;
|
||||
var ua = nav && nav.userAgent;
|
||||
var url = void 0;
|
||||
if (typeof ua === "string") {
|
||||
if (ua.indexOf("Chrome/") > -1) {
|
||||
url = "https://chrome.google.com/webstore/detail/" +
|
||||
"apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm";
|
||||
}
|
||||
else if (ua.indexOf("Firefox/") > -1) {
|
||||
url = "https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/";
|
||||
}
|
||||
}
|
||||
if (url) {
|
||||
__DEV__ && invariant.log("Download the Apollo DevTools for a better development " +
|
||||
"experience: " + url);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.version = version;
|
||||
this.localState = new LocalState({
|
||||
cache: cache,
|
||||
client: this,
|
||||
resolvers: resolvers,
|
||||
fragmentMatcher: fragmentMatcher,
|
||||
});
|
||||
this.queryManager = new QueryManager({
|
||||
cache: this.cache,
|
||||
link: this.link,
|
||||
queryDeduplication: queryDeduplication,
|
||||
ssrMode: ssrMode,
|
||||
clientAwareness: {
|
||||
name: clientAwarenessName,
|
||||
version: clientAwarenessVersion,
|
||||
},
|
||||
localState: this.localState,
|
||||
assumeImmutableResults: assumeImmutableResults,
|
||||
onBroadcast: connectToDevTools ? function () {
|
||||
if (_this.devToolsHookCb) {
|
||||
_this.devToolsHookCb({
|
||||
action: {},
|
||||
state: {
|
||||
queries: _this.queryManager.getQueryStore(),
|
||||
mutations: _this.queryManager.mutationStore || {},
|
||||
},
|
||||
dataWithOptimisticResults: _this.cache.extract(true),
|
||||
});
|
||||
}
|
||||
} : void 0,
|
||||
});
|
||||
}
|
||||
ApolloClient.prototype.stop = function () {
|
||||
this.queryManager.stop();
|
||||
};
|
||||
ApolloClient.prototype.watchQuery = function (options) {
|
||||
if (this.defaultOptions.watchQuery) {
|
||||
options = mergeOptions(this.defaultOptions.watchQuery, options);
|
||||
}
|
||||
if (this.disableNetworkFetches &&
|
||||
(options.fetchPolicy === 'network-only' ||
|
||||
options.fetchPolicy === 'cache-and-network')) {
|
||||
options = __assign(__assign({}, options), { fetchPolicy: 'cache-first' });
|
||||
}
|
||||
return this.queryManager.watchQuery(options);
|
||||
};
|
||||
ApolloClient.prototype.query = function (options) {
|
||||
if (this.defaultOptions.query) {
|
||||
options = mergeOptions(this.defaultOptions.query, options);
|
||||
}
|
||||
__DEV__ ? invariant(options.fetchPolicy !== 'cache-and-network', 'The cache-and-network fetchPolicy does not work with client.query, because ' +
|
||||
'client.query can only return a single result. Please use client.watchQuery ' +
|
||||
'to receive multiple results from the cache and the network, or consider ' +
|
||||
'using a different fetchPolicy, such as cache-first or network-only.') : invariant(options.fetchPolicy !== 'cache-and-network', 8);
|
||||
if (this.disableNetworkFetches && options.fetchPolicy === 'network-only') {
|
||||
options = __assign(__assign({}, options), { fetchPolicy: 'cache-first' });
|
||||
}
|
||||
return this.queryManager.query(options);
|
||||
};
|
||||
ApolloClient.prototype.mutate = function (options) {
|
||||
if (this.defaultOptions.mutate) {
|
||||
options = mergeOptions(this.defaultOptions.mutate, options);
|
||||
}
|
||||
return this.queryManager.mutate(options);
|
||||
};
|
||||
ApolloClient.prototype.subscribe = function (options) {
|
||||
return this.queryManager.startGraphQLSubscription(options);
|
||||
};
|
||||
ApolloClient.prototype.readQuery = function (options, optimistic) {
|
||||
if (optimistic === void 0) { optimistic = false; }
|
||||
return this.cache.readQuery(options, optimistic);
|
||||
};
|
||||
ApolloClient.prototype.readFragment = function (options, optimistic) {
|
||||
if (optimistic === void 0) { optimistic = false; }
|
||||
return this.cache.readFragment(options, optimistic);
|
||||
};
|
||||
ApolloClient.prototype.writeQuery = function (options) {
|
||||
this.cache.writeQuery(options);
|
||||
this.queryManager.broadcastQueries();
|
||||
};
|
||||
ApolloClient.prototype.writeFragment = function (options) {
|
||||
this.cache.writeFragment(options);
|
||||
this.queryManager.broadcastQueries();
|
||||
};
|
||||
ApolloClient.prototype.__actionHookForDevTools = function (cb) {
|
||||
this.devToolsHookCb = cb;
|
||||
};
|
||||
ApolloClient.prototype.__requestRaw = function (payload) {
|
||||
return execute(this.link, payload);
|
||||
};
|
||||
ApolloClient.prototype.resetStore = function () {
|
||||
var _this = this;
|
||||
return Promise.resolve()
|
||||
.then(function () { return _this.queryManager.clearStore({
|
||||
discardWatches: false,
|
||||
}); })
|
||||
.then(function () { return Promise.all(_this.resetStoreCallbacks.map(function (fn) { return fn(); })); })
|
||||
.then(function () { return _this.reFetchObservableQueries(); });
|
||||
};
|
||||
ApolloClient.prototype.clearStore = function () {
|
||||
var _this = this;
|
||||
return Promise.resolve()
|
||||
.then(function () { return _this.queryManager.clearStore({
|
||||
discardWatches: true,
|
||||
}); })
|
||||
.then(function () { return Promise.all(_this.clearStoreCallbacks.map(function (fn) { return fn(); })); });
|
||||
};
|
||||
ApolloClient.prototype.onResetStore = function (cb) {
|
||||
var _this = this;
|
||||
this.resetStoreCallbacks.push(cb);
|
||||
return function () {
|
||||
_this.resetStoreCallbacks = _this.resetStoreCallbacks.filter(function (c) { return c !== cb; });
|
||||
};
|
||||
};
|
||||
ApolloClient.prototype.onClearStore = function (cb) {
|
||||
var _this = this;
|
||||
this.clearStoreCallbacks.push(cb);
|
||||
return function () {
|
||||
_this.clearStoreCallbacks = _this.clearStoreCallbacks.filter(function (c) { return c !== cb; });
|
||||
};
|
||||
};
|
||||
ApolloClient.prototype.reFetchObservableQueries = function (includeStandby) {
|
||||
return this.queryManager.reFetchObservableQueries(includeStandby);
|
||||
};
|
||||
ApolloClient.prototype.refetchQueries = function (options) {
|
||||
var map = this.queryManager.refetchQueries(options);
|
||||
var queries = [];
|
||||
var results = [];
|
||||
map.forEach(function (result, obsQuery) {
|
||||
queries.push(obsQuery);
|
||||
results.push(result);
|
||||
});
|
||||
var result = Promise.all(results);
|
||||
result.queries = queries;
|
||||
result.results = results;
|
||||
result.catch(function (error) {
|
||||
__DEV__ && invariant.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(error));
|
||||
});
|
||||
return result;
|
||||
};
|
||||
ApolloClient.prototype.getObservableQueries = function (include) {
|
||||
if (include === void 0) { include = "active"; }
|
||||
return this.queryManager.getObservableQueries(include);
|
||||
};
|
||||
ApolloClient.prototype.extract = function (optimistic) {
|
||||
return this.cache.extract(optimistic);
|
||||
};
|
||||
ApolloClient.prototype.restore = function (serializedState) {
|
||||
return this.cache.restore(serializedState);
|
||||
};
|
||||
ApolloClient.prototype.addResolvers = function (resolvers) {
|
||||
this.localState.addResolvers(resolvers);
|
||||
};
|
||||
ApolloClient.prototype.setResolvers = function (resolvers) {
|
||||
this.localState.setResolvers(resolvers);
|
||||
};
|
||||
ApolloClient.prototype.getResolvers = function () {
|
||||
return this.localState.getResolvers();
|
||||
};
|
||||
ApolloClient.prototype.setLocalStateFragmentMatcher = function (fragmentMatcher) {
|
||||
this.localState.setFragmentMatcher(fragmentMatcher);
|
||||
};
|
||||
ApolloClient.prototype.setLink = function (newLink) {
|
||||
this.link = this.queryManager.link = newLink;
|
||||
};
|
||||
return ApolloClient;
|
||||
}());
|
||||
export { ApolloClient };
|
||||
//# sourceMappingURL=ApolloClient.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/ApolloClient.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/ApolloClient.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
64
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/LocalState.d.ts
generated
vendored
Normal file
64
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/LocalState.d.ts
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
import { DocumentNode, FieldNode, ASTNode } from 'graphql';
|
||||
import { ApolloCache } from '../cache';
|
||||
import { FragmentMap, StoreObject } from '../utilities';
|
||||
import { ApolloClient } from './ApolloClient';
|
||||
import { Resolvers, OperationVariables } from './types';
|
||||
import { FetchResult } from '../link/core';
|
||||
export declare type Resolver = (rootValue?: any, args?: any, context?: any, info?: {
|
||||
field: FieldNode;
|
||||
fragmentMap: FragmentMap;
|
||||
}) => any;
|
||||
export declare type VariableMap = {
|
||||
[name: string]: any;
|
||||
};
|
||||
export declare type FragmentMatcher = (rootValue: any, typeCondition: string, context: any) => boolean;
|
||||
export declare type ExecContext = {
|
||||
fragmentMap: FragmentMap;
|
||||
context: any;
|
||||
variables: VariableMap;
|
||||
fragmentMatcher: FragmentMatcher;
|
||||
defaultOperationType: string;
|
||||
exportedVariables: Record<string, any>;
|
||||
onlyRunForcedResolvers: boolean;
|
||||
};
|
||||
export declare type LocalStateOptions<TCacheShape> = {
|
||||
cache: ApolloCache<TCacheShape>;
|
||||
client?: ApolloClient<TCacheShape>;
|
||||
resolvers?: Resolvers | Resolvers[];
|
||||
fragmentMatcher?: FragmentMatcher;
|
||||
};
|
||||
export declare class LocalState<TCacheShape> {
|
||||
private cache;
|
||||
private client;
|
||||
private resolvers?;
|
||||
private fragmentMatcher;
|
||||
constructor({ cache, client, resolvers, fragmentMatcher, }: LocalStateOptions<TCacheShape>);
|
||||
addResolvers(resolvers: Resolvers | Resolvers[]): void;
|
||||
setResolvers(resolvers: Resolvers | Resolvers[]): void;
|
||||
getResolvers(): Resolvers;
|
||||
runResolvers<TData>({ document, remoteResult, context, variables, onlyRunForcedResolvers, }: {
|
||||
document: DocumentNode | null;
|
||||
remoteResult: FetchResult<TData>;
|
||||
context?: Record<string, any>;
|
||||
variables?: Record<string, any>;
|
||||
onlyRunForcedResolvers?: boolean;
|
||||
}): Promise<FetchResult<TData>>;
|
||||
setFragmentMatcher(fragmentMatcher: FragmentMatcher): void;
|
||||
getFragmentMatcher(): FragmentMatcher;
|
||||
clientQuery(document: DocumentNode): DocumentNode | null;
|
||||
serverQuery(document: DocumentNode): DocumentNode | null;
|
||||
prepareContext(context?: Record<string, any>): {
|
||||
cache: ApolloCache<TCacheShape>;
|
||||
getCacheKey(obj: StoreObject): string | undefined;
|
||||
};
|
||||
addExportedVariables(document: DocumentNode, variables?: OperationVariables, context?: {}): Promise<{
|
||||
[x: string]: any;
|
||||
}>;
|
||||
shouldForceResolvers(document: ASTNode): boolean;
|
||||
private buildRootValueFromCache;
|
||||
private resolveDocument;
|
||||
private resolveSelectionSet;
|
||||
private resolveField;
|
||||
private resolveSubSelectedArray;
|
||||
}
|
||||
//# sourceMappingURL=LocalState.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/LocalState.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/LocalState.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"LocalState.d.ts","sourceRoot":"","sources":["../../src/core/LocalState.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EAMZ,SA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e;YA6Cf,mBAAmB;YAuDnB,YAAY;IAkF1B,OAAO,CAAC,uBAAuB;CAuBhC"}
|
||||
267
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/LocalState.js
generated
vendored
Normal file
267
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/LocalState.js
generated
vendored
Normal file
@@ -0,0 +1,267 @@
|
||||
import { __assign, __awaiter, __generator } from "tslib";
|
||||
import { invariant } from "../utilities/globals/index.js";
|
||||
import { visit, BREAK, } from 'graphql';
|
||||
import { argumentsObjectFromField, buildQueryFromSelectionSet, createFragmentMap, getFragmentDefinitions, getMainDefinition, hasDirectives, isField, isInlineFragment, mergeDeep, mergeDeepArray, removeClientSetsFromDocument, resultKeyNameFromField, shouldInclude, } from "../utilities/index.js";
|
||||
import { cacheSlot } from "../cache/index.js";
|
||||
var LocalState = (function () {
|
||||
function LocalState(_a) {
|
||||
var cache = _a.cache, client = _a.client, resolvers = _a.resolvers, fragmentMatcher = _a.fragmentMatcher;
|
||||
this.cache = cache;
|
||||
if (client) {
|
||||
this.client = client;
|
||||
}
|
||||
if (resolvers) {
|
||||
this.addResolvers(resolvers);
|
||||
}
|
||||
if (fragmentMatcher) {
|
||||
this.setFragmentMatcher(fragmentMatcher);
|
||||
}
|
||||
}
|
||||
LocalState.prototype.addResolvers = function (resolvers) {
|
||||
var _this = this;
|
||||
this.resolvers = this.resolvers || {};
|
||||
if (Array.isArray(resolvers)) {
|
||||
resolvers.forEach(function (resolverGroup) {
|
||||
_this.resolvers = mergeDeep(_this.resolvers, resolverGroup);
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.resolvers = mergeDeep(this.resolvers, resolvers);
|
||||
}
|
||||
};
|
||||
LocalState.prototype.setResolvers = function (resolvers) {
|
||||
this.resolvers = {};
|
||||
this.addResolvers(resolvers);
|
||||
};
|
||||
LocalState.prototype.getResolvers = function () {
|
||||
return this.resolvers || {};
|
||||
};
|
||||
LocalState.prototype.runResolvers = function (_a) {
|
||||
var document = _a.document, remoteResult = _a.remoteResult, context = _a.context, variables = _a.variables, _b = _a.onlyRunForcedResolvers, onlyRunForcedResolvers = _b === void 0 ? false : _b;
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_c) {
|
||||
if (document) {
|
||||
return [2, this.resolveDocument(document, remoteResult.data, context, variables, this.fragmentMatcher, onlyRunForcedResolvers).then(function (localResult) { return (__assign(__assign({}, remoteResult), { data: localResult.result })); })];
|
||||
}
|
||||
return [2, remoteResult];
|
||||
});
|
||||
});
|
||||
};
|
||||
LocalState.prototype.setFragmentMatcher = function (fragmentMatcher) {
|
||||
this.fragmentMatcher = fragmentMatcher;
|
||||
};
|
||||
LocalState.prototype.getFragmentMatcher = function () {
|
||||
return this.fragmentMatcher;
|
||||
};
|
||||
LocalState.prototype.clientQuery = function (document) {
|
||||
if (hasDirectives(['client'], document)) {
|
||||
if (this.resolvers) {
|
||||
return document;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
LocalState.prototype.serverQuery = function (document) {
|
||||
return removeClientSetsFromDocument(document);
|
||||
};
|
||||
LocalState.prototype.prepareContext = function (context) {
|
||||
var cache = this.cache;
|
||||
return __assign(__assign({}, context), { cache: cache, getCacheKey: function (obj) {
|
||||
return cache.identify(obj);
|
||||
} });
|
||||
};
|
||||
LocalState.prototype.addExportedVariables = function (document, variables, context) {
|
||||
if (variables === void 0) { variables = {}; }
|
||||
if (context === void 0) { context = {}; }
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
if (document) {
|
||||
return [2, this.resolveDocument(document, this.buildRootValueFromCache(document, variables) || {}, this.prepareContext(context), variables).then(function (data) { return (__assign(__assign({}, variables), data.exportedVariables)); })];
|
||||
}
|
||||
return [2, __assign({}, variables)];
|
||||
});
|
||||
});
|
||||
};
|
||||
LocalState.prototype.shouldForceResolvers = function (document) {
|
||||
var forceResolvers = false;
|
||||
visit(document, {
|
||||
Directive: {
|
||||
enter: function (node) {
|
||||
if (node.name.value === 'client' && node.arguments) {
|
||||
forceResolvers = node.arguments.some(function (arg) {
|
||||
return arg.name.value === 'always' &&
|
||||
arg.value.kind === 'BooleanValue' &&
|
||||
arg.value.value === true;
|
||||
});
|
||||
if (forceResolvers) {
|
||||
return BREAK;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
return forceResolvers;
|
||||
};
|
||||
LocalState.prototype.buildRootValueFromCache = function (document, variables) {
|
||||
return this.cache.diff({
|
||||
query: buildQueryFromSelectionSet(document),
|
||||
variables: variables,
|
||||
returnPartialData: true,
|
||||
optimistic: false,
|
||||
}).result;
|
||||
};
|
||||
LocalState.prototype.resolveDocument = function (document, rootValue, context, variables, fragmentMatcher, onlyRunForcedResolvers) {
|
||||
if (context === void 0) { context = {}; }
|
||||
if (variables === void 0) { variables = {}; }
|
||||
if (fragmentMatcher === void 0) { fragmentMatcher = function () { return true; }; }
|
||||
if (onlyRunForcedResolvers === void 0) { onlyRunForcedResolvers = false; }
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var mainDefinition, fragments, fragmentMap, definitionOperation, defaultOperationType, _a, cache, client, execContext;
|
||||
return __generator(this, function (_b) {
|
||||
mainDefinition = getMainDefinition(document);
|
||||
fragments = getFragmentDefinitions(document);
|
||||
fragmentMap = createFragmentMap(fragments);
|
||||
definitionOperation = mainDefinition
|
||||
.operation;
|
||||
defaultOperationType = definitionOperation
|
||||
? definitionOperation.charAt(0).toUpperCase() +
|
||||
definitionOperation.slice(1)
|
||||
: 'Query';
|
||||
_a = this, cache = _a.cache, client = _a.client;
|
||||
execContext = {
|
||||
fragmentMap: fragmentMap,
|
||||
context: __assign(__assign({}, context), { cache: cache, client: client }),
|
||||
variables: variables,
|
||||
fragmentMatcher: fragmentMatcher,
|
||||
defaultOperationType: defaultOperationType,
|
||||
exportedVariables: {},
|
||||
onlyRunForcedResolvers: onlyRunForcedResolvers,
|
||||
};
|
||||
return [2, this.resolveSelectionSet(mainDefinition.selectionSet, rootValue, execContext).then(function (result) { return ({
|
||||
result: result,
|
||||
exportedVariables: execContext.exportedVariables,
|
||||
}); })];
|
||||
});
|
||||
});
|
||||
};
|
||||
LocalState.prototype.resolveSelectionSet = function (selectionSet, rootValue, execContext) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var fragmentMap, context, variables, resultsToMerge, execute;
|
||||
var _this = this;
|
||||
return __generator(this, function (_a) {
|
||||
fragmentMap = execContext.fragmentMap, context = execContext.context, variables = execContext.variables;
|
||||
resultsToMerge = [rootValue];
|
||||
execute = function (selection) { return __awaiter(_this, void 0, void 0, function () {
|
||||
var fragment, typeCondition;
|
||||
return __generator(this, function (_a) {
|
||||
if (!shouldInclude(selection, variables)) {
|
||||
return [2];
|
||||
}
|
||||
if (isField(selection)) {
|
||||
return [2, this.resolveField(selection, rootValue, execContext).then(function (fieldResult) {
|
||||
var _a;
|
||||
if (typeof fieldResult !== 'undefined') {
|
||||
resultsToMerge.push((_a = {},
|
||||
_a[resultKeyNameFromField(selection)] = fieldResult,
|
||||
_a));
|
||||
}
|
||||
})];
|
||||
}
|
||||
if (isInlineFragment(selection)) {
|
||||
fragment = selection;
|
||||
}
|
||||
else {
|
||||
fragment = fragmentMap[selection.name.value];
|
||||
__DEV__ ? invariant(fragment, "No fragment named ".concat(selection.name.value)) : invariant(fragment, 9);
|
||||
}
|
||||
if (fragment && fragment.typeCondition) {
|
||||
typeCondition = fragment.typeCondition.name.value;
|
||||
if (execContext.fragmentMatcher(rootValue, typeCondition, context)) {
|
||||
return [2, this.resolveSelectionSet(fragment.selectionSet, rootValue, execContext).then(function (fragmentResult) {
|
||||
resultsToMerge.push(fragmentResult);
|
||||
})];
|
||||
}
|
||||
}
|
||||
return [2];
|
||||
});
|
||||
}); };
|
||||
return [2, Promise.all(selectionSet.selections.map(execute)).then(function () {
|
||||
return mergeDeepArray(resultsToMerge);
|
||||
})];
|
||||
});
|
||||
});
|
||||
};
|
||||
LocalState.prototype.resolveField = function (field, rootValue, execContext) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var variables, fieldName, aliasedFieldName, aliasUsed, defaultResult, resultPromise, resolverType, resolverMap, resolve;
|
||||
var _this = this;
|
||||
return __generator(this, function (_a) {
|
||||
variables = execContext.variables;
|
||||
fieldName = field.name.value;
|
||||
aliasedFieldName = resultKeyNameFromField(field);
|
||||
aliasUsed = fieldName !== aliasedFieldName;
|
||||
defaultResult = rootValue[aliasedFieldName] || rootValue[fieldName];
|
||||
resultPromise = Promise.resolve(defaultResult);
|
||||
if (!execContext.onlyRunForcedResolvers ||
|
||||
this.shouldForceResolvers(field)) {
|
||||
resolverType = rootValue.__typename || execContext.defaultOperationType;
|
||||
resolverMap = this.resolvers && this.resolvers[resolverType];
|
||||
if (resolverMap) {
|
||||
resolve = resolverMap[aliasUsed ? fieldName : aliasedFieldName];
|
||||
if (resolve) {
|
||||
resultPromise = Promise.resolve(cacheSlot.withValue(this.cache, resolve, [
|
||||
rootValue,
|
||||
argumentsObjectFromField(field, variables),
|
||||
execContext.context,
|
||||
{ field: field, fragmentMap: execContext.fragmentMap },
|
||||
]));
|
||||
}
|
||||
}
|
||||
}
|
||||
return [2, resultPromise.then(function (result) {
|
||||
if (result === void 0) { result = defaultResult; }
|
||||
if (field.directives) {
|
||||
field.directives.forEach(function (directive) {
|
||||
if (directive.name.value === 'export' && directive.arguments) {
|
||||
directive.arguments.forEach(function (arg) {
|
||||
if (arg.name.value === 'as' && arg.value.kind === 'StringValue') {
|
||||
execContext.exportedVariables[arg.value.value] = result;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
if (!field.selectionSet) {
|
||||
return result;
|
||||
}
|
||||
if (result == null) {
|
||||
return result;
|
||||
}
|
||||
if (Array.isArray(result)) {
|
||||
return _this.resolveSubSelectedArray(field, result, execContext);
|
||||
}
|
||||
if (field.selectionSet) {
|
||||
return _this.resolveSelectionSet(field.selectionSet, result, execContext);
|
||||
}
|
||||
})];
|
||||
});
|
||||
});
|
||||
};
|
||||
LocalState.prototype.resolveSubSelectedArray = function (field, result, execContext) {
|
||||
var _this = this;
|
||||
return Promise.all(result.map(function (item) {
|
||||
if (item === null) {
|
||||
return null;
|
||||
}
|
||||
if (Array.isArray(item)) {
|
||||
return _this.resolveSubSelectedArray(field, item, execContext);
|
||||
}
|
||||
if (field.selectionSet) {
|
||||
return _this.resolveSelectionSet(field.selectionSet, item, execContext);
|
||||
}
|
||||
}));
|
||||
};
|
||||
return LocalState;
|
||||
}());
|
||||
export { LocalState };
|
||||
//# sourceMappingURL=LocalState.js.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/LocalState.js.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/LocalState.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
67
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/ObservableQuery.d.ts
generated
vendored
Normal file
67
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/ObservableQuery.d.ts
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
import { NetworkStatus } from './networkStatus';
|
||||
import { Observable } from '../utilities';
|
||||
import { ApolloError } from '../errors';
|
||||
import { QueryManager } from './QueryManager';
|
||||
import { ApolloQueryResult, OperationVariables } from './types';
|
||||
import { WatchQueryOptions, FetchMoreQueryOptions, SubscribeToMoreOptions } from './watchQueryOptions';
|
||||
import { QueryInfo } from './QueryInfo';
|
||||
import { MissingFieldError } from '../cache';
|
||||
import { MissingTree } from '../cache/core/types/common';
|
||||
export interface FetchMoreOptions<TData = any, TVariables = OperationVariables> {
|
||||
updateQuery?: (previousQueryResult: TData, options: {
|
||||
fetchMoreResult?: TData;
|
||||
variables?: TVariables;
|
||||
}) => TData;
|
||||
}
|
||||
export interface UpdateQueryOptions<TVariables> {
|
||||
variables?: TVariables;
|
||||
}
|
||||
export declare class ObservableQuery<TData = any, TVariables = OperationVariables> extends Observable<ApolloQueryResult<TData>> {
|
||||
readonly options: WatchQueryOptions<TVariables, TData>;
|
||||
readonly queryId: string;
|
||||
readonly queryName?: string;
|
||||
get variables(): TVariables | undefined;
|
||||
private initialFetchPolicy;
|
||||
private isTornDown;
|
||||
private queryManager;
|
||||
private observers;
|
||||
private subscriptions;
|
||||
private last?;
|
||||
private queryInfo;
|
||||
private concast?;
|
||||
private observer?;
|
||||
private pollingInfo?;
|
||||
constructor({ queryManager, queryInfo, options, }: {
|
||||
queryManager: QueryManager<any>;
|
||||
queryInfo: QueryInfo;
|
||||
options: WatchQueryOptions<TVariables, TData>;
|
||||
});
|
||||
result(): Promise<ApolloQueryResult<TData>>;
|
||||
getCurrentResult(saveAsLastResult?: boolean): ApolloQueryResult<TData>;
|
||||
isDifferentFromLastResult(newResult: ApolloQueryResult<TData>): boolean;
|
||||
private getLast;
|
||||
getLastResult(variablesMustMatch?: boolean): ApolloQueryResult<TData> | undefined;
|
||||
getLastError(variablesMustMatch?: boolean): ApolloError | undefined;
|
||||
resetLastResults(): void;
|
||||
resetQueryStoreErrors(): void;
|
||||
refetch(variables?: Partial<TVariables>): Promise<ApolloQueryResult<TData>>;
|
||||
fetchMore(fetchMoreOptions: FetchMoreQueryOptions<TVariables, TData> & FetchMoreOptions<TData, TVariables>): Promise<ApolloQueryResult<TData>>;
|
||||
subscribeToMore<TSubscriptionData = TData, TSubscriptionVariables = TVariables>(options: SubscribeToMoreOptions<TData, TSubscriptionVariables, TSubscriptionData>): () => void;
|
||||
setOptions(newOptions: Partial<WatchQueryOptions<TVariables, TData>>): Promise<ApolloQueryResult<TData>>;
|
||||
setVariables(variables: TVariables): Promise<ApolloQueryResult<TData> | void>;
|
||||
updateQuery<TVars = TVariables>(mapFn: (previousQueryResult: TData, options: Pick<WatchQueryOptions<TVars, TData>, "variables">) => TData): void;
|
||||
startPolling(pollInterval: number): void;
|
||||
stopPolling(): void;
|
||||
private fetch;
|
||||
private updatePolling;
|
||||
private updateLastResult;
|
||||
reobserve(newOptions?: Partial<WatchQueryOptions<TVariables, TData>>, newNetworkStatus?: NetworkStatus): Promise<ApolloQueryResult<TData>>;
|
||||
private observe;
|
||||
private reportResult;
|
||||
private reportError;
|
||||
hasObservers(): boolean;
|
||||
private tearDownQuery;
|
||||
}
|
||||
export declare function logMissingFieldErrors(missing: MissingFieldError[] | MissingTree | undefined): void;
|
||||
export declare function applyNextFetchPolicy<TData, TVars>(options: Pick<WatchQueryOptions<TVars, TData>, "fetchPolicy" | "nextFetchPolicy">): void;
|
||||
//# sourceMappingURL=ObservableQuery.d.ts.map
|
||||
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/ObservableQuery.d.ts.map
generated
vendored
Normal file
1
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/ObservableQuery.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ObservableQuery.d.ts","sourceRoot":"","sources":["../../src/core/ObservableQuery.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAA4B,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAKL,UAAU,EAOX,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EAEvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAOzD,MAAM,WAAW,gBAAgB,C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,YAAY,EAAE,MAAM;IAKjC,WAAW;IAKlB,OAAO,CAAC,KAAK;IAab,OAAO,CAAC,aAAa;IAyDrB,OAAO,CAAC,gBAAgB;IAiBjB,SAAS,CACd,UAAU,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,EAC1D,gBAAgB,CAAC,EAAE,aAAa,GAC/B,OAAO,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;IA2EpC,OAAO,CAAC,OAAO;IAWf,OAAO,CAAC,YAAY;IAcpB,OAAO,CAAC,WAAW;IAmBZ,YAAY;IAInB,OAAO,CAAC,aAAa;CAgBtB;AAUD,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,iBAAiB,EAAE,GAAG,WAAW,GAAG,SAAS,QAOvD;AAMD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,KAAK,EAC/C,OAAO,EAAE,IAAI,CACX,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,EAC7B,aAAa,GACb,iBAAiB,CACpB,QAsBF"}
|
||||
446
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/ObservableQuery.js
generated
vendored
Normal file
446
receipeServer/frontend_old/node_modules/@apollo/react-hooks/node_modules/@apollo/client/core/ObservableQuery.js
generated
vendored
Normal file
@@ -0,0 +1,446 @@
|
||||
import { __assign, __extends } from "tslib";
|
||||
import { invariant } from "../utilities/globals/index.js";
|
||||
import { equal } from '@wry/equality';
|
||||
import { NetworkStatus, isNetworkRequestInFlight } from "./networkStatus.js";
|
||||
import { compact, cloneDeep, getOperationDefinition, Observable, iterateObserversSafely, isNonEmptyArray, fixObservableSubclass, getQueryDefinition, } from "../utilities/index.js";
|
||||
var assign = Object.assign, hasOwnProperty = Object.hasOwnProperty;
|
||||
var warnedAboutUpdateQuery = false;
|
||||
var ObservableQuery = (function (_super) {
|
||||
__extends(ObservableQuery, _super);
|
||||
function ObservableQuery(_a) {
|
||||
var queryManager = _a.queryManager, queryInfo = _a.queryInfo, options = _a.options;
|
||||
var _this = _super.call(this, function (observer) {
|
||||
try {
|
||||
var subObserver = observer._subscription._observer;
|
||||
if (subObserver && !subObserver.error) {
|
||||
subObserver.error = defaultSubscriptionObserverErrorCallback;
|
||||
}
|
||||
}
|
||||
catch (_a) { }
|
||||
var first = !_this.observers.size;
|
||||
_this.observers.add(observer);
|
||||
var last = _this.last;
|
||||
if (last && last.error) {
|
||||
observer.error && observer.error(last.error);
|
||||
}
|
||||
else if (last && last.result) {
|
||||
observer.next && observer.next(last.result);
|
||||
}
|
||||
if (first) {
|
||||
_this.reobserve().catch(function () { });
|
||||
}
|
||||
return function () {
|
||||
if (_this.observers.delete(observer) && !_this.observers.size) {
|
||||
_this.tearDownQuery();
|
||||
}
|
||||
};
|
||||
}) || this;
|
||||
_this.observers = new Set();
|
||||
_this.subscriptions = new Set();
|
||||
_this.isTornDown = false;
|
||||
_this.options = options;
|
||||
_this.queryId = queryInfo.queryId || queryManager.generateQueryId();
|
||||
var opDef = getOperationDefinition(options.query);
|
||||
_this.queryName = opDef && opDef.name && opDef.name.value;
|
||||
_this.initialFetchPolicy = options.fetchPolicy || "cache-first";
|
||||
_this.queryManager = queryManager;
|
||||
_this.queryInfo = queryInfo;
|
||||
return _this;
|
||||
}
|
||||
Object.defineProperty(ObservableQuery.prototype, "variables", {
|
||||
get: function () {
|
||||
return this.options.variables;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
ObservableQuery.prototype.result = function () {
|
||||
var _this = this;
|
||||
return new Promise(function (resolve, reject) {
|
||||
var observer = {
|
||||
next: function (result) {
|
||||
resolve(result);
|
||||
_this.observers.delete(observer);
|
||||
if (!_this.observers.size) {
|
||||
_this.queryManager.removeQuery(_this.queryId);
|
||||
}
|
||||
setTimeout(function () {
|
||||
subscription.unsubscribe();
|
||||
}, 0);
|
||||
},
|
||||
error: reject,
|
||||
};
|
||||
var subscription = _this.subscribe(observer);
|
||||
});
|
||||
};
|
||||
ObservableQuery.prototype.getCurrentResult = function (saveAsLastResult) {
|
||||
if (saveAsLastResult === void 0) { saveAsLastResult = true; }
|
||||
var lastResult = this.getLastResult(true);
|
||||
var networkStatus = this.queryInfo.networkStatus ||
|
||||
(lastResult && lastResult.networkStatus) ||
|
||||
NetworkStatus.ready;
|
||||
var result = __assign(__assign({}, lastResult), { loading: isNetworkRequestInFlight(networkStatus), networkStatus: networkStatus });
|
||||
var _a = this.options.fetchPolicy, fetchPolicy = _a === void 0 ? "cache-first" : _a;
|
||||
if (fetchPolicy === 'network-only' ||
|
||||
fetchPolicy === 'no-cache' ||
|
||||
fetchPolicy === 'standby' ||
|
||||
this.queryManager.transform(this.options.query).hasForcedResolvers) {
|
||||
}
|
||||
else {
|
||||
var diff = this.queryInfo.getDiff();
|
||||
if (diff.complete || this.options.returnPartialData) {
|
||||
result.data = diff.result;
|
||||
}
|
||||
if (equal(result.data, {})) {
|
||||
result.data = void 0;
|
||||
}
|
||||
if (diff.complete) {
|
||||
delete result.partial;
|
||||
if (diff.complete &&
|
||||
result.networkStatus === NetworkStatus.loading &&
|
||||
(fetchPolicy === 'cache-first' ||
|
||||
fetchPolicy === 'cache-only')) {
|
||||
result.networkStatus = NetworkStatus.ready;
|
||||
result.loading = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
result.partial = true;
|
||||
}
|
||||
if (__DEV__ &&
|
||||
!diff.complete &&
|
||||
!this.options.partialRefetch &&
|
||||
!result.loading &&
|
||||
!result.data &&
|
||||
!result.error) {
|
||||
logMissingFieldErrors(diff.missing);
|
||||
}
|
||||
}
|
||||
if (saveAsLastResult) {
|
||||
this.updateLastResult(result);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
ObservableQuery.prototype.isDifferentFromLastResult = function (newResult) {
|
||||
return !this.last || !equal(this.last.result, newResult);
|
||||
};
|
||||
ObservableQuery.prototype.getLast = function (key, variablesMustMatch) {
|
||||
var last = this.last;
|
||||
if (last &&
|
||||
last[key] &&
|
||||
(!variablesMustMatch || equal(last.variables, this.variables))) {
|
||||
return last[key];
|
||||
}
|
||||
};
|
||||
ObservableQuery.prototype.getLastResult = function (variablesMustMatch) {
|
||||
return this.getLast("result", variablesMustMatch);
|
||||
};
|
||||
ObservableQuery.prototype.getLastError = function (variablesMustMatch) {
|
||||
return this.getLast("error", variablesMustMatch);
|
||||
};
|
||||
ObservableQuery.prototype.resetLastResults = function () {
|
||||
delete this.last;
|
||||
this.isTornDown = false;
|
||||
};
|
||||
ObservableQuery.prototype.resetQueryStoreErrors = function () {
|
||||
this.queryManager.resetErrors(this.queryId);
|
||||
};
|
||||
ObservableQuery.prototype.refetch = function (variables) {
|
||||
var _a;
|
||||
var reobserveOptions = {
|
||||
pollInterval: 0,
|
||||
};
|
||||
var fetchPolicy = this.options.fetchPolicy;
|
||||
if (fetchPolicy === 'cache-and-network') {
|
||||
reobserveOptions.fetchPolicy = fetchPolicy;
|
||||
}
|
||||
else if (fetchPolicy === 'no-cache') {
|
||||
reobserveOptions.fetchPolicy = 'no-cache';
|
||||
}
|
||||
else {
|
||||
reobserveOptions.fetchPolicy = 'network-only';
|
||||
}
|
||||
if (__DEV__ && variables && hasOwnProperty.call(variables, "variables")) {
|
||||
var queryDef = getQueryDefinition(this.options.query);
|
||||
var vars = queryDef.variableDefinitions;
|
||||
if (!vars || !vars.some(function (v) { return v.variable.name.value === "variables"; })) {
|
||||
__DEV__ && invariant.warn("Called refetch(".concat(JSON.stringify(variables), ") for query ").concat(((_a = queryDef.name) === null || _a === void 0 ? void 0 : _a.value) || JSON.stringify(queryDef), ", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"));
|
||||
}
|
||||
}
|
||||
if (variables && !equal(this.options.variables, variables)) {
|
||||
reobserveOptions.variables = this.options.variables = __assign(__assign({}, this.options.variables), variables);
|
||||
}
|
||||
this.queryInfo.resetLastWrite();
|
||||
return this.reobserve(reobserveOptions, NetworkStatus.refetch);
|
||||
};
|
||||
ObservableQuery.prototype.fetchMore = function (fetchMoreOptions) {
|
||||
var _this = this;
|
||||
var combinedOptions = __assign(__assign({}, (fetchMoreOptions.query ? fetchMoreOptions : __assign(__assign(__assign({}, this.options), fetchMoreOptions), { variables: __assign(__assign({}, this.options.variables), fetchMoreOptions.variables) }))), { fetchPolicy: "no-cache" });
|
||||
var qid = this.queryManager.generateQueryId();
|
||||
if (combinedOptions.notifyOnNetworkStatusChange) {
|
||||
this.queryInfo.networkStatus = NetworkStatus.fetchMore;
|
||||
this.observe();
|
||||
}
|
||||
return this.queryManager.fetchQuery(qid, combinedOptions, NetworkStatus.fetchMore).then(function (fetchMoreResult) {
|
||||
var data = fetchMoreResult.data;
|
||||
var updateQuery = fetchMoreOptions.updateQuery;
|
||||
if (updateQuery) {
|
||||
if (__DEV__ &&
|
||||
!warnedAboutUpdateQuery) {
|
||||
__DEV__ && invariant.warn("The updateQuery callback for fetchMore is deprecated, and will be removed\nin the next major version of Apollo Client.\n\nPlease convert updateQuery functions to field policies with appropriate\nread and merge functions, or use/adapt a helper function (such as\nconcatPagination, offsetLimitPagination, or relayStylePagination) from\n@apollo/client/utilities.\n\nThe field policy system handles pagination more effectively than a\nhand-written updateQuery function, and you only need to define the policy\nonce, rather than every time you call fetchMore.");
|
||||
warnedAboutUpdateQuery = true;
|
||||
}
|
||||
_this.updateQuery(function (previous) { return updateQuery(previous, {
|
||||
fetchMoreResult: data,
|
||||
variables: combinedOptions.variables,
|
||||
}); });
|
||||
}
|
||||
else {
|
||||
_this.queryManager.cache.writeQuery({
|
||||
query: combinedOptions.query,
|
||||
variables: combinedOptions.variables,
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
return fetchMoreResult;
|
||||
}).finally(function () {
|
||||
_this.queryManager.stopQuery(qid);
|
||||
_this.reobserve();
|
||||
});
|
||||
};
|
||||
ObservableQuery.prototype.subscribeToMore = function (options) {
|
||||
var _this = this;
|
||||
var subscription = this.queryManager
|
||||
.startGraphQLSubscription({
|
||||
query: options.document,
|
||||
variables: options.variables,
|
||||
context: options.context,
|
||||
})
|
||||
.subscribe({
|
||||
next: function (subscriptionData) {
|
||||
var updateQuery = options.updateQuery;
|
||||
if (updateQuery) {
|
||||
_this.updateQuery(function (previous, _a) {
|
||||
var variables = _a.variables;
|
||||
return updateQuery(previous, {
|
||||
subscriptionData: subscriptionData,
|
||||
variables: variables,
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
if (options.onError) {
|
||||
options.onError(err);
|
||||
return;
|
||||
}
|
||||
__DEV__ && invariant.error('Unhandled GraphQL subscription error', err);
|
||||
},
|
||||
});
|
||||
this.subscriptions.add(subscription);
|
||||
return function () {
|
||||
if (_this.subscriptions.delete(subscription)) {
|
||||
subscription.unsubscribe();
|
||||
}
|
||||
};
|
||||
};
|
||||
ObservableQuery.prototype.setOptions = function (newOptions) {
|
||||
return this.reobserve(newOptions);
|
||||
};
|
||||
ObservableQuery.prototype.setVariables = function (variables) {
|
||||
if (equal(this.variables, variables)) {
|
||||
return this.observers.size
|
||||
? this.result()
|
||||
: Promise.resolve();
|
||||
}
|
||||
this.options.variables = variables;
|
||||
if (!this.observers.size) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
return this.reobserve({
|
||||
fetchPolicy: this.initialFetchPolicy,
|
||||
variables: variables,
|
||||
}, NetworkStatus.setVariables);
|
||||
};
|
||||
ObservableQuery.prototype.updateQuery = function (mapFn) {
|
||||
var queryManager = this.queryManager;
|
||||
var result = queryManager.cache.diff({
|
||||
query: this.options.query,
|
||||
variables: this.variables,
|
||||
returnPartialData: true,
|
||||
optimistic: false,
|
||||
}).result;
|
||||
var newResult = mapFn(result, {
|
||||
variables: this.variables,
|
||||
});
|
||||
if (newResult) {
|
||||
queryManager.cache.writeQuery({
|
||||
query: this.options.query,
|
||||
data: newResult,
|
||||
variables: this.variables,
|
||||
});
|
||||
queryManager.broadcastQueries();
|
||||
}
|
||||
};
|
||||
ObservableQuery.prototype.startPolling = function (pollInterval) {
|
||||
this.options.pollInterval = pollInterval;
|
||||
this.updatePolling();
|
||||
};
|
||||
ObservableQuery.prototype.stopPolling = function () {
|
||||
this.options.pollInterval = 0;
|
||||
this.updatePolling();
|
||||
};
|
||||
ObservableQuery.prototype.fetch = function (options, newNetworkStatus) {
|
||||
this.queryManager.setObservableQuery(this);
|
||||
return this.queryManager.fetchQueryObservable(this.queryId, options, newNetworkStatus);
|
||||
};
|
||||
ObservableQuery.prototype.updatePolling = function () {
|
||||
var _this = this;
|
||||
if (this.queryManager.ssrMode) {
|
||||
return;
|
||||
}
|
||||
var _a = this, pollingInfo = _a.pollingInfo, pollInterval = _a.options.pollInterval;
|
||||
if (!pollInterval) {
|
||||
if (pollingInfo) {
|
||||
clearTimeout(pollingInfo.timeout);
|
||||
delete this.pollingInfo;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (pollingInfo &&
|
||||
pollingInfo.interval === pollInterval) {
|
||||
return;
|
||||
}
|
||||
__DEV__ ? invariant(pollInterval, 'Attempted to start a polling query without a polling interval.') : invariant(pollInterval, 10);
|
||||
var info = pollingInfo || (this.pollingInfo = {});
|
||||
info.interval = pollInterval;
|
||||
var maybeFetch = function () {
|
||||
if (_this.pollingInfo) {
|
||||
if (!isNetworkRequestInFlight(_this.queryInfo.networkStatus)) {
|
||||
_this.reobserve({
|
||||
fetchPolicy: "network-only",
|
||||
}, NetworkStatus.poll).then(poll, poll);
|
||||
}
|
||||
else {
|
||||
poll();
|
||||
}
|
||||
}
|
||||
;
|
||||
};
|
||||
var poll = function () {
|
||||
var info = _this.pollingInfo;
|
||||
if (info) {
|
||||
clearTimeout(info.timeout);
|
||||
info.timeout = setTimeout(maybeFetch, info.interval);
|
||||
}
|
||||
};
|
||||
poll();
|
||||
};
|
||||
ObservableQuery.prototype.updateLastResult = function (newResult, variables) {
|
||||
if (variables === void 0) { variables = this.variables; }
|
||||
this.last = __assign(__assign({}, this.last), { result: this.queryManager.assumeImmutableResults
|
||||
? newResult
|
||||
: cloneDeep(newResult), variables: variables });
|
||||
if (!isNonEmptyArray(newResult.errors)) {
|
||||
delete this.last.error;
|
||||
}
|
||||
return this.last;
|
||||
};
|
||||
ObservableQuery.prototype.reobserve = function (newOptions, newNetworkStatus) {
|
||||
var _this = this;
|
||||
this.isTornDown = false;
|
||||
var useDisposableConcast = newNetworkStatus === NetworkStatus.refetch ||
|
||||
newNetworkStatus === NetworkStatus.fetchMore ||
|
||||
newNetworkStatus === NetworkStatus.poll;
|
||||
var oldVariables = this.options.variables;
|
||||
var options = useDisposableConcast
|
||||
? compact(this.options, newOptions)
|
||||
: assign(this.options, compact(newOptions));
|
||||
if (!useDisposableConcast) {
|
||||
this.updatePolling();
|
||||
if (newOptions &&
|
||||
newOptions.variables &&
|
||||
!newOptions.fetchPolicy &&
|
||||
!equal(newOptions.variables, oldVariables)) {
|
||||
options.fetchPolicy = this.initialFetchPolicy;
|
||||
if (newNetworkStatus === void 0) {
|
||||
newNetworkStatus = NetworkStatus.setVariables;
|
||||
}
|
||||
}
|
||||
}
|
||||
var variables = options.variables && __assign({}, options.variables);
|
||||
var concast = this.fetch(options, newNetworkStatus);
|
||||
var observer = {
|
||||
next: function (result) {
|
||||
_this.reportResult(result, variables);
|
||||
},
|
||||
error: function (error) {
|
||||
_this.reportError(error, variables);
|
||||
},
|
||||
};
|
||||
if (!useDisposableConcast) {
|
||||
if (this.concast && this.observer) {
|
||||
this.concast.removeObserver(this.observer, true);
|
||||
}
|
||||
this.concast = concast;
|
||||
this.observer = observer;
|
||||
}
|
||||
concast.addObserver(observer);
|
||||
return concast.promise;
|
||||
};
|
||||
ObservableQuery.prototype.observe = function () {
|
||||
this.reportResult(this.getCurrentResult(false), this.variables);
|
||||
};
|
||||
ObservableQuery.prototype.reportResult = function (result, variables) {
|
||||
var lastError = this.getLastError();
|
||||
if (lastError || this.isDifferentFromLastResult(result)) {
|
||||
if (lastError || !result.partial || this.options.returnPartialData) {
|
||||
this.updateLastResult(result, variables);
|
||||
}
|
||||
iterateObserversSafely(this.observers, 'next', result);
|
||||
}
|
||||
};
|
||||
ObservableQuery.prototype.reportError = function (error, variables) {
|
||||
var errorResult = __assign(__assign({}, this.getLastResult()), { error: error, errors: error.graphQLErrors, networkStatus: NetworkStatus.error, loading: false });
|
||||
this.updateLastResult(errorResult, variables);
|
||||
iterateObserversSafely(this.observers, 'error', this.last.error = error);
|
||||
};
|
||||
ObservableQuery.prototype.hasObservers = function () {
|
||||
return this.observers.size > 0;
|
||||
};
|
||||
ObservableQuery.prototype.tearDownQuery = function () {
|
||||
if (this.isTornDown)
|
||||
return;
|
||||
if (this.concast && this.observer) {
|
||||
this.concast.removeObserver(this.observer);
|
||||
delete this.concast;
|
||||
delete this.observer;
|
||||
}
|
||||
this.stopPolling();
|
||||
this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });
|
||||
this.subscriptions.clear();
|
||||
this.queryManager.stopQuery(this.queryId);
|
||||
this.observers.clear();
|
||||
this.isTornDown = true;
|
||||
};
|
||||
return ObservableQuery;
|
||||
}(Observable));
|
||||
export { ObservableQuery };
|
||||
fixObservableSubclass(ObservableQuery);
|
||||
function defaultSubscriptionObserverErrorCallback(error) {
|
||||
__DEV__ && invariant.error('Unhandled error', error.message, error.stack);
|
||||
}
|
||||
export function logMissingFieldErrors(missing) {
|
||||
if (__DEV__ && missing) {
|
||||
__DEV__ && invariant.debug("Missing cache result fields: ".concat(JSON.stringify(missing)), missing);
|
||||
}
|
||||
}
|
||||
export function applyNextFetchPolicy(options) {
|
||||
var _a = options.fetchPolicy, fetchPolicy = _a === void 0 ? "cache-first" : _a, nextFetchPolicy = options.nextFetchPolicy;
|
||||
if (nextFetchPolicy) {
|
||||
options.fetchPolicy = typeof nextFetchPolicy === "function"
|
||||
? nextFetchPolicy.call(options, fetchPolicy)
|
||||
: nextFetchPolicy;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=ObservableQuery.js.map
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user