@canonical/dataviews-core 0.45.0 → 0.47.0
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/LICENSE +166 -0
- package/package.json +4 -3
- package/dist/esm/lib/collection/createCollectionCoordinator.js +0 -202
- package/dist/esm/lib/collection/createCollectionCoordinator.js.map +0 -1
- package/dist/esm/lib/collection/createSaveSession.js +0 -103
- package/dist/esm/lib/collection/createSaveSession.js.map +0 -1
- package/dist/esm/lib/createIdentity.js +0 -22
- package/dist/esm/lib/createIdentity.js.map +0 -1
- package/dist/esm/lib/field/createFieldInteraction.js +0 -80
- package/dist/esm/lib/field/createFieldInteraction.js.map +0 -1
- package/dist/esm/lib/field/index.js +0 -2
- package/dist/esm/lib/field/index.js.map +0 -1
- package/dist/esm/lib/geometry/columnTemplate.js +0 -38
- package/dist/esm/lib/geometry/columnTemplate.js.map +0 -1
- package/dist/esm/lib/geometry/createPresentation.js +0 -79
- package/dist/esm/lib/geometry/createPresentation.js.map +0 -1
- package/dist/esm/lib/geometry/sizingEquals.js +0 -10
- package/dist/esm/lib/geometry/sizingEquals.js.map +0 -1
- package/dist/esm/lib/identityBrand.js +0 -3
- package/dist/esm/lib/identityBrand.js.map +0 -1
- package/dist/esm/lib/isIdentity.js +0 -15
- package/dist/esm/lib/isIdentity.js.map +0 -1
- package/dist/esm/lib/location/createLocationBinding.js +0 -214
- package/dist/esm/lib/location/createLocationBinding.js.map +0 -1
- package/dist/esm/lib/operation/createOperation.js +0 -83
- package/dist/esm/lib/operation/createOperation.js.map +0 -1
- package/dist/esm/lib/operation/index.js +0 -2
- package/dist/esm/lib/operation/index.js.map +0 -1
- package/dist/esm/lib/query/canonicalSlice.js +0 -64
- package/dist/esm/lib/query/canonicalSlice.js.map +0 -1
- package/dist/esm/lib/query/defaultWindow.js +0 -11
- package/dist/esm/lib/query/defaultWindow.js.map +0 -1
- package/dist/esm/lib/query/sliceEquals.js +0 -30
- package/dist/esm/lib/query/sliceEquals.js.map +0 -1
- package/dist/esm/lib/source/createSourceBinding.js +0 -192
- package/dist/esm/lib/source/createSourceBinding.js.map +0 -1
- package/dist/esm/lib/source/reasonOf.js +0 -11
- package/dist/esm/lib/source/reasonOf.js.map +0 -1
- package/dist/esm/lib/source/supportsSlice.js +0 -68
- package/dist/esm/lib/source/supportsSlice.js.map +0 -1
- package/dist/esm/lib/views/createIndexedDBViewStore.js +0 -513
- package/dist/esm/lib/views/createIndexedDBViewStore.js.map +0 -1
- package/dist/esm/lib/views/createProviderViews.js +0 -573
- package/dist/esm/lib/views/createProviderViews.js.map +0 -1
- package/dist/esm/lib/wire/wireGrammar.js +0 -59
- package/dist/esm/lib/wire/wireGrammar.js.map +0 -1
- package/dist/types/lib/collection/createCollectionCoordinator.d.ts +0 -115
- package/dist/types/lib/collection/createCollectionCoordinator.d.ts.map +0 -1
- package/dist/types/lib/collection/createSaveSession.d.ts +0 -64
- package/dist/types/lib/collection/createSaveSession.d.ts.map +0 -1
- package/dist/types/lib/createIdentity.d.ts +0 -20
- package/dist/types/lib/createIdentity.d.ts.map +0 -1
- package/dist/types/lib/field/createFieldInteraction.d.ts +0 -77
- package/dist/types/lib/field/createFieldInteraction.d.ts.map +0 -1
- package/dist/types/lib/field/index.d.ts +0 -3
- package/dist/types/lib/field/index.d.ts.map +0 -1
- package/dist/types/lib/geometry/columnTemplate.d.ts +0 -21
- package/dist/types/lib/geometry/columnTemplate.d.ts.map +0 -1
- package/dist/types/lib/geometry/createPresentation.d.ts +0 -32
- package/dist/types/lib/geometry/createPresentation.d.ts.map +0 -1
- package/dist/types/lib/geometry/sizingEquals.d.ts +0 -4
- package/dist/types/lib/geometry/sizingEquals.d.ts.map +0 -1
- package/dist/types/lib/identityBrand.d.ts +0 -3
- package/dist/types/lib/identityBrand.d.ts.map +0 -1
- package/dist/types/lib/isIdentity.d.ts +0 -11
- package/dist/types/lib/isIdentity.d.ts.map +0 -1
- package/dist/types/lib/location/createLocationBinding.d.ts +0 -77
- package/dist/types/lib/location/createLocationBinding.d.ts.map +0 -1
- package/dist/types/lib/operation/createOperation.d.ts +0 -62
- package/dist/types/lib/operation/createOperation.d.ts.map +0 -1
- package/dist/types/lib/operation/index.d.ts +0 -3
- package/dist/types/lib/operation/index.d.ts.map +0 -1
- package/dist/types/lib/query/canonicalSlice.d.ts +0 -17
- package/dist/types/lib/query/canonicalSlice.d.ts.map +0 -1
- package/dist/types/lib/query/defaultWindow.d.ts +0 -9
- package/dist/types/lib/query/defaultWindow.d.ts.map +0 -1
- package/dist/types/lib/query/sliceEquals.d.ts +0 -7
- package/dist/types/lib/query/sliceEquals.d.ts.map +0 -1
- package/dist/types/lib/source/createSourceBinding.d.ts +0 -66
- package/dist/types/lib/source/createSourceBinding.d.ts.map +0 -1
- package/dist/types/lib/source/reasonOf.d.ts +0 -3
- package/dist/types/lib/source/reasonOf.d.ts.map +0 -1
- package/dist/types/lib/source/supportsSlice.d.ts +0 -9
- package/dist/types/lib/source/supportsSlice.d.ts.map +0 -1
- package/dist/types/lib/views/createIndexedDBViewStore.d.ts +0 -90
- package/dist/types/lib/views/createIndexedDBViewStore.d.ts.map +0 -1
- package/dist/types/lib/views/createProviderViews.d.ts +0 -53
- package/dist/types/lib/views/createProviderViews.d.ts.map +0 -1
- package/dist/types/lib/wire/wireGrammar.d.ts +0 -31
- package/dist/types/lib/wire/wireGrammar.d.ts.map +0 -1
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/** The declarative track of one column, used before any width is measured. */
|
|
2
|
-
const declaredTrack = (column) => {
|
|
3
|
-
const { sizing } = column;
|
|
4
|
-
if (sizing.kind === "fixed") {
|
|
5
|
-
return `${sizing.px}px`;
|
|
6
|
-
}
|
|
7
|
-
if (sizing.maxPx !== undefined) {
|
|
8
|
-
return `minmax(${sizing.minPx}px, ${sizing.maxPx}px)`;
|
|
9
|
-
}
|
|
10
|
-
return `minmax(${sizing.minPx}px, ${sizing.weight}fr)`;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Build the shared `grid-template-columns` track list for one table: the one
|
|
14
|
-
* geometry publication every row consumes, rather than a width written onto
|
|
15
|
-
* every cell.
|
|
16
|
-
*
|
|
17
|
-
* With nothing measured the tracks are declarative, so the baseline is
|
|
18
|
-
* aligned and readable before the solver can run and server output is
|
|
19
|
-
* deterministic. Once the container is measured the caller passes the
|
|
20
|
-
* solver's resolved vector — the one it already holds, so the solve is not
|
|
21
|
-
* repeated here — which is what capping and resizing need. A live preview
|
|
22
|
-
* replaces its own column's track in either mode; the authoritative
|
|
23
|
-
* presentation is untouched until the resize commits.
|
|
24
|
-
*/
|
|
25
|
-
export default function columnTemplate(columns, resolved, preview) {
|
|
26
|
-
if (columns.length === 0) {
|
|
27
|
-
return "none";
|
|
28
|
-
}
|
|
29
|
-
const trackOf = (id, track) => preview !== undefined && preview.id === id ? `${preview.width}px` : track;
|
|
30
|
-
return resolved === null
|
|
31
|
-
? columns
|
|
32
|
-
.map((column) => trackOf(column.id, declaredTrack(column)))
|
|
33
|
-
.join(" ")
|
|
34
|
-
: resolved
|
|
35
|
-
.map((column) => trackOf(column.id, `${column.width}px`))
|
|
36
|
-
.join(" ");
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=columnTemplate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"columnTemplate.js","sourceRoot":"","sources":["../../../../src/lib/geometry/columnTemplate.ts"],"names":[],"mappings":"AAQA,8EAA8E;AAC9E,MAAM,aAAa,GAAG,CAAC,MAAoB,EAAU,EAAE;IACrD,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC1B,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAC5B,OAAO,GAAG,MAAM,CAAC,EAAE,IAAI,CAAC;IAC1B,CAAC;IACD,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO,UAAU,MAAM,CAAC,KAAK,OAAO,MAAM,CAAC,KAAK,KAAK,CAAC;IACxD,CAAC;IACD,OAAO,UAAU,MAAM,CAAC,KAAK,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC;AACzD,CAAC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,OAAgC,EAChC,QAA0C,EAC1C,OAAuB;IAEvB,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,MAAM,OAAO,GAAG,CAAC,EAAU,EAAE,KAAa,EAAU,EAAE,CACpD,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IAC5E,OAAO,QAAQ,KAAK,IAAI;QACtB,CAAC,CAAC,OAAO;aACJ,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;aAC1D,IAAI,CAAC,GAAG,CAAC;QACd,CAAC,CAAC,QAAQ;aACL,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC;aACxD,IAAI,CAAC,GAAG,CAAC,CAAC;AACnB,CAAC"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import createChannel from "../observable/createChannel.js";
|
|
2
|
-
import sizingEquals from "./sizingEquals.js";
|
|
3
|
-
/**
|
|
4
|
-
* Create the presentation record for one collection's columns: declared
|
|
5
|
-
* sizing plus user-fixed overrides, with a channel published on change.
|
|
6
|
-
*/
|
|
7
|
-
export default function createPresentation(columns) {
|
|
8
|
-
const declared = {};
|
|
9
|
-
for (const column of columns) {
|
|
10
|
-
if (column.id === "") {
|
|
11
|
-
throw new Error("column id must not be empty");
|
|
12
|
-
}
|
|
13
|
-
if (Object.hasOwn(declared, column.id)) {
|
|
14
|
-
throw new Error(`duplicate column id "${column.id}"`);
|
|
15
|
-
}
|
|
16
|
-
declared[column.id] = column.sizing;
|
|
17
|
-
}
|
|
18
|
-
const initialDeclared = Object.freeze({ ...declared });
|
|
19
|
-
// Copied at construction: toColumns() must not answer from the
|
|
20
|
-
// caller's array, which it may still mutate.
|
|
21
|
-
const order = Object.freeze(columns.map((column) => column.id));
|
|
22
|
-
let overrides = Object.freeze({});
|
|
23
|
-
const channel = createChannel(Object.freeze({
|
|
24
|
-
declared: initialDeclared,
|
|
25
|
-
overrides,
|
|
26
|
-
revision: 0,
|
|
27
|
-
}));
|
|
28
|
-
const publish = (next) => {
|
|
29
|
-
overrides = next;
|
|
30
|
-
channel.set(Object.freeze({
|
|
31
|
-
declared: initialDeclared,
|
|
32
|
-
overrides,
|
|
33
|
-
revision: channel.get().revision + 1,
|
|
34
|
-
}));
|
|
35
|
-
};
|
|
36
|
-
return {
|
|
37
|
-
get state() {
|
|
38
|
-
return channel.get();
|
|
39
|
-
},
|
|
40
|
-
subscribe: (listener) => channel.subscribe(listener),
|
|
41
|
-
effective(id) {
|
|
42
|
-
if (!Object.hasOwn(initialDeclared, id)) {
|
|
43
|
-
throw new Error(`unknown column id "${id}"`);
|
|
44
|
-
}
|
|
45
|
-
return overrides[id] ?? initialDeclared[id];
|
|
46
|
-
},
|
|
47
|
-
setOverride(id, sizing) {
|
|
48
|
-
if (!Object.hasOwn(initialDeclared, id)) {
|
|
49
|
-
throw new Error(`unknown column id "${id}"`);
|
|
50
|
-
}
|
|
51
|
-
const current = overrides[id];
|
|
52
|
-
if (current !== undefined && sizingEquals(current, sizing)) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
publish(Object.freeze({ ...overrides, [id]: sizing }));
|
|
56
|
-
},
|
|
57
|
-
resetOverride(id) {
|
|
58
|
-
if (!Object.hasOwn(overrides, id)) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
const next = { ...overrides };
|
|
62
|
-
delete next[id];
|
|
63
|
-
publish(Object.freeze(next));
|
|
64
|
-
},
|
|
65
|
-
reset() {
|
|
66
|
-
if (Object.keys(overrides).length === 0) {
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
publish(Object.freeze({}));
|
|
70
|
-
},
|
|
71
|
-
toColumns() {
|
|
72
|
-
return order.map((id) => ({
|
|
73
|
-
id,
|
|
74
|
-
sizing: overrides[id] ?? initialDeclared[id],
|
|
75
|
-
}));
|
|
76
|
-
},
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=createPresentation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createPresentation.js","sourceRoot":"","sources":["../../../../src/lib/geometry/createPresentation.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,YAAY,MAAM,mBAAmB,CAAC;AA8B7C;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,OAAgC;IAEhC,MAAM,QAAQ,GAAiC,EAAE,CAAC;IAClD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,IAAI,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACjD,CAAC;QACD,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;YACvC,MAAM,IAAI,KAAK,CAAC,wBAAwB,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;QACxD,CAAC;QACD,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;IACtC,CAAC;IACD,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,QAAQ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BACxC,MAAM,IAAI,KAAK,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;YAC/C,CAAC;YACD,MAAM,OAAO,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;YAC9B,IAAI,OAAO,KAAK,SAAS,IAAI,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;gBAC3D,OAAO;YACT,CAAC;YACD,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QACzD,CAAC;QACD,aAAa,CAAC,EAAU;YACtB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,CAAC;gBAClC,OAAO;YACT,CAAC;YACD,MAAM,IAAI,GAAG,EAAE,GAAG,SAAS,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAC,EAAE,CAAC,CAAC;YAChB,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/B,CAAC;QACD,KAAK;YACH,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACxC,OAAO;YACT,CAAC;YACD,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QAC7B,CAAC;QACD,SAAS;YACP,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;gBACxB,EAAE;gBACF,MAAM,EAAE,SAAS,CAAC,EAAE,CAAC,IAAI,eAAe,CAAC,EAAE,CAAC;aAC7C,CAAC,CAAC,CAAC;QACN,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/** Structural equality of two column sizings. */
|
|
2
|
-
export default function sizingEquals(a, b) {
|
|
3
|
-
return a.kind === "fixed"
|
|
4
|
-
? b.kind === "fixed" && a.px === b.px
|
|
5
|
-
: b.kind === "flex" &&
|
|
6
|
-
a.weight === b.weight &&
|
|
7
|
-
a.minPx === b.minPx &&
|
|
8
|
-
a.maxPx === b.maxPx;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=sizingEquals.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sizingEquals.js","sourceRoot":"","sources":["../../../../src/lib/geometry/sizingEquals.ts"],"names":[],"mappings":"AAEA,iDAAiD;AACjD,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,CAAe,EACf,CAAe;IAEf,OAAO,CAAC,CAAC,IAAI,KAAK,OAAO;QACvB,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE;QACrC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM;YACf,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;YACrB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;YACnB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,CAAC;AAC5B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"identityBrand.js","sourceRoot":"","sources":["../../../src/lib/identityBrand.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { identityBrand } from "./identityBrand.js";
|
|
2
|
-
/**
|
|
3
|
-
* Check whether an unknown value is a DataViews identity token.
|
|
4
|
-
*
|
|
5
|
-
* Accepts tokens created by `createIdentity` and rejects structural copies
|
|
6
|
-
* and forged-key look-alikes: spread and Object.assign drop the
|
|
7
|
-
* non-enumerable brand, the own-property check rejects prototype copies,
|
|
8
|
-
* and forged symbols fail on symbol identity.
|
|
9
|
-
*/
|
|
10
|
-
export default function isIdentity(value) {
|
|
11
|
-
return (typeof value === "object" &&
|
|
12
|
-
value !== null &&
|
|
13
|
-
Object.hasOwn(value, identityBrand));
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=isIdentity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isIdentity.js","sourceRoot":"","sources":["../../../src/lib/isIdentity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAc;IAC/C,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,CACpC,CAAC;AACJ,CAAC"}
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
import createChannel from "../observable/createChannel.js";
|
|
2
|
-
import sliceEquals from "../query/sliceEquals.js";
|
|
3
|
-
import decodeQuery from "../wire/decodeQuery.js";
|
|
4
|
-
import encodeQuery from "../wire/encodeQuery.js";
|
|
5
|
-
import { isOwnedKey } from "../wire/wireGrammar.js";
|
|
6
|
-
const positionOf = (source) => ({
|
|
7
|
-
slice: source.slice,
|
|
8
|
-
window: source.window,
|
|
9
|
-
});
|
|
10
|
-
const samePosition = (a, b) => (a.slice === b.slice || sliceEquals(a.slice, b.slice)) &&
|
|
11
|
-
a.window.page === b.window.page &&
|
|
12
|
-
a.window.size === b.window.size;
|
|
13
|
-
const issuesEqual = (a, b) => a.length === b.length &&
|
|
14
|
-
a.every((issue, index) => issue.parameter === b[index].parameter &&
|
|
15
|
-
issue.reason === b[index].reason);
|
|
16
|
-
/**
|
|
17
|
-
* Bind a Location to a host's query authority.
|
|
18
|
-
*
|
|
19
|
-
* There is one authoritative query and it lives in the location: the host
|
|
20
|
-
* never mirrors it with an effect of its own. A write the binding makes
|
|
21
|
-
* decodes back to the state that produced it, so an echo adopts nothing and
|
|
22
|
-
* the loop terminates on the first pass in both directions.
|
|
23
|
-
*
|
|
24
|
-
* One binding owns one host: two bindings on the same host both write every
|
|
25
|
-
* transition.
|
|
26
|
-
*/
|
|
27
|
-
export default function createLocationBinding(config) {
|
|
28
|
-
const { host, location } = config;
|
|
29
|
-
const history = config.history ?? "replace";
|
|
30
|
-
const issues = createChannel([], {
|
|
31
|
-
equals: issuesEqual,
|
|
32
|
-
});
|
|
33
|
-
/**
|
|
34
|
-
* The position the location stands at, or null when it is owed a write.
|
|
35
|
-
* The host sitting there writes nothing: rows arriving, a refresh and an
|
|
36
|
-
* error all publish the same position, and a refused location keeps its
|
|
37
|
-
* parameters — so the error survives a reload instead of quietly
|
|
38
|
-
* becoming the broader query that was not asked for.
|
|
39
|
-
*/
|
|
40
|
-
let standing = null;
|
|
41
|
-
/**
|
|
42
|
-
* The parameters the binding last wrote or found already written. Their
|
|
43
|
-
* echo is read back but never re-canonicalized — which is also what ends
|
|
44
|
-
* the read-back of a write that had nothing to write.
|
|
45
|
-
*/
|
|
46
|
-
let written = null;
|
|
47
|
-
/** The read-back in progress, or null. */
|
|
48
|
-
let reading = null;
|
|
49
|
-
/**
|
|
50
|
-
* Write the host's position. `then` says what follows a write with
|
|
51
|
-
* nothing to write: `"read-back"` reads the location back as its echo
|
|
52
|
-
* would; `"skip"` does not, because the caller has just decoded the
|
|
53
|
-
* location.
|
|
54
|
-
*/
|
|
55
|
-
function writeToLocation(mode, then) {
|
|
56
|
-
if (reading !== null) {
|
|
57
|
-
// A publication the read-back provokes — landing where the location
|
|
58
|
-
// stands or where the read-back began — writes nothing: the read-back
|
|
59
|
-
// has the last word, and a host that publishes on adopt without
|
|
60
|
-
// moving would otherwise bring it straight back here. Anything else
|
|
61
|
-
// is owed one write once it is done, in the mode of the last reason
|
|
62
|
-
// for it: a canonicalization replaces, a later genuine move pushes.
|
|
63
|
-
// Termination holds per synchronous
|
|
64
|
-
// dispatch; a listener that re-applies a refused clause lands where
|
|
65
|
-
// the read-back began and is taken as its own.
|
|
66
|
-
const moved = host.result.get();
|
|
67
|
-
const provoked = standing !== null &&
|
|
68
|
-
(samePosition(standing, moved) || samePosition(reading.from, moved));
|
|
69
|
-
if (!provoked) {
|
|
70
|
-
reading.owed = mode;
|
|
71
|
-
}
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
const state = host.result.get();
|
|
75
|
-
if (standing !== null && samePosition(standing, state)) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
const preserve = location.read();
|
|
79
|
-
const next = encodeQuery({
|
|
80
|
-
schema: host.schema,
|
|
81
|
-
slice: state.slice,
|
|
82
|
-
window: state.window,
|
|
83
|
-
preserve,
|
|
84
|
-
});
|
|
85
|
-
const spelled = next.toString();
|
|
86
|
-
// Recorded before the write: a location notifying synchronously
|
|
87
|
-
// re-enters adoptFromLocation from inside it, and what that adoption
|
|
88
|
-
// records — a refusal included — must have the last word.
|
|
89
|
-
const at = positionOf(state);
|
|
90
|
-
standing = at;
|
|
91
|
-
issues.set([]);
|
|
92
|
-
written = spelled;
|
|
93
|
-
if (spelled === preserve.toString()) {
|
|
94
|
-
// Nothing to write, so nothing echoes: read the location back as the
|
|
95
|
-
// echo would, so a clause the source cannot execute is still refused.
|
|
96
|
-
if (then === "read-back") {
|
|
97
|
-
const current = { from: at, owed: null };
|
|
98
|
-
reading = current;
|
|
99
|
-
try {
|
|
100
|
-
adoptFromLocation(preserve);
|
|
101
|
-
}
|
|
102
|
-
finally {
|
|
103
|
-
reading = null;
|
|
104
|
-
}
|
|
105
|
-
if (current.owed !== null) {
|
|
106
|
-
// Owed, so written wherever the location stands.
|
|
107
|
-
standing = null;
|
|
108
|
-
writeToLocation(current.owed, "read-back");
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
try {
|
|
114
|
-
location.write(next, { history: mode });
|
|
115
|
-
}
|
|
116
|
-
catch (error) {
|
|
117
|
-
if (location.read().toString() === spelled) {
|
|
118
|
-
// Written, but a listener threw — perhaps before this binding's own
|
|
119
|
-
// listener heard it. Read it back so its refusal is not lost; an
|
|
120
|
-
// error from that read-back replaces the listener's.
|
|
121
|
-
adoptFromLocation();
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
// Unwritten, so the next publication tries again.
|
|
125
|
-
standing = null;
|
|
126
|
-
}
|
|
127
|
-
throw error;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
function adoptFromLocation(params = location.read()) {
|
|
131
|
-
const decoded = decodeQuery({
|
|
132
|
-
schema: host.schema,
|
|
133
|
-
params,
|
|
134
|
-
capabilities: host.capabilities,
|
|
135
|
-
});
|
|
136
|
-
issues.set(decoded.issues);
|
|
137
|
-
// Recorded before adopting: the adoption publishes, and that
|
|
138
|
-
// publication re-enters writeToLocation, which must find the location
|
|
139
|
-
// already standing here.
|
|
140
|
-
standing = positionOf(decoded);
|
|
141
|
-
if (samePosition(host.result.get(), decoded)) {
|
|
142
|
-
// The echo of the binding's own write, or a change that reads the
|
|
143
|
-
// same: adopting would discard live input sessions for nothing. The
|
|
144
|
-
// host's own slice is kept, so later comparisons short-circuit on
|
|
145
|
-
// reference.
|
|
146
|
-
standing = positionOf(host.result.get());
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
host.adopt(decoded.slice, decoded.window);
|
|
150
|
-
}
|
|
151
|
-
if (decoded.issues.length === 0 && params.toString() !== written) {
|
|
152
|
-
// A clean location is canonicalized in place — unless it is the
|
|
153
|
-
// binding's own write coming back. A respelling is not a step the
|
|
154
|
-
// user took, so it replaces rather than pushes, and it was decoded
|
|
155
|
-
// just now, so the write reads nothing back.
|
|
156
|
-
if (reading !== null) {
|
|
157
|
-
// Inside a read-back the canonicalization is owed, not written: the
|
|
158
|
-
// read-back writes it once done, and a publication landing here
|
|
159
|
-
// meanwhile is its own.
|
|
160
|
-
reading.owed = "replace";
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
standing = null;
|
|
164
|
-
writeToLocation("replace", "skip");
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
return {
|
|
168
|
-
issues,
|
|
169
|
-
observe() {
|
|
170
|
-
let live = true;
|
|
171
|
-
const onHostChange = () => {
|
|
172
|
-
if (host.result.get().disposed) {
|
|
173
|
-
release();
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
writeToLocation(history, "read-back");
|
|
177
|
-
};
|
|
178
|
-
// Its own closure, never the shared function: a Location holds its
|
|
179
|
-
// listeners in a set, so two observations subscribing one reference
|
|
180
|
-
// register once and the first release deafens the second.
|
|
181
|
-
const stopLocation = location.subscribe(() => {
|
|
182
|
-
adoptFromLocation();
|
|
183
|
-
});
|
|
184
|
-
const stopHost = host.result.subscribe(onHostChange);
|
|
185
|
-
function release() {
|
|
186
|
-
if (!live) {
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
189
|
-
live = false;
|
|
190
|
-
stopLocation();
|
|
191
|
-
stopHost();
|
|
192
|
-
}
|
|
193
|
-
if (host.result.get().disposed) {
|
|
194
|
-
release();
|
|
195
|
-
return release;
|
|
196
|
-
}
|
|
197
|
-
// The location may have moved while nothing was observing it, so a
|
|
198
|
-
// fresh observation owes it a write.
|
|
199
|
-
standing = null;
|
|
200
|
-
written = null;
|
|
201
|
-
const carriesQuery = [...location.read().keys()].some((key) => isOwnedKey(key, host.schema.hasField));
|
|
202
|
-
if (carriesQuery) {
|
|
203
|
-
adoptFromLocation();
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
// A location carrying no query takes the host's seed rather than
|
|
207
|
-
// erasing it.
|
|
208
|
-
writeToLocation("replace", "read-back");
|
|
209
|
-
}
|
|
210
|
-
return release;
|
|
211
|
-
},
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
//# sourceMappingURL=createLocationBinding.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createLocationBinding.js","sourceRoot":"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,SAAS,EAAE,WAAW,CAAC,CAAC;YAC1C,CAAC;YACD,OAAO,OAAO,CAAC;QACjB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import createIdentity, {} from "../createIdentity.js";
|
|
2
|
-
/**
|
|
3
|
-
* Create one operation invocation: targets, payload and the selection
|
|
4
|
-
* revision are captured at construction, so later selection changes can
|
|
5
|
-
* never retarget execution. At least one target is required. Payload is
|
|
6
|
-
* captured by reference; callers must not mutate it after construction.
|
|
7
|
-
*/
|
|
8
|
-
export default function createOperation(config) {
|
|
9
|
-
if (config.targets.length === 0) {
|
|
10
|
-
throw new Error("operation requires at least one captured target");
|
|
11
|
-
}
|
|
12
|
-
const identity = createIdentity();
|
|
13
|
-
const targets = Object.freeze([...new Set(config.targets)]);
|
|
14
|
-
let succeeded = [];
|
|
15
|
-
let failed = [];
|
|
16
|
-
let remaining = [...targets];
|
|
17
|
-
let status = "pending";
|
|
18
|
-
let attempts = 1;
|
|
19
|
-
let snapshot = buildSnapshot();
|
|
20
|
-
function settle() {
|
|
21
|
-
if (remaining.length === 0) {
|
|
22
|
-
status = failed.length > 0 ? "failure" : "success";
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
status = "partial";
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function buildSnapshot() {
|
|
29
|
-
return Object.freeze({
|
|
30
|
-
targets,
|
|
31
|
-
payload: config.payload,
|
|
32
|
-
selectionRevision: config.selectionRevision,
|
|
33
|
-
status,
|
|
34
|
-
succeeded: Object.freeze([...succeeded]),
|
|
35
|
-
failed: Object.freeze([...failed]),
|
|
36
|
-
remaining: Object.freeze([...remaining]),
|
|
37
|
-
attempts,
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
identity,
|
|
42
|
-
get state() {
|
|
43
|
-
return snapshot;
|
|
44
|
-
},
|
|
45
|
-
recordOutcome(outcomes) {
|
|
46
|
-
const open = new Set(remaining);
|
|
47
|
-
let settled = false;
|
|
48
|
-
for (const entry of outcomes) {
|
|
49
|
-
if (!open.has(entry.target)) {
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
settled = true;
|
|
53
|
-
// A target settles at most once per attempt: it leaves `open`, so a
|
|
54
|
-
// later outcome for it cannot arrive through this path.
|
|
55
|
-
open.delete(entry.target);
|
|
56
|
-
if (entry.status === "success") {
|
|
57
|
-
succeeded.push(entry.target);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
failed.push({ target: entry.target, reason: entry.reason });
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
if (!settled) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
remaining = [...open];
|
|
67
|
-
settle();
|
|
68
|
-
snapshot = buildSnapshot();
|
|
69
|
-
},
|
|
70
|
-
retry() {
|
|
71
|
-
if (status !== "failure") {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
remaining = failed.map((failure) => failure.target);
|
|
75
|
-
succeeded = [];
|
|
76
|
-
failed = [];
|
|
77
|
-
attempts += 1;
|
|
78
|
-
status = "pending";
|
|
79
|
-
snapshot = buildSnapshot();
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
//# sourceMappingURL=createOperation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createOperation.js","sourceRoot":"","sources":["../../../../src/lib/operation/createOperation.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,EAAE,EAAiB,MAAM,sBAAsB,CAAC;AA2DrE;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,MAAuB;IAC7D,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACrE,CAAC;IACD,MAAM,QAAQ,GAAG,cAAc,EAAE,CAAC;IACl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,OAAO,IAAI,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/** Stable address of a predicate: its field and operator pair. */
|
|
2
|
-
export const predicateAddress = (field, operator) => `${field}\u0000${operator}`;
|
|
3
|
-
/**
|
|
4
|
-
* Total order over operand values: type tag first, then value within type.
|
|
5
|
-
* Plain code-point comparison, not locale collation, so canonical order is
|
|
6
|
-
* environment-stable and never ties on distinct strings.
|
|
7
|
-
*/
|
|
8
|
-
export const operandRankOf = (operand) => `${typeof operand}:${String(operand)}`;
|
|
9
|
-
/** Canonicalize one predicate: equality operands become an ordered set. */
|
|
10
|
-
const canonicalPredicate = (predicate) => {
|
|
11
|
-
if (predicate.operator !== "eq") {
|
|
12
|
-
return {
|
|
13
|
-
field: predicate.field,
|
|
14
|
-
operator: predicate.operator,
|
|
15
|
-
operands: [...predicate.operands],
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
const sorted = [...predicate.operands].sort((a, b) => {
|
|
19
|
-
const left = operandRankOf(a);
|
|
20
|
-
const right = operandRankOf(b);
|
|
21
|
-
return left < right ? -1 : left > right ? 1 : 0;
|
|
22
|
-
});
|
|
23
|
-
const operands = [];
|
|
24
|
-
for (const operand of sorted) {
|
|
25
|
-
const last = operands.at(-1);
|
|
26
|
-
if (last === undefined || operandRankOf(last) !== operandRankOf(operand)) {
|
|
27
|
-
operands.push(operand);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
// Rebuild in a fixed key order so fingerprints are invariant under
|
|
31
|
-
// key-order respelling of the input.
|
|
32
|
-
return { field: predicate.field, operator: predicate.operator, operands };
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Order predicates by address. Addresses are unique after collapse, so this
|
|
36
|
-
* strict comparison is a total order and never returns 0.
|
|
37
|
-
*/
|
|
38
|
-
const compareByAddress = (a, b) => predicateAddress(a.field, a.operator) > predicateAddress(b.field, b.operator)
|
|
39
|
-
? 1
|
|
40
|
-
: -1;
|
|
41
|
-
/**
|
|
42
|
-
* Normalize a slice to its canonical form: equality operands are sets,
|
|
43
|
-
* predicates are ordered by address, sort terms keep their order, and an
|
|
44
|
-
* empty search is no search. Idempotent: `canonicalSlice(canonicalSlice(x))`
|
|
45
|
-
* equals `canonicalSlice(x)`.
|
|
46
|
-
*/
|
|
47
|
-
export default function canonicalSlice(slice) {
|
|
48
|
-
const byAddress = new Map();
|
|
49
|
-
for (const predicate of slice.filter) {
|
|
50
|
-
byAddress.set(predicateAddress(predicate.field, predicate.operator), predicate);
|
|
51
|
-
}
|
|
52
|
-
return {
|
|
53
|
-
filter: [...byAddress.values()]
|
|
54
|
-
.map(canonicalPredicate)
|
|
55
|
-
.sort(compareByAddress),
|
|
56
|
-
search: slice.search === "" ? null : slice.search,
|
|
57
|
-
sort: slice.sort.map((term) => ({
|
|
58
|
-
field: term.field,
|
|
59
|
-
direction: term.direction,
|
|
60
|
-
})),
|
|
61
|
-
group: slice.group,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=canonicalSlice.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"canonicalSlice.js","sourceRoot":"","sources":["../../../../src/lib/query/canonicalSlice.ts"],"names":[],"mappings":"AAOA,kEAAkE;AAClE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,KAAa,EACb,QAA2B,EACnB,EAAE,CAAC,GAAG,KAAK,SAAS,QAAQ,EAAE,CAAC;AAEzC;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAyB,EAAU,EAAE,CACjE,GAAG,OAAO,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;AAEzC,2EAA2E;AAC3E,MAAM,kBAAkB,GAAG,CAAC,SAAoB,EAAa,EAAE;IAC7D,IAAI,SAAS,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;QAChC,OAAO;YACL,KAAK,EAAE,SAAS,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AQ,CAAC;IAC3E,CAAC,CAAC,CAAC;IACH,CAAC,CAAC,CAAC,CAAC,CAAC;AAET;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAY;IACjD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAqB,CAAC;IAC/C,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QACrC,SAAS,CAAC,GAAG,CACX,gBAAgB,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,QAAQ,CAAC,EACrD,SAAS,CACV,CAAC;IACJ,CAAC;IACD,OAAO;QACL,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;aAC5B,GAAG,CAAC,kBAAkB,CAAC;aACvB,IAAI,CAAC,gBAAgB,CAAC;QACzB,MAAM,EAAE,KAAK,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM;QACjD,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC9B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAC;QACH,KAAK,EAAE,KAAK,CAAC,KAAK;KACnB,CAAC;AACJ,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The window a collection starts on when nothing else says otherwise: the
|
|
3
|
-
* first page of fifty. One owner, so the coordinator's seed and a parameter
|
|
4
|
-
* set carrying no window cannot drift apart.
|
|
5
|
-
*/
|
|
6
|
-
const DEFAULT_RESULT_WINDOW = Object.freeze({
|
|
7
|
-
page: 1,
|
|
8
|
-
size: 50,
|
|
9
|
-
});
|
|
10
|
-
export default DEFAULT_RESULT_WINDOW;
|
|
11
|
-
//# sourceMappingURL=defaultWindow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaultWindow.js","sourceRoot":"","sources":["../../../../src/lib/query/defaultWindow.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,qBAAqB,GAAiB,MAAM,CAAC,MAAM,CAAC;IACxD,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,EAAE;CACT,CAAC,CAAC;AAEH,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import canonicalSlice, { operandRankOf } from "./canonicalSlice.js";
|
|
2
|
-
/**
|
|
3
|
-
* Operands are equal when their rank strings match, keeping slice equality
|
|
4
|
-
* exactly consistent with request fingerprints (NaN equals NaN; the string
|
|
5
|
-
* "0" never equals the number 0).
|
|
6
|
-
*/
|
|
7
|
-
const operandEquals = (a, b) => operandRankOf(a) === operandRankOf(b);
|
|
8
|
-
const predicatesEqual = (a, b) => a.length === b.length &&
|
|
9
|
-
a.every((predicate, index) => {
|
|
10
|
-
const other = b[index];
|
|
11
|
-
return (predicate.field === other.field &&
|
|
12
|
-
predicate.operator === other.operator &&
|
|
13
|
-
predicate.operands.length === other.operands.length &&
|
|
14
|
-
predicate.operands.every((operand, operandIndex) => operandEquals(operand, other.operands[operandIndex])));
|
|
15
|
-
});
|
|
16
|
-
const sortsEqual = (a, b) => a.length === b.length &&
|
|
17
|
-
a.every((term, index) => term.field === b[index].field && term.direction === b[index].direction);
|
|
18
|
-
/**
|
|
19
|
-
* Semantic slice equality: two slices are equal when their canonical forms
|
|
20
|
-
* match. Equality operand order does not matter; sort order always does.
|
|
21
|
-
*/
|
|
22
|
-
export default function sliceEquals(a, b) {
|
|
23
|
-
const left = canonicalSlice(a);
|
|
24
|
-
const right = canonicalSlice(b);
|
|
25
|
-
return (left.search === right.search &&
|
|
26
|
-
left.group === right.group &&
|
|
27
|
-
predicatesEqual(left.filter, right.filter) &&
|
|
28
|
-
sortsEqual(left.sort, right.sort));
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=sliceE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