@warp-drive-mirror/core 5.10.0-alpha.21 → 5.10.0-alpha.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{-private-CvZfrDZl.js → -private-DhEjiHue.js} +2 -2
- package/dist/{-private-CvZfrDZl.js.map → -private-DhEjiHue.js.map} +1 -1
- package/dist/build-config/babel-macros.d.ts +5 -0
- package/dist/build-config/canary-features.d.ts +5 -0
- package/dist/build-config/debugging.d.ts +59 -0
- package/dist/build-config/deprecations.d.ts +5 -0
- package/dist/build-config.d.ts +17 -0
- package/dist/{concepts-vh86nAcd.d.ts → concepts-Db9ssz1h.d.ts} +3 -3
- package/dist/{concepts-vh86nAcd.d.ts.map → concepts-Db9ssz1h.d.ts.map} +1 -1
- package/dist/configure.d.ts +8 -0
- package/dist/configure.js +1 -1
- package/dist/{document-B8Fup751.d.ts → document-BUmwSPVO.d.ts} +2 -2
- package/dist/{document-B8Fup751.d.ts.map → document-BUmwSPVO.d.ts.map} +1 -1
- package/dist/{fields-r1rZJB9d.d.ts → fields-B-jO-dzB.d.ts} +111 -47
- package/dist/fields-B-jO-dzB.d.ts.map +1 -0
- package/dist/graph/-private.d.ts +1 -1
- package/dist/graph/-private.js +33 -20
- package/dist/graph/-private.js.map +1 -1
- package/dist/{graph-BqxaFjEb.d.ts → graph-CoQhsOgT.d.ts} +3 -3
- package/dist/{graph-BqxaFjEb.d.ts.map → graph-CoQhsOgT.d.ts.map} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{internal-D_WIXC4r.d.ts → internal-BrC3kM86.d.ts} +20 -6
- package/dist/internal-BrC3kM86.d.ts.map +1 -0
- package/dist/reactive/-private.d.ts +1 -1
- package/dist/reactive.d.ts +276 -1
- package/dist/reactive.js +2 -2
- package/dist/{request-CxtnNIIp.js → request-qKqD2aCa.js} +2 -2
- package/dist/{request-CxtnNIIp.js.map → request-qKqD2aCa.js.map} +1 -1
- package/dist/request.d.ts +9 -1
- package/dist/request.js +1 -1
- package/dist/signals/-leaked.d.ts +15 -1
- package/dist/signals/-leaked.d.ts.map +1 -1
- package/dist/signals/-leaked.js +1 -1
- package/dist/{src-ccp1WKyt.js → src-spa19bCt.js} +30 -13
- package/dist/src-spa19bCt.js.map +1 -0
- package/dist/store/-private.d.ts +1 -1
- package/dist/store/-private.js +1 -1
- package/dist/store.d.ts +6 -1
- package/dist/types/-private.js +1 -1
- package/dist/types/cache/relationship.d.ts +5 -0
- package/dist/types/cache.d.ts +6 -1
- package/dist/types/graph.d.ts +6 -1
- package/dist/types/record.d.ts +5 -0
- package/dist/types/request.d.ts +1 -1
- package/dist/types/schema/concepts.d.ts +6 -1
- package/dist/types/schema/fields.d.ts +2 -2
- package/dist/types/schema/fields.js +82 -23
- package/dist/types/schema/fields.js.map +1 -1
- package/dist/types/schema/schema-service.d.ts +6 -1
- package/dist/types/spec/document.d.ts +1 -1
- package/dist/types/spec/error.d.ts +4 -0
- package/dist/types/spec/json-api-raw.d.ts +5 -0
- package/dist/types.d.ts +9 -1
- package/dist/unpkg/{dev-deprecated/-private-B4pCmkq-.js → dev/-private-BJ2WIhKs.js} +2 -2
- package/dist/unpkg/dev/{-private-B4pCmkq-.js.map → -private-BJ2WIhKs.js.map} +1 -1
- package/dist/unpkg/dev/configure.js +1 -1
- package/dist/unpkg/dev/graph/-private.js +34 -21
- package/dist/unpkg/dev/graph/-private.js.map +1 -1
- package/dist/unpkg/dev/index.js +1 -1
- package/dist/unpkg/dev/reactive.js +2 -2
- package/dist/unpkg/dev/{request-oWpijCPQ.js → request-6lzVjHLN.js} +2 -2
- package/dist/unpkg/{dev-deprecated/request-oWpijCPQ.js.map → dev/request-6lzVjHLN.js.map} +1 -1
- package/dist/unpkg/dev/request.js +1 -1
- package/dist/unpkg/dev/signals/-leaked.js +1 -1
- package/dist/unpkg/dev/{src-C4ET4R1n.js → src-D1dbEzXb.js} +31 -14
- package/dist/unpkg/dev/src-D1dbEzXb.js.map +1 -0
- package/dist/unpkg/dev/store/-private.js +1 -1
- package/dist/unpkg/dev/{store-dZViNfMK.js → store-DVS3G92Q.js} +2 -2
- package/dist/unpkg/dev/{store-dZViNfMK.js.map → store-DVS3G92Q.js.map} +1 -1
- package/dist/unpkg/dev/store.js +1 -1
- package/dist/unpkg/dev/types/-private.js +1 -1
- package/dist/unpkg/dev/types/schema/fields.js +82 -23
- package/dist/unpkg/dev/types/schema/fields.js.map +1 -1
- package/dist/unpkg/{dev/-private-B4pCmkq-.js → dev-deprecated/-private-BJ2WIhKs.js} +2 -2
- package/dist/unpkg/dev-deprecated/{-private-B4pCmkq-.js.map → -private-BJ2WIhKs.js.map} +1 -1
- package/dist/unpkg/dev-deprecated/configure.js +1 -1
- package/dist/unpkg/dev-deprecated/graph/-private.js +34 -21
- package/dist/unpkg/dev-deprecated/graph/-private.js.map +1 -1
- package/dist/unpkg/dev-deprecated/index.js +1 -1
- package/dist/unpkg/dev-deprecated/reactive.js +2 -2
- package/dist/unpkg/dev-deprecated/{request-oWpijCPQ.js → request-6lzVjHLN.js} +2 -2
- package/dist/unpkg/{dev/request-oWpijCPQ.js.map → dev-deprecated/request-6lzVjHLN.js.map} +1 -1
- package/dist/unpkg/dev-deprecated/request.js +1 -1
- package/dist/unpkg/dev-deprecated/signals/-leaked.js +1 -1
- package/dist/unpkg/dev-deprecated/{src-jHpowq3S.js → src-Tvv7X1KB.js} +30 -13
- package/dist/unpkg/dev-deprecated/src-Tvv7X1KB.js.map +1 -0
- package/dist/unpkg/dev-deprecated/store/-private.js +1 -1
- package/dist/unpkg/dev-deprecated/types/-private.js +1 -1
- package/dist/unpkg/dev-deprecated/types/schema/fields.js +82 -23
- package/dist/unpkg/dev-deprecated/types/schema/fields.js.map +1 -1
- package/dist/unpkg/{prod-deprecated/-private-CrUi_3E_.js → prod/-private-Dg07O05r.js} +2 -2
- package/dist/unpkg/{prod-deprecated/-private-CrUi_3E_.js.map → prod/-private-Dg07O05r.js.map} +1 -1
- package/dist/unpkg/prod/configure.js +1 -1
- package/dist/unpkg/prod/graph/-private.js +27 -12
- package/dist/unpkg/prod/graph/-private.js.map +1 -1
- package/dist/unpkg/prod/index.js +1 -1
- package/dist/unpkg/prod/reactive.js +2 -2
- package/dist/unpkg/{prod-deprecated/request-Cgw3j6Dx.js → prod/request-edWLn9JK.js} +2 -2
- package/dist/unpkg/prod/{request-Cgw3j6Dx.js.map → request-edWLn9JK.js.map} +1 -1
- package/dist/unpkg/prod/request.js +1 -1
- package/dist/unpkg/prod/signals/-leaked.js +1 -1
- package/dist/unpkg/prod/{src-DFmPDGQ6.js → src-BIRx6kC-.js} +33 -12
- package/dist/unpkg/prod/src-BIRx6kC-.js.map +1 -0
- package/dist/unpkg/prod/store/-private.js +1 -1
- package/dist/unpkg/prod/types/-private.js +1 -1
- package/dist/unpkg/prod/types/schema/fields.js +82 -23
- package/dist/unpkg/prod/types/schema/fields.js.map +1 -1
- package/dist/unpkg/{prod/-private-CrUi_3E_.js → prod-deprecated/-private-Dg07O05r.js} +2 -2
- package/dist/unpkg/{prod/-private-CrUi_3E_.js.map → prod-deprecated/-private-Dg07O05r.js.map} +1 -1
- package/dist/unpkg/prod-deprecated/configure.js +1 -1
- package/dist/unpkg/prod-deprecated/graph/-private.js +27 -12
- package/dist/unpkg/prod-deprecated/graph/-private.js.map +1 -1
- package/dist/unpkg/prod-deprecated/index.js +1 -1
- package/dist/unpkg/prod-deprecated/reactive.js +2 -2
- package/dist/unpkg/{prod/request-Cgw3j6Dx.js → prod-deprecated/request-edWLn9JK.js} +2 -2
- package/dist/unpkg/prod-deprecated/{request-Cgw3j6Dx.js.map → request-edWLn9JK.js.map} +1 -1
- package/dist/unpkg/prod-deprecated/request.js +1 -1
- package/dist/unpkg/prod-deprecated/signals/-leaked.js +1 -1
- package/dist/unpkg/prod-deprecated/{src-BgQLcshl.js → src-0f4an0QR.js} +33 -12
- package/dist/unpkg/prod-deprecated/src-0f4an0QR.js.map +1 -0
- package/dist/unpkg/prod-deprecated/store/-private.js +1 -1
- package/dist/unpkg/prod-deprecated/types/-private.js +1 -1
- package/dist/unpkg/prod-deprecated/types/schema/fields.js +82 -23
- package/dist/unpkg/prod-deprecated/types/schema/fields.js.map +1 -1
- package/package.json +4 -4
- package/dist/fields-r1rZJB9d.d.ts.map +0 -1
- package/dist/internal-D_WIXC4r.d.ts.map +0 -1
- package/dist/src-ccp1WKyt.js.map +0 -1
- package/dist/unpkg/dev/src-C4ET4R1n.js.map +0 -1
- package/dist/unpkg/dev-deprecated/src-jHpowq3S.js.map +0 -1
- package/dist/unpkg/prod/src-DFmPDGQ6.js.map +0 -1
- package/dist/unpkg/prod-deprecated/src-BgQLcshl.js.map +0 -1
package/dist/store/-private.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as PrivateStore, At as CachePolicy, Ct as setRecordIdentifier, Et as assertPrivateCapabilities, G as logGroup, J as normalizeModelName, K as LegacyManyArray, Mt as StoreRequestContext, Nt as StoreRequestInput, Q as CreateRecordProperties, St as recordIdentifierFor, Tt as PrivateCacheCapabilitiesManager, W as log, X as ensureStringId, Y as coerceId, Z as constructResource, at as Request, bt as StoreMap, cn as isRequestKey, ct as SaveRecordMutation, dt as LegacyQueryArray, et as Store, ft as LegacyLiveArray, it as PrivateRequestStateService, jt as CacheHandler, ln as isResourceKey, lt as RecordArrayManager, mt as ReactiveResourceArray, nt as isPrivateStore, on as FieldValueIdentity, ot as RequestCacheRequestState, pt as PrivateReactiveResourceArray, q as createLegacyManyArray, rt as FindRecordQuery, sn as fieldValueIdentity, st as RequestStateService, tt as assertPrivateStore, ut as fastPush, vt as NativeProxy, wt as storeFor, xt as _clearCaches, yt as InstanceCache } from "../internal-
|
|
1
|
+
import { $ as PrivateStore, At as CachePolicy, Ct as setRecordIdentifier, Et as assertPrivateCapabilities, G as logGroup, J as normalizeModelName, K as LegacyManyArray, Mt as StoreRequestContext, Nt as StoreRequestInput, Q as CreateRecordProperties, St as recordIdentifierFor, Tt as PrivateCacheCapabilitiesManager, W as log, X as ensureStringId, Y as coerceId, Z as constructResource, at as Request, bt as StoreMap, cn as isRequestKey, ct as SaveRecordMutation, dt as LegacyQueryArray, et as Store, ft as LegacyLiveArray, it as PrivateRequestStateService, jt as CacheHandler, ln as isResourceKey, lt as RecordArrayManager, mt as ReactiveResourceArray, nt as isPrivateStore, on as FieldValueIdentity, ot as RequestCacheRequestState, pt as PrivateReactiveResourceArray, q as createLegacyManyArray, rt as FindRecordQuery, sn as fieldValueIdentity, st as RequestStateService, tt as assertPrivateStore, ut as fastPush, vt as NativeProxy, wt as storeFor, xt as _clearCaches, yt as InstanceCache } from "../internal-BrC3kM86.js";
|
|
2
2
|
export { CacheHandler, type CachePolicy, type LegacyQueryArray as CollectionRecordArray, type LegacyQueryArray, type CreateRecordProperties, type FieldValueIdentity, type FindRecordQuery, type InstanceCache, type LegacyLiveArray, type LegacyLiveArray as LiveArray, type LegacyManyArray, type LegacyManyArray as RelatedCollection, type NativeProxy, type PrivateCacheCapabilitiesManager, type PrivateReactiveResourceArray, type PrivateRequestStateService, type PrivateStore, type ReactiveResourceArray, RecordArrayManager, type Request, type RequestCacheRequestState, type RequestStateService, type SaveRecordMutation, Store, StoreMap, type StoreRequestContext, type StoreRequestInput, _clearCaches, normalizeModelName as _deprecatingNormalize, assertPrivateCapabilities, assertPrivateStore, coerceId, constructResource, createLegacyManyArray, ensureStringId, fastPush, fieldValueIdentity, isPrivateStore, isRequestKey, isResourceKey, log, logGroup, recordIdentifierFor, setRecordIdentifier, storeFor };
|
package/dist/store/-private.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as setRecordIdentifier, D as isRequestKey, E as fieldValueIdentity, F as coerceId, I as ensureStringId, L as log, O as isResourceKey, P as normalizeModelName, R as logGroup, S as recordIdentifierFor, T as assertPrivateCapabilities, _ as isPrivateStore, b as StoreMap, f as createLegacyManyArray, g as assertPrivateStore, h as Store, m as CacheHandler, p as constructResource, v as RecordArrayManager, w as storeFor, x as _clearCaches, y as fastPush } from "../src-
|
|
1
|
+
import { C as setRecordIdentifier, D as isRequestKey, E as fieldValueIdentity, F as coerceId, I as ensureStringId, L as log, O as isResourceKey, P as normalizeModelName, R as logGroup, S as recordIdentifierFor, T as assertPrivateCapabilities, _ as isPrivateStore, b as StoreMap, f as createLegacyManyArray, g as assertPrivateStore, h as Store, m as CacheHandler, p as constructResource, v as RecordArrayManager, w as storeFor, x as _clearCaches, y as fastPush } from "../src-spa19bCt.js";
|
|
2
2
|
|
|
3
3
|
export { CacheHandler, RecordArrayManager, Store, StoreMap, _clearCaches, normalizeModelName as _deprecatingNormalize, assertPrivateCapabilities, assertPrivateStore, coerceId, constructResource, createLegacyManyArray, ensureStringId, fastPush, fieldValueIdentity, isPrivateStore, isRequestKey, isResourceKey, log, logGroup, recordIdentifierFor, setRecordIdentifier, storeFor };
|
package/dist/store.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @module
|
|
3
|
+
* @summary The `DefaultCachePolicy` and `parseCacheControl` for expiring cached requests, plus the
|
|
4
|
+
* `NotificationManager` type for subscribing to cache change notifications.
|
|
5
|
+
*/
|
|
6
|
+
import { F as PolicyConfig, I as parseCacheControl, N as CacheControlValue, P as DefaultCachePolicy, rn as NotificationManager } from "./internal-BrC3kM86.js";
|
|
2
7
|
export { type CacheControlValue, DefaultCachePolicy, type NotificationManager, type PolicyConfig, parseCacheControl };
|
package/dist/types/-private.js
CHANGED
|
@@ -2,7 +2,7 @@ import { getGlobalConfig, macroCondition } from "@embroider/macros";
|
|
|
2
2
|
|
|
3
3
|
// src/types/-private.ts
|
|
4
4
|
const name = "@warp-drive-mirror/core";
|
|
5
|
-
const version = "5.10.0-alpha.
|
|
5
|
+
const version = "5.10.0-alpha.22";
|
|
6
6
|
const GlobalRef = globalThis;
|
|
7
7
|
const UniversalCache = GlobalRef.__warpDrive_universalCache = GlobalRef.__warpDrive_universalCache ?? {};
|
|
8
8
|
GlobalRef[name] = GlobalRef[name] ?? { __version: version };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module
|
|
3
|
+
* @summary Types for the cache-side state of to-one and to-many relationships, with related resources referenced by
|
|
4
|
+
* `ResourceKey`.
|
|
5
|
+
*/
|
|
1
6
|
import { n as Relationship, r as ResourceRelationship, t as CollectionRelationship } from "../../relationship-99pc4CaS.js";
|
|
2
7
|
export { CollectionRelationship, Relationship, ResourceRelationship };
|
package/dist/types/cache.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @module
|
|
3
|
+
* @summary The `Cache` interface a cache implementation fulfills to store, patch, mutate and read documents and
|
|
4
|
+
* resources, plus the `ChangedAttributesHash` and `RelationshipDiff` types.
|
|
5
|
+
*/
|
|
6
|
+
import { Qt as RelationshipDiff, Xt as Cache, Zt as ChangedAttributesHash } from "../internal-BrC3kM86.js";
|
|
2
7
|
export { Cache, ChangedAttributesHash, RelationshipDiff };
|
package/dist/types/graph.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @module
|
|
3
|
+
* @summary Types for the operations that update a relationship's remote (persisted) or local (uncommitted) state in the
|
|
4
|
+
* relationship Graph.
|
|
5
|
+
*/
|
|
6
|
+
import { a as ReplaceRelatedRecordOperation, c as UnknownOperation, i as RemoteRelationshipOperation, l as UpdateRelationshipOperation, n as LocalRelationshipOperation, o as ReplaceRelatedRecordsOperation, r as Operation, s as SortRelatedRecords, t as DeleteRecordOperation } from "../graph-CoQhsOgT.js";
|
|
2
7
|
export { DeleteRecordOperation, LocalRelationshipOperation, Operation, RemoteRelationshipOperation, ReplaceRelatedRecordOperation, ReplaceRelatedRecordsOperation, SortRelatedRecords, UnknownOperation, UpdateRelationshipOperation };
|
package/dist/types/record.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module
|
|
3
|
+
* @summary Types for records that declare their resource type via the `[Type]` symbol, including `TypedRecordInstance`,
|
|
4
|
+
* `Includes`, `Mask` and the `createIncludeValidator` helper.
|
|
5
|
+
*/
|
|
1
6
|
import { a as StringSatisfiesIncludes, c as TypedRecordInstance, i as OpaqueRecordInstance, l as Validate, n as Includes, o as TypeFromInstance, r as Mask, s as TypeFromInstanceOrString, t as ExtractSuggestedCacheTypes, u as createIncludeValidator } from "../record-f5-uOgHt.js";
|
|
2
7
|
export { ExtractSuggestedCacheTypes, Includes, Mask, OpaqueRecordInstance, StringSatisfiesIncludes, TypeFromInstance, TypeFromInstanceOrString, TypedRecordInstance, Validate, createIncludeValidator };
|
package/dist/types/request.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $n as STRUCTURED, Bn as HTTPMethod, Fn as CreateRequestOptions, Gn as ImmutableRequestInfo, Hn as ImmutableCreateRequestOptions, In as DeleteRequestOptions, Jn as QueryRequestOptions, Kn as ImmutableUpdateRequestOptions, Ln as EnableHydration, Nn as CacheOptions, Pn as ConstrainedRequestOptions, Qn as ResponseInfo, Rn as FindRecordOptions, Un as ImmutableDeleteRequestOptions, Vn as IS_FUTURE, Wn as ImmutableHeaders, Xn as RequestContext, Yn as RemotelyAccessibleIdentifier, Zn as RequestInfo, ar as FetchError, er as SkipCache, ir as UpdateRequestOptions, nr as StructuredDocument, qn as PostQueryRequestOptions, rr as StructuredErrorDocument, tr as StructuredDataDocument, zn as FindRecordRequestOptions } from "../internal-
|
|
1
|
+
import { $n as STRUCTURED, Bn as HTTPMethod, Fn as CreateRequestOptions, Gn as ImmutableRequestInfo, Hn as ImmutableCreateRequestOptions, In as DeleteRequestOptions, Jn as QueryRequestOptions, Kn as ImmutableUpdateRequestOptions, Ln as EnableHydration, Nn as CacheOptions, Pn as ConstrainedRequestOptions, Qn as ResponseInfo, Rn as FindRecordOptions, Un as ImmutableDeleteRequestOptions, Vn as IS_FUTURE, Wn as ImmutableHeaders, Xn as RequestContext, Yn as RemotelyAccessibleIdentifier, Zn as RequestInfo, ar as FetchError, er as SkipCache, ir as UpdateRequestOptions, nr as StructuredDocument, qn as PostQueryRequestOptions, rr as StructuredErrorDocument, tr as StructuredDataDocument, zn as FindRecordRequestOptions } from "../internal-BrC3kM86.js";
|
|
2
2
|
export { CacheOptions, ConstrainedRequestOptions, CreateRequestOptions, DeleteRequestOptions, EnableHydration, type FetchError, FindRecordOptions, FindRecordRequestOptions, HTTPMethod, IS_FUTURE, ImmutableCreateRequestOptions, ImmutableDeleteRequestOptions, ImmutableHeaders, ImmutableRequestInfo, ImmutableUpdateRequestOptions, PostQueryRequestOptions, QueryRequestOptions, RemotelyAccessibleIdentifier, RequestContext, RequestInfo, ResponseInfo, STRUCTURED, SkipCache, StructuredDataDocument, StructuredDocument, StructuredErrorDocument, UpdateRequestOptions };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @module
|
|
3
|
+
* @summary Types for the functions schemas reference by name: `Transformation` to convert field values, `Derivation`
|
|
4
|
+
* for computed fields and `HashFn` for object identity.
|
|
5
|
+
*/
|
|
6
|
+
import { n as HashFn, r as Transformation, t as Derivation } from "../../concepts-Db9ssz1h.js";
|
|
2
7
|
export { Derivation, HashFn, Transformation };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as ResourceField, C as ObjectField, D as PolarisModeFieldSchema, E as PolarisAliasField, F as Trait, I as isLegacyResourceSchema, L as
|
|
2
|
-
export { ArrayField, AttrOptions, CacheableFieldSchema, CollectionField, DerivedField, FieldSchema, GenericField, HashField, IdentityField, LegacyAliasField, LegacyAttributeField, LegacyBelongsToField, LegacyField, LegacyHasManyField, LegacyModeFieldSchema, LegacyRelationshipField, LegacyResourceSchema, LegacyTrait, LinksModeBelongsToField, LinksModeHasManyField, LocalField, ObjectAliasField, ObjectField, ObjectFieldSchema, ObjectSchema, PolarisAliasField, PolarisModeFieldSchema, PolarisResourceSchema, PolarisTrait, ResourceField, ResourceSchema, Schema, SchemaArrayField, SchemaObjectField, Trait, isLegacyResourceSchema, isResourceSchema, objectSchema, resourceSchema };
|
|
1
|
+
import { A as ResourceField, B as isSingleKind, C as ObjectField, D as PolarisModeFieldSchema, E as PolarisAliasField, F as Trait, H as resourceSchema, I as isLegacyResourceSchema, L as isManyKind, M as Schema, N as SchemaArrayField, O as PolarisResourceSchema, P as SchemaObjectField, R as isRelationshipKind, S as ObjectAliasField, T as ObjectSchema, V as objectSchema, _ as LegacyResourceSchema, a as DerivedField, b as LinksModeHasManyField, c as HashField, d as LegacyAttributeField, f as LegacyBelongsToField, g as LegacyRelationshipField, h as LegacyModeFieldSchema, i as CollectionField, j as ResourceSchema, k as PolarisTrait, l as IdentityField, m as LegacyHasManyField, n as AttrOptions, o as FieldSchema, p as LegacyField, r as CacheableFieldSchema, s as GenericField, t as ArrayField, u as LegacyAliasField, v as LegacyTrait, w as ObjectFieldSchema, x as LocalField, y as LinksModeBelongsToField, z as isResourceSchema } from "../../fields-B-jO-dzB.js";
|
|
2
|
+
export { ArrayField, AttrOptions, CacheableFieldSchema, CollectionField, DerivedField, FieldSchema, GenericField, HashField, IdentityField, LegacyAliasField, LegacyAttributeField, LegacyBelongsToField, LegacyField, LegacyHasManyField, LegacyModeFieldSchema, LegacyRelationshipField, LegacyResourceSchema, LegacyTrait, LinksModeBelongsToField, LinksModeHasManyField, LocalField, ObjectAliasField, ObjectField, ObjectFieldSchema, ObjectSchema, PolarisAliasField, PolarisModeFieldSchema, PolarisResourceSchema, PolarisTrait, ResourceField, ResourceSchema, Schema, SchemaArrayField, SchemaObjectField, Trait, isLegacyResourceSchema, isManyKind, isRelationshipKind, isResourceSchema, isSingleKind, objectSchema, resourceSchema };
|
|
@@ -280,31 +280,64 @@
|
|
|
280
280
|
* Represents a field that is a reference to
|
|
281
281
|
* another resource.
|
|
282
282
|
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
* record as `data`, plus `links`, `meta` and a `fetch()`
|
|
288
|
-
* method, but it does not yet update when the
|
|
289
|
-
* relationship changes, and setting it is not supported.
|
|
283
|
+
* The value of a `resource` field on a ReactiveResource is a
|
|
284
|
+
* `ReactiveRelationshipDocument` whose `data` is the related
|
|
285
|
+
* resource (or `null`), and whose `links` and `meta` mirror the
|
|
286
|
+
* relationship payload received from the API.
|
|
290
287
|
*
|
|
291
|
-
*
|
|
292
|
-
*
|
|
288
|
+
* ```ts
|
|
289
|
+
* const user = store.peekRecord<User>('user', '1');
|
|
290
|
+
* user.bestFriend.data; // User | null | undefined
|
|
291
|
+
* user.bestFriend.links; // { related: '/users/1/best-friend' }
|
|
292
|
+
* ```
|
|
293
|
+
*
|
|
294
|
+
* The relationship payload for this field is expected to have the
|
|
295
|
+
* shape `{ data?: { type, id } | null, links?: Links, meta?: Meta }`.
|
|
296
|
+
* When `data` is omitted from the payload `doc.data` is `undefined`
|
|
297
|
+
* and `doc.fetch()` may be used to load the related resource via
|
|
298
|
+
* the `related` link.
|
|
299
|
+
*
|
|
300
|
+
* In LegacyMode the relationship is mutable via `doc.data = record`.
|
|
301
|
+
* In PolarisMode it is immutable unless the parent resource has been
|
|
302
|
+
* checked out for editing.
|
|
303
|
+
*
|
|
304
|
+
* @summary Field schema of kind `resource` for a reference to another resource, whose value is a
|
|
305
|
+
* `ReactiveRelationshipDocument`.
|
|
293
306
|
* @public
|
|
294
307
|
*/
|
|
295
308
|
/**
|
|
296
309
|
* Represents a field that is a reference to
|
|
297
|
-
* a collection of other resources
|
|
298
|
-
*
|
|
310
|
+
* a collection of other resources.
|
|
311
|
+
*
|
|
312
|
+
* The value of a `collection` field on a ReactiveResource is a
|
|
313
|
+
* `ReactiveRelationshipDocument` whose `data` is a reactive array
|
|
314
|
+
* of the related resources, and whose `links` and `meta` mirror the
|
|
315
|
+
* relationship payload received from the API.
|
|
316
|
+
*
|
|
317
|
+
* ```ts
|
|
318
|
+
* const user = store.peekRecord<User>('user', '1');
|
|
319
|
+
* user.friends.data; // User[] | undefined
|
|
320
|
+
* user.friends.links; // { related: '/users/1/friends' }
|
|
321
|
+
* ```
|
|
299
322
|
*
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
* and
|
|
304
|
-
*
|
|
323
|
+
* The relationship payload for this field is expected to have the
|
|
324
|
+
* shape `{ data?: { type, id }[], links?: Links, meta?: Meta }`.
|
|
325
|
+
* When `data` is omitted from the payload `doc.data` is `undefined`
|
|
326
|
+
* and `doc.fetch()` may be used to load the related resources via
|
|
327
|
+
* the `related` link.
|
|
305
328
|
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
329
|
+
* Collection relationships are not paginated: pagination links present
|
|
330
|
+
* on the relationship are surfaced on `doc.links` but are never merged
|
|
331
|
+
* into the relationship's membership. Large, sortable, filterable or
|
|
332
|
+
* paginated lists should be loaded with a top-level request instead.
|
|
333
|
+
*
|
|
334
|
+
* In LegacyMode the relationship is mutable via `doc.data.push(record)`
|
|
335
|
+
* (and the other array mutation methods) or `doc.data = [records]`.
|
|
336
|
+
* In PolarisMode it is immutable unless the parent resource has been
|
|
337
|
+
* checked out for editing.
|
|
338
|
+
*
|
|
339
|
+
* @summary Field schema of kind `collection` for a reference to other resources, whose value is a
|
|
340
|
+
* `ReactiveRelationshipDocument`.
|
|
308
341
|
* @public
|
|
309
342
|
*/
|
|
310
343
|
/**
|
|
@@ -400,8 +433,8 @@
|
|
|
400
433
|
* - {@link ArrayField}
|
|
401
434
|
* - {@link SchemaArrayField}
|
|
402
435
|
* - {@link DerivedField}
|
|
403
|
-
* - {@link ResourceField
|
|
404
|
-
* - {@link CollectionField
|
|
436
|
+
* - {@link ResourceField}
|
|
437
|
+
* - {@link CollectionField}
|
|
405
438
|
* - {@link LegacyAttributeField}
|
|
406
439
|
* - {@link LegacyBelongsToField}
|
|
407
440
|
* - {@link LegacyHasManyField}
|
|
@@ -423,8 +456,8 @@
|
|
|
423
456
|
* - {@link ArrayField}
|
|
424
457
|
* - {@link SchemaArrayField}
|
|
425
458
|
* - {@link DerivedField}
|
|
426
|
-
* - {@link ResourceField
|
|
427
|
-
* - {@link CollectionField
|
|
459
|
+
* - {@link ResourceField}
|
|
460
|
+
* - {@link CollectionField}
|
|
428
461
|
* - {@link LinksModeBelongsToField}
|
|
429
462
|
* - {@link LinksModeHasManyField}
|
|
430
463
|
*
|
|
@@ -591,6 +624,32 @@ function objectSchema(schema) {
|
|
|
591
624
|
* `@id`.
|
|
592
625
|
* @public
|
|
593
626
|
*/
|
|
627
|
+
/**
|
|
628
|
+
* Whether a field kind is a to-many relationship: the legacy `hasMany` or the
|
|
629
|
+
* `collection` kind.
|
|
630
|
+
*
|
|
631
|
+
* @public
|
|
632
|
+
*/
|
|
633
|
+
function isManyKind(kind) {
|
|
634
|
+
return kind === "hasMany" || kind === "collection";
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* Whether a field kind is a to-one relationship: the legacy `belongsTo` or the
|
|
638
|
+
* `resource` kind.
|
|
639
|
+
*
|
|
640
|
+
* @public
|
|
641
|
+
*/
|
|
642
|
+
function isSingleKind(kind) {
|
|
643
|
+
return kind === "belongsTo" || kind === "resource";
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Whether a field kind is any relationship kind, legacy or not.
|
|
647
|
+
*
|
|
648
|
+
* @public
|
|
649
|
+
*/
|
|
650
|
+
function isRelationshipKind(kind) {
|
|
651
|
+
return isManyKind(kind) || isSingleKind(kind);
|
|
652
|
+
}
|
|
594
653
|
function isResourceSchema(schema) {
|
|
595
654
|
return schema?.identity?.kind === "@id";
|
|
596
655
|
}
|
|
@@ -635,5 +694,5 @@ function isLegacyResourceSchema(schema) {
|
|
|
635
694
|
* @summary Union of the legacy belongsTo and hasMany field schemas, including their LinksMode variants.
|
|
636
695
|
* @public
|
|
637
696
|
*/
|
|
638
|
-
export { isLegacyResourceSchema, isResourceSchema, objectSchema, resourceSchema };
|
|
697
|
+
export { isLegacyResourceSchema, isManyKind, isRelationshipKind, isResourceSchema, isSingleKind, objectSchema, resourceSchema };
|
|
639
698
|
//# sourceMappingURL=fields.js.map
|