rest-client-vue 1.1.1-b2 → 1.1.1-b4

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/index.d.ts CHANGED
@@ -139,6 +139,8 @@ export declare interface RestCollection<T extends Resource = Resource> {
139
139
  invalidResources: Ref<T[]>;
140
140
  /** The array of resources that have been loaded from the REST API into the local collection. */
141
141
  resources: Ref<T[]>;
142
+ /** The total number of resources available in the remote collection. */
143
+ remoteCollectionSize: Ref<number | null>;
142
144
  /** Transient data that a client has associated with the resources via {@link setTransientDataForResources}. */
143
145
  transientData: Ref<any[]>;
144
146
  /** Resources in the current detail view, a sublist of {@link resources}. */
@@ -11,8 +11,8 @@ var Q = (f, s, R) => (Te(f, s, "read from private field"), R ? R.call(f) : s.get
11
11
  };
12
12
  import a from "lodash";
13
13
  import { v4 as X } from "uuid";
14
- import { ref as I, toRef as te, computed as S, watch as C, nextTick as Le } from "vue";
15
- import N from "axios";
14
+ import { ref as I, toRef as te, computed as S, watch as T, nextTick as Le } from "vue";
15
+ import P from "axios";
16
16
  import me from "jsog";
17
17
  import V from "json-stringify-deterministic";
18
18
  import { defineStore as ye } from "pinia";
@@ -28,26 +28,26 @@ class ke extends Error {
28
28
  this.context = $, this.innerError = e;
29
29
  }
30
30
  }
31
- var O;
31
+ var _;
32
32
  class Ie {
33
33
  constructor() {
34
- Se(this, O, {});
34
+ Se(this, _, {});
35
35
  }
36
36
  clearAllStores() {
37
- for (const s in Q(this, O))
38
- Q(this, O)[s].clear();
37
+ for (const s in Q(this, _))
38
+ Q(this, _)[s].clear();
39
39
  }
40
40
  destroyStore(s) {
41
- Q(this, O)[s] && (Q(this, O)[s].$dispose(), delete Q(this, O)[s]);
41
+ Q(this, _)[s] && (Q(this, _)[s].$dispose(), delete Q(this, _)[s]);
42
42
  }
43
43
  getStore(s) {
44
- return Q(this, O)[s];
44
+ return Q(this, _)[s];
45
45
  }
46
46
  registerStore(s, R) {
47
- Q(this, O)[s] = R;
47
+ Q(this, _)[s] = R;
48
48
  }
49
49
  }
50
- O = new WeakMap();
50
+ _ = new WeakMap();
51
51
  function v(f, s) {
52
52
  return a.get(f, (s == null ? void 0 : s.idProperty) || "_id");
53
53
  }
@@ -83,7 +83,7 @@ const De = {
83
83
  ]
84
84
  }, Y = {
85
85
  resources: [],
86
- totalNumResources: null,
86
+ remoteCollectionSize: null,
87
87
  status: "NotLoaded",
88
88
  selection: [],
89
89
  detailSelection: [],
@@ -94,7 +94,7 @@ const De = {
94
94
  batchSaveAttempted: !1,
95
95
  editors: [],
96
96
  listNavigators: {}
97
- }, Ne = (f, s) => {
97
+ }, Pe = (f, s) => {
98
98
  s = a.merge({}, De, s);
99
99
  const R = ye(f, {
100
100
  state: () => ({
@@ -176,7 +176,7 @@ const De = {
176
176
  * @param filter The new filter.
177
177
  */
178
178
  setFilter(e) {
179
- a.isEqual(e, this.filter) || (this.filter = e, this.status = "NotLoaded", this.resources = [], this.totalNumResources = null, this.selection = [], this.detailSelection = [], this.invalidResources = [], this.editingDetailSelection = !1);
179
+ a.isEqual(e, this.filter) || (this.filter = e, this.status = "NotLoaded", this.resources = [], this.remoteCollectionSize = null, this.selection = [], this.detailSelection = [], this.invalidResources = [], this.editingDetailSelection = !1);
180
180
  },
181
181
  /**
182
182
  * Set the filter query.
@@ -288,32 +288,32 @@ const De = {
288
288
  * @param loadOptions Pagination options that may override the defaults.
289
289
  */
290
290
  async _loadResources(e, r, t) {
291
- var b, x, A, z, B;
291
+ var b, q, z, O, B;
292
292
  const l = e == 0;
293
293
  if (this.status = l ? "Loading" : "LoadingMore", this._loadOffset = e, ((b = this.filter) == null ? void 0 : b.query) === !1) {
294
- this.resources = [], this.totalNumResources = 0;
294
+ this.resources = [], this.remoteCollectionSize = 0;
295
295
  return;
296
296
  }
297
- const u = this.fixedQueryParams, c = a.cloneDeep(u), d = l ? (x = this.filter) != null && x.resourceIds && !this.order ? null : t.firstPageSize || ((A = s.loading) == null ? void 0 : A.firstPageSize) || t.pageSize || ((z = s.loading) == null ? void 0 : z.pageSize) || null : t.pageSize || ((B = s.loading) == null ? void 0 : B.pageSize) || null, y = d != null || s.limit != null ? a.min(a.filter([d, s.limit], (g) => g != null)) : void 0;
297
+ const u = this.fixedQueryParams, c = a.cloneDeep(u), d = l ? (q = this.filter) != null && q.resourceIds && !this.order ? null : t.firstPageSize || ((z = s.loading) == null ? void 0 : z.firstPageSize) || t.pageSize || ((O = s.loading) == null ? void 0 : O.pageSize) || null : t.pageSize || ((B = s.loading) == null ? void 0 : B.pageSize) || null, y = d != null || s.limit != null ? a.min(a.filter([d, s.limit], (g) => g != null)) : void 0;
298
298
  y != null ? (c.offset = e, c.limit = y) : e != 0 && (c.offset = e);
299
- const E = a.map(
299
+ const U = a.map(
300
300
  c,
301
301
  (g, m) => g != null ? `${encodeURIComponent(m)}=${encodeURIComponent(g)}` : null
302
- ).filter((g) => g != null).join("&"), T = a.isEmpty(E) ? s.restCollectionUrl : `${s.restCollectionUrl}?${E}`;
302
+ ).filter((g) => g != null).join("&"), L = a.isEmpty(U) ? s.restCollectionUrl : `${s.restCollectionUrl}?${U}`;
303
303
  try {
304
- const g = await N.get(T), m = this.fixedQueryParams;
304
+ const g = await P.get(L), m = this.fixedQueryParams;
305
305
  if (r != this._loadId || e != this._loadOffset || !a.isEqual(u, m))
306
306
  console.log(`Discarding resources fetched by obsolete query from ${s.restCollectionUrl}.`);
307
307
  else {
308
- const U = me.decode(a.get(g, "data.data", [])), L = (l ? 0 : this.resources.length) + U.length, D = y == null || U.length < y || s.limit && L >= s.limit;
308
+ const E = me.decode(a.get(g, "data.data", [])), C = (l ? 0 : this.resources.length) + E.length, D = y == null || E.length < y || s.limit && C >= s.limit;
309
309
  console.log(
310
- `Loaded ${U.length}${l ? "" : " more"} resources from ${s.restCollectionUrl}`
310
+ `Loaded ${E.length}${l ? "" : " more"} resources from ${s.restCollectionUrl}`
311
311
  ), l && (this.resources = []);
312
- const W = [...this.resources, ...U.map((H) => Object.freeze(H))];
313
- this.resources = $e(W, this), a.get(g, "data.totalNumEntities") ? this.totalNumResources = a.get(g, "data.totalNumEntities") : this.totalNumResources = null, this.status = D ? "Loaded" : "LoadingMore", D || this._loadResources(this.resources.length, r, t);
312
+ const W = [...this.resources, ...E.map((H) => Object.freeze(H))];
313
+ this.resources = $e(W, this), a.get(g, "data.totalCollectionSize") ? this.remoteCollectionSize = a.get(g, "data.totalCollectionSize") : this.remoteCollectionSize = null, this.status = D ? "Loaded" : "LoadingMore", D || this._loadResources(this.resources.length, r, t);
314
314
  }
315
315
  } catch (g) {
316
- console.log(`Error while loading resources (URL="${T}"):`, g), this.clearRetainingTransientData(), this.status = "Failed";
316
+ console.log(`Error while loading resources (URL="${L}"):`, g), this.clearRetainingTransientData(), this.status = "Failed";
317
317
  }
318
318
  },
319
319
  // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -331,9 +331,9 @@ const De = {
331
331
  async checkForDeletedResource(e) {
332
332
  let r;
333
333
  try {
334
- r = await N.get(`${s.restCollectionUrl}/${e}`);
334
+ r = await P.get(`${s.restCollectionUrl}/${e}`);
335
335
  } catch (t) {
336
- N.isAxiosError(t) && (r = t.response);
336
+ P.isAxiosError(t) && (r = t.response);
337
337
  }
338
338
  return r && r.status == 404 ? (this.recordDeletion(e), !0) : !1;
339
339
  },
@@ -418,7 +418,7 @@ const De = {
418
418
  const t = a.map(
419
419
  r,
420
420
  (c, d) => c != null ? `${encodeURIComponent(d)}=${encodeURIComponent(c)}` : null
421
- ).filter((c) => c != null).join("&"), l = a.isEmpty(t) ? `${s.restCollectionUrl}/${e}` : `${s.restCollectionUrl}/${e}?${t}`, u = await N.get(l);
421
+ ).filter((c) => c != null).join("&"), l = a.isEmpty(t) ? `${s.restCollectionUrl}/${e}` : `${s.restCollectionUrl}/${e}?${t}`, u = await P.get(l);
422
422
  if (u.status == 200) {
423
423
  const c = u.data;
424
424
  return this.recordUpdate(c), c;
@@ -445,7 +445,7 @@ const De = {
445
445
  * @param resourceId The ID of the resource to delete.
446
446
  */
447
447
  async deleteResource(e) {
448
- if ((await N.delete(`${s.restCollectionUrl}/${e}`)).status == 200 && ["Loaded", "LoadingMore"].includes(this.status)) {
448
+ if ((await P.delete(`${s.restCollectionUrl}/${e}`)).status == 200 && ["Loaded", "LoadingMore"].includes(this.status)) {
449
449
  let t = this.resources.findIndex((l) => v(l, this) == e);
450
450
  t >= 0 && this.resources.splice(t, 1), t = this.selection.findIndex((l) => v(l, this) == e), t >= 0 && this.selection.splice(t, 1), t = this.detailSelection.findIndex((l) => v(l, this) == e), t >= 0 && (this.detailSelection.splice(t, 1), this.detailSelection.length == 0 && (this.editingDetailSelection = s.detail.autoEdit)), s.limitTransientDataToLocalCollection && delete this.transientData[e];
451
451
  }
@@ -462,7 +462,7 @@ const De = {
462
462
  * the operation failed.
463
463
  */
464
464
  async saveResource(e) {
465
- const r = v(e, this), t = r == null, l = await N({
465
+ const r = v(e, this), t = r == null, l = await P({
466
466
  method: t ? "post" : "put",
467
467
  url: t ? s.restCollectionUrl : `${s.restCollectionUrl}/${r}`,
468
468
  data: e
@@ -484,7 +484,7 @@ const De = {
484
484
  * @returns An array of refreshed local resources, one for each remote resource whose save operation succeeded.
485
485
  */
486
486
  async saveResources(e) {
487
- const r = await N({
487
+ const r = await P({
488
488
  method: "put",
489
489
  url: s.restCollectionUrl,
490
490
  data: e
@@ -492,8 +492,8 @@ const De = {
492
492
  if (r.status == 200) {
493
493
  const t = r.data || [], l = [];
494
494
  for (const [u, c] of t.entries()) {
495
- const d = v(e[u], this) == null, y = v(c, this), E = y ? await this.refreshResource(y) : null;
496
- d && this.recordInsertion(E || c), l.push(E || Object.freeze(c));
495
+ const d = v(e[u], this) == null, y = v(c, this), U = y ? await this.refreshResource(y) : null;
496
+ d && this.recordInsertion(U || c), l.push(U || Object.freeze(c));
497
497
  }
498
498
  return l;
499
499
  }
@@ -689,18 +689,18 @@ const De = {
689
689
  enabled: $,
690
690
  resourceType: e,
691
691
  options: r
692
- } = f, t = I(void 0), l = I(s), u = I(R), c = I($ ?? !0), d = I([te(e)]), y = I(r), E = S(() => u.value), T = I(c.value), b = I(X()), x = I((ce = (oe = y.value) == null ? void 0 : oe.filter) == null ? void 0 : ce.resourceIds), A = I((de = (ue = y.value) == null ? void 0 : ue.filter) == null ? void 0 : de.query), z = S(
692
+ } = f, t = I(void 0), l = I(s), u = I(R), c = I($ ?? !0), d = I([te(e)]), y = I(r), U = S(() => u.value), L = I(c.value), b = I(X()), q = I((ce = (oe = y.value) == null ? void 0 : oe.filter) == null ? void 0 : ce.resourceIds), z = I((de = (ue = y.value) == null ? void 0 : ue.filter) == null ? void 0 : de.query), O = S(
693
693
  () => u.value == null && l.value != null && ie.getStore(l.value) != null
694
- ), B = I(z.value), g = S(() => L("status", "Uninitialized"));
694
+ ), B = I(O.value), g = S(() => C("status", "Uninitialized"));
695
695
  function m(i) {
696
696
  if (t.value)
697
697
  return i(t.value);
698
698
  }
699
- async function U(i) {
699
+ async function E(i) {
700
700
  if (t.value)
701
701
  return await i(t.value);
702
702
  }
703
- function L(i, o) {
703
+ function C(i, o) {
704
704
  if (t.value)
705
705
  return t.value[i];
706
706
  if (o !== void 0)
@@ -712,49 +712,49 @@ const De = {
712
712
  const {
713
713
  collectionId: o,
714
714
  draftBatchId: w,
715
- enabled: _,
715
+ enabled: A,
716
716
  resourceType: se,
717
717
  options: he
718
718
  } = i;
719
- l.value = o, u.value = w, c.value = _ ?? !0, d.value = [te(se)], he != null && (y.value = he, x.value = (ve = (fe = y.value) == null ? void 0 : fe.filter) == null ? void 0 : ve.resourceIds, A.value = (Re = (ge = y.value) == null ? void 0 : ge.filter) == null ? void 0 : Re.query), b.value = X(), W(c.value);
719
+ l.value = o, u.value = w, c.value = A ?? !0, d.value = [te(se)], he != null && (y.value = he, q.value = (ve = (fe = y.value) == null ? void 0 : fe.filter) == null ? void 0 : ve.resourceIds, z.value = (Re = (ge = y.value) == null ? void 0 : ge.filter) == null ? void 0 : Re.query), b.value = X(), W(c.value);
720
720
  }, W = async (i) => {
721
- i != T.value && (T.value = i, i && (K(), F()));
721
+ i != L.value && (L.value = i, i && (K(), N()));
722
722
  }, H = async (i) => {
723
- x.value = i, await U(async (o) => await o.setFilterResourceIds(x.value || null));
723
+ q.value = i, await E(async (o) => await o.setFilterResourceIds(q.value || null));
724
724
  }, J = async (i) => {
725
- if (A.value = i, g.value != "Uninitialized") {
725
+ if (z.value = i, g.value != "Uninitialized") {
726
726
  const o = i, w = S(() => a.isFunction(o) ? p.value ? o(p.value) : null : o);
727
- await U((_) => _.setQuery(w.value || null));
727
+ await E((A) => A.setQuery(w.value || null));
728
728
  }
729
729
  }, K = () => {
730
730
  y.value = a.merge({}, y.value || {}, {
731
- filter: { resourceIds: x.value, query: A.value }
731
+ filter: { resourceIds: q.value, query: z.value }
732
732
  });
733
733
  }, p = S(
734
734
  () => d.value[0].value || void 0
735
735
  ), k = function(i) {
736
- const o = a.get(i, "filter.query"), w = a.get(i, "referencePathsToExpand"), _ = a.isFunction(o) ? o(p.value) : o, se = p.value ? a.isFunction(w) ? w(p.value) : w || [] : [];
736
+ const o = a.get(i, "filter.query"), w = a.get(i, "referencePathsToExpand"), A = a.isFunction(o) ? o(p.value) : o, se = p.value ? a.isFunction(w) ? w(p.value) : w || [] : [];
737
737
  return {
738
738
  ...a.cloneDeep(i || {}),
739
739
  filter: {
740
740
  ...a.cloneDeep((i == null ? void 0 : i.filter) || {}),
741
- query: _
741
+ query: A
742
742
  },
743
743
  referencePathsToExpand: se
744
744
  };
745
- }, P = S(() => k(y.value)), M = S(() => {
745
+ }, x = S(() => k(y.value)), M = S(() => {
746
746
  if (!p.value)
747
747
  return null;
748
- if (P.value.restCollectionUrl !== void 0)
749
- return P.value.restCollectionUrl;
748
+ if (x.value.restCollectionUrl !== void 0)
749
+ return x.value.restCollectionUrl;
750
750
  if (!B.value)
751
- return !p.value || !p.value.collectionName ? null : E.value ? `${ee.config.apiBaseUrl}/draft-batches/${E.value}/${p.value.collectionName}` : `${ee.config.apiBaseUrl}/${p.value.collectionName}`;
751
+ return !p.value || !p.value.collectionName ? null : U.value ? `${ee.config.apiBaseUrl}/draft-batches/${U.value}/${p.value.collectionName}` : `${ee.config.apiBaseUrl}/${p.value.collectionName}`;
752
752
  }), n = S(() => {
753
753
  var i;
754
754
  if (p.value)
755
755
  return a.mergeWith(
756
756
  a.cloneDeep(De),
757
- P.value,
757
+ x.value,
758
758
  {
759
759
  idProperty: (i = p.value) == null ? void 0 : i.idProperty,
760
760
  restCollectionUrl: M.value || ""
@@ -764,62 +764,63 @@ const De = {
764
764
  return w;
765
765
  }
766
766
  );
767
- }), h = I(0), q = S(
767
+ }), h = I(0), F = S(
768
768
  () => {
769
769
  var i;
770
- return h.value, l.value || p.value && ((i = p.value) == null ? void 0 : i.collectionName) && (E.value ? `draftBatches/${E.value}/${p.value.collectionName}/${b.value}` : `${p.value.collectionName}/${b.value}`) || null;
770
+ return h.value, l.value || p.value && ((i = p.value) == null ? void 0 : i.collectionName) && (U.value ? `draftBatches/${U.value}/${p.value.collectionName}/${b.value}` : `${p.value.collectionName}/${b.value}`) || null;
771
771
  }
772
- ), F = () => {
773
- if (T.value) {
772
+ ), N = () => {
773
+ if (L.value) {
774
774
  let i = !1;
775
- return p.value && q.value && (t.value = ie.getStore(q.value), t.value ? i = !1 : n.value && (B.value = !1, t.value = Ne(q.value, n.value)(), i = !0)), i;
775
+ return p.value && F.value && (t.value = ie.getStore(F.value), t.value ? i = !1 : n.value && (B.value = !1, t.value = Pe(F.value, n.value)(), i = !0)), i;
776
776
  } else
777
777
  return !1;
778
778
  }, G = () => {
779
- q.value && l.value == q.value ? (t.value = void 0, F()) : (t.value = void 0, h.value = h.value + 1, F());
779
+ F.value && l.value == F.value ? (t.value = void 0, N()) : (t.value = void 0, h.value = h.value + 1, N());
780
780
  };
781
- C(E, (i, o) => {
781
+ T(U, (i, o) => {
782
782
  a.isEqual(i, o) || G();
783
- }), C(T, (i, o) => {
784
- i != o && (i ? F() : t.value = void 0);
785
- }), C(p, (i, o) => {
786
- i && !o ? F() : !i && o || a.isEqual(i, o) || G();
787
- }), C(n, (i, o) => {
783
+ }), T(L, (i, o) => {
784
+ i != o && (i ? N() : t.value = void 0);
785
+ }), T(p, (i, o) => {
786
+ i && !o ? N() : !i && o || a.isEqual(i, o) || G();
787
+ }), T(n, (i, o) => {
788
788
  a.isEqual(i, o) || G();
789
- }), C(z, () => {
790
- z.value || (B.value = !1);
791
- }), C(q, () => F()), C(M, (i, o) => {
789
+ }), T(O, () => {
790
+ O.value || (B.value = !1);
791
+ }), T(F, () => N()), T(M, (i, o) => {
792
792
  a.isEqual(i, o) || G();
793
793
  });
794
- const j = [], Ue = function(i) {
794
+ const j = [], Ee = function(i) {
795
795
  g.value != "Uninitialized" ? Le(i) : j.push(i);
796
796
  };
797
- return C(g, (i, o) => {
797
+ return T(g, (i, o) => {
798
798
  if (i != "Uninitialized" && o == "Uninitialized") {
799
799
  const w = a.clone(j);
800
800
  j.splice(0, j.length);
801
- for (const _ of w)
802
- _();
801
+ for (const A of w)
802
+ A();
803
803
  }
804
- }), F(), {
804
+ }), N(), {
805
805
  // Configuration
806
- collectionId: q,
807
- draftBatchId: E,
806
+ collectionId: F,
807
+ draftBatchId: U,
808
808
  resourceType: p,
809
809
  // Status
810
- enabled: T,
810
+ enabled: L,
811
811
  status: g,
812
- batchSaveAttempted: S(() => L("batchSaveAttempted", !1)),
813
- listNavigators: S(() => L("listNavigators", !1)),
812
+ batchSaveAttempted: S(() => C("batchSaveAttempted", !1)),
813
+ listNavigators: S(() => C("listNavigators", !1)),
814
814
  // Resources loaded from the REST API
815
- invalidResources: S(() => L("invalidResources", [])),
816
- resources: S(() => g.value != "Uninitialized" ? (U((i) => i.ensureCollectionLoaded()), L("resources", [])) : []),
815
+ invalidResources: S(() => C("invalidResources", [])),
816
+ resources: S(() => g.value != "Uninitialized" ? (E((i) => i.ensureCollectionLoaded()), C("resources", [])) : []),
817
+ remoteCollectionSize: S(() => C("remoteCollectionSize", null)),
817
818
  // Transient data
818
- transientData: S(() => L("transientData", [])),
819
+ transientData: S(() => C("transientData", [])),
819
820
  // Selection and detail selection
820
- detailSelection: S(() => L("detailSelection", [])),
821
- editingDetailSelection: S(() => L("editingDetailSelection", !1)),
822
- selection: S(() => L("selection", [])),
821
+ detailSelection: S(() => C("detailSelection", [])),
822
+ editingDetailSelection: S(() => C("editingDetailSelection", !1)),
823
+ selection: S(() => C("selection", [])),
823
824
  // Methods: Configuration
824
825
  reconfigureCollection: D,
825
826
  setEditingDetailSelection: (i) => m(
@@ -829,28 +830,28 @@ const De = {
829
830
  setFilterResourceIds: H,
830
831
  setQuery: J,
831
832
  // Methods: Status
832
- ensureStore: F,
833
+ ensureStore: N,
833
834
  // TODO Rename
834
835
  setBatchSaveAttempted: (i) => m((o) => o.setBatchSaveAttempted(i)),
835
836
  // Local collection management
836
837
  clear: () => m((i) => i.clear()),
837
- ensureCollectionLoaded: async () => await U(async (i) => i.ensureCollectionLoaded()),
838
- loadResources: async () => await U(async (i) => await i.loadResources()),
838
+ ensureCollectionLoaded: async () => await E(async (i) => i.ensureCollectionLoaded()),
839
+ loadResources: async () => await E(async (i) => await i.loadResources()),
839
840
  // Methods: Recording changes to the collection
840
841
  addResource: (i) => m((o) => o.addResource(i)),
841
- checkForDeletedResource: async (i) => await U(async (o) => await o.checkForDeletedResource(i)) == !0,
842
+ checkForDeletedResource: async (i) => await E(async (o) => await o.checkForDeletedResource(i)) == !0,
842
843
  recordDeletion: (i) => m((o) => o.recordDeletion(i)),
843
- recordInsertion: (i, { insertAtBeginning: o = !1, transientData: w = void 0 } = {}) => m((_) => _.recordInsertion(i, { insertAtBeginning: o, transientData: w })),
844
+ recordInsertion: (i, { insertAtBeginning: o = !1, transientData: w = void 0 } = {}) => m((A) => A.recordInsertion(i, { insertAtBeginning: o, transientData: w })),
844
845
  recordUpdate: (i) => m((o) => o.recordUpdate(i)),
845
- refreshResource: async (i) => await U(
846
+ refreshResource: async (i) => await E(
846
847
  async (o) => await o.refreshResource(i)
847
848
  ),
848
849
  // Methods: Modifying the collection
849
- deleteResource: async (i) => await U(
850
+ deleteResource: async (i) => await E(
850
851
  async (o) => await o.deleteResource(i)
851
852
  ),
852
- saveResource: async (i) => await U(async (o) => await o.saveResource(i)),
853
- saveResources: async (i) => await U(async (o) => await o.saveResources(i)),
853
+ saveResource: async (i) => await E(async (o) => await o.saveResource(i)),
854
+ saveResources: async (i) => await E(async (o) => await o.saveResources(i)),
854
855
  // Methods: Transient data
855
856
  clearTransientData: () => m((i) => i.clearTransientData()),
856
857
  setInvalidResourceIds: (i) => m((o) => o.setInvalidResourceIds(i)),
@@ -872,7 +873,7 @@ const De = {
872
873
  deregisterListNavigator: (i) => m((o) => o.deregisterListNavigator(i)),
873
874
  registerListNavigator: (i) => m((o) => o.registerListNavigator(i)),
874
875
  // Callbacks
875
- onItemsStoreReady: Ue
876
+ onItemsStoreReady: Ee
876
877
  };
877
878
  }, Qe = () => {
878
879
  ie.clearAllStores();
@@ -880,13 +881,13 @@ const De = {
880
881
  function ae(f, s) {
881
882
  return a.get(f, (s == null ? void 0 : s.idProperty) || "_id");
882
883
  }
883
- const Ee = {
884
+ const Ue = {
884
885
  idProperty: "_id"
885
886
  }, Z = {
886
887
  resource: null,
887
888
  status: "NotLoaded"
888
- }, Pe = (f, s) => {
889
- s = a.merge({}, Ee, s);
889
+ }, xe = (f, s) => {
890
+ s = a.merge({}, Ue, s);
890
891
  const R = ye(f, {
891
892
  state: () => ({
892
893
  idProperty: s.idProperty,
@@ -959,7 +960,7 @@ const Ee = {
959
960
  (c, d) => c != null ? `${encodeURIComponent(d)}=${encodeURIComponent(c)}` : null
960
961
  ).filter((c) => c != null).join("&"), u = a.isEmpty(l) ? this.currentResourceUrl : `${this.currentResourceUrl}?${l}`;
961
962
  try {
962
- const c = await N.get(u), d = this.fixedQueryParams;
963
+ const c = await P.get(u), d = this.fixedQueryParams;
963
964
  e != this._loadId || !a.isEqual(r, d) ? console.log(`Discarding resource fetched by obsolete query from ${u}.`) : (this.resource = me.decode(a.get(c, "data", {})), this.status = "Loaded");
964
965
  } catch (c) {
965
966
  console.log(`Error while loading resource (URL="${u}")`, c), this.reset(), this.status = "Failed";
@@ -982,9 +983,9 @@ const Ee = {
982
983
  if (this.currentResourceUrl) {
983
984
  let e;
984
985
  try {
985
- e = await N.get(this.currentResourceUrl);
986
+ e = await P.get(this.currentResourceUrl);
986
987
  } catch (r) {
987
- N.isAxiosError(r) && (e = r.response);
988
+ P.isAxiosError(r) && (e = r.response);
988
989
  }
989
990
  return e && e.status == 404 ? (this.recordDeletion(), !0) : !1;
990
991
  } else
@@ -1055,7 +1056,7 @@ const Ee = {
1055
1056
  */
1056
1057
  async deleteResource() {
1057
1058
  if (this.currentResourceUrl)
1058
- (await N.delete(this.currentResourceUrl)).status == 200 && this.recordDeletion();
1059
+ (await P.delete(this.currentResourceUrl)).status == 200 && this.recordDeletion();
1059
1060
  else
1060
1061
  throw "Cannot delete a resource because its URL, or its ID and collection URL, are unknown.";
1061
1062
  },
@@ -1076,7 +1077,7 @@ const Ee = {
1076
1077
  throw "The REST resource store cannot create new resources on the server.";
1077
1078
  if (!this.currentResourceUrl)
1078
1079
  throw "Cannot save a resource because its URL, or its ID and collection URL, are unknown.";
1079
- const l = await N({
1080
+ const l = await P({
1080
1081
  method: t ? "post" : "put",
1081
1082
  url: this.currentResourceUrl,
1082
1083
  data: e
@@ -1098,7 +1099,7 @@ const Ee = {
1098
1099
  c = `${this.currentResourceUrl}/${t}`;
1099
1100
  else
1100
1101
  throw "Cannot make a custom API request for a resource because its URL, or its ID and collection URL, are unknown.";
1101
- const d = await N({
1102
+ const d = await P({
1102
1103
  method: r || "get",
1103
1104
  url: c,
1104
1105
  data: u
@@ -1121,9 +1122,9 @@ const Ee = {
1121
1122
  enabled: $,
1122
1123
  resourceType: e,
1123
1124
  options: r
1124
- } = f, t = I(void 0), l = I(s), u = I(R), c = I($ ?? !0), d = I([te(e)]), y = I(r), E = S(() => u.value), T = I(c.value), b = I(X()), x = S(
1125
+ } = f, t = I(void 0), l = I(s), u = I(R), c = I($ ?? !0), d = I([te(e)]), y = I(r), U = S(() => u.value), L = I(c.value), b = I(X()), q = S(
1125
1126
  () => u.value == null && l.value != null && ne.getStore(l.value) != null
1126
- ), A = I(x.value), z = S(() => m("status", "Uninitialized"));
1127
+ ), z = I(q.value), O = S(() => m("status", "Uninitialized"));
1127
1128
  function B(n) {
1128
1129
  if (t.value)
1129
1130
  return n(t.value);
@@ -1139,34 +1140,34 @@ const Ee = {
1139
1140
  return h;
1140
1141
  throw "Attempted to use a REST resource store that has not been created, with no default value.";
1141
1142
  }
1142
- const U = (n = {}) => {
1143
+ const E = (n = {}) => {
1143
1144
  const {
1144
1145
  resourceClientId: h,
1145
- draftBatchId: q,
1146
- enabled: F,
1146
+ draftBatchId: F,
1147
+ enabled: N,
1147
1148
  resourceType: G,
1148
1149
  options: j
1149
1150
  } = n;
1150
- l.value = h, u.value = q, c.value = F ?? !0, d.value = [te(G)], j != null && (y.value = j), b.value = X(), L(c.value);
1151
- }, L = async (n) => {
1152
- n != T.value && (T.value = n, n && P());
1151
+ l.value = h, u.value = F, c.value = N ?? !0, d.value = [te(G)], j != null && (y.value = j), b.value = X(), C(c.value);
1152
+ }, C = async (n) => {
1153
+ n != L.value && (L.value = n, n && x());
1153
1154
  }, D = S(
1154
1155
  () => d.value[0].value || void 0
1155
1156
  ), W = function(n) {
1156
- const h = a.get(n, "referencePathsToExpand"), q = D.value ? a.isFunction(h) ? h(D.value) : h || [] : [];
1157
+ const h = a.get(n, "referencePathsToExpand"), F = D.value ? a.isFunction(h) ? h(D.value) : h || [] : [];
1157
1158
  return {
1158
1159
  ...a.cloneDeep(n || {}),
1159
- referencePathsToExpand: q
1160
+ referencePathsToExpand: F
1160
1161
  };
1161
1162
  }, H = S(() => W(y.value)), J = S(() => {
1162
1163
  if (!D.value)
1163
1164
  return null;
1164
- if (!A.value)
1165
- return !D.value || !D.value.collectionName ? null : E.value ? `${ee.config.apiBaseUrl}/draft-batches/${E.value}/${D.value.collectionName}` : `${ee.config.apiBaseUrl}/${D.value.collectionName}`;
1165
+ if (!z.value)
1166
+ return !D.value || !D.value.collectionName ? null : U.value ? `${ee.config.apiBaseUrl}/draft-batches/${U.value}/${D.value.collectionName}` : `${ee.config.apiBaseUrl}/${D.value.collectionName}`;
1166
1167
  }), K = S(() => {
1167
1168
  if (D.value && J.value)
1168
1169
  return a.mergeWith(
1169
- a.cloneDeep(Ee),
1170
+ a.cloneDeep(Ue),
1170
1171
  H.value,
1171
1172
  {
1172
1173
  idProperty: D.value.idProperty,
@@ -1180,48 +1181,48 @@ const Ee = {
1180
1181
  }), p = I(0), k = S(
1181
1182
  () => {
1182
1183
  var n;
1183
- return p.value, l.value || D.value && ((n = D.value) == null ? void 0 : n.collectionName) && (E.value ? `draftBatches/${E.value}/${D.value.collectionName}/${b.value}` : `${D.value.collectionName}/${b.value}`) || null;
1184
+ return p.value, l.value || D.value && ((n = D.value) == null ? void 0 : n.collectionName) && (U.value ? `draftBatches/${U.value}/${D.value.collectionName}/${b.value}` : `${D.value.collectionName}/${b.value}`) || null;
1184
1185
  }
1185
- ), P = () => {
1186
- if (T.value) {
1186
+ ), x = () => {
1187
+ if (L.value) {
1187
1188
  let n = !1;
1188
- return D.value && k.value && (t.value = ne.getStore(k.value), t.value ? n = !1 : K.value && (A.value = !1, t.value = Pe(k.value, K.value)(), n = !0)), n;
1189
+ return D.value && k.value && (t.value = ne.getStore(k.value), t.value ? n = !1 : K.value && (z.value = !1, t.value = xe(k.value, K.value)(), n = !0)), n;
1189
1190
  } else
1190
1191
  return !1;
1191
1192
  }, M = () => {
1192
- k.value && l.value == k.value ? (t.value = void 0, P()) : (t.value = void 0, p.value = p.value + 1, P());
1193
+ k.value && l.value == k.value ? (t.value = void 0, x()) : (t.value = void 0, p.value = p.value + 1, x());
1193
1194
  };
1194
- return C(E, (n, h) => {
1195
+ return T(U, (n, h) => {
1195
1196
  a.isEqual(n, h) || M();
1196
- }), C(T, (n, h) => {
1197
- n != h && (n ? P() : t.value = void 0);
1198
- }), C(D, (n, h) => {
1199
- n && !h ? P() : !n && h || a.isEqual(n, h) || M();
1200
- }), C(K, (n, h) => {
1197
+ }), T(L, (n, h) => {
1198
+ n != h && (n ? x() : t.value = void 0);
1199
+ }), T(D, (n, h) => {
1200
+ n && !h ? x() : !n && h || a.isEqual(n, h) || M();
1201
+ }), T(K, (n, h) => {
1201
1202
  a.isEqual(n, h) || M();
1202
- }), C(x, () => {
1203
- x.value || (A.value = !1);
1204
- }), C(k, () => P()), C(J, (n, h) => {
1203
+ }), T(q, () => {
1204
+ q.value || (z.value = !1);
1205
+ }), T(k, () => x()), T(J, (n, h) => {
1205
1206
  a.isEqual(n, h) || M();
1206
- }), P(), {
1207
+ }), x(), {
1207
1208
  // Configuration
1208
1209
  resourceClientId: k,
1209
- draftBatchId: E,
1210
- enabled: T,
1210
+ draftBatchId: U,
1211
+ enabled: L,
1211
1212
  resourceType: D,
1212
1213
  // Status
1213
- status: z,
1214
+ status: O,
1214
1215
  // Resources loaded from the REST API
1215
- resource: S(() => z.value != "Uninitialized" ? (g((n) => n.ensureResourceLoaded()), m("resource", [])) : []),
1216
+ resource: S(() => O.value != "Uninitialized" ? (g((n) => n.ensureResourceLoaded()), m("resource", [])) : []),
1216
1217
  resourceId: S(() => m("resourceId", null)),
1217
1218
  resourceUrl: S(() => m("resourceUrl", null)),
1218
1219
  // Methods: Configuration
1219
- reconfigureClient: U,
1220
- setEnabled: L,
1220
+ reconfigureClient: E,
1221
+ setEnabled: C,
1221
1222
  setResourceId: async (n) => await g(async (h) => await h.setResourceId(n)),
1222
1223
  setResourceUrl: async (n) => await g(async (h) => await h.setResourceUrl(n)),
1223
1224
  // Methods: Status
1224
- ensureStore: P,
1225
+ ensureStore: x,
1225
1226
  // Methods: Resource management
1226
1227
  clear: () => B((n) => n.clear()),
1227
1228
  ensureResourceLoaded: async () => await g(async (n) => n.ensureResourceLoaded()),
@@ -1 +1 @@
1
- (function(v,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("lodash"),require("uuid"),require("vue"),require("axios"),require("jsog"),require("json-stringify-deterministic"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","lodash","uuid","vue","axios","jsog","json-stringify-deterministic","pinia"],s):(v=typeof globalThis<"u"?globalThis:v||self,s(v["rest-client-vue"]={},v._,v.uuid,v.Vue,v.axios,v.jsog,v.stringify,v.pinia))})(this,function(v,s,I,n,$,ae,J,ne){"use strict";var Pe=Object.defineProperty;var Ne=(v,s,I)=>s in v?Pe(v,s,{enumerable:!0,configurable:!0,writable:!0,value:I}):v[s]=I;var le=(v,s,I)=>(Ne(v,typeof s!="symbol"?s+"":s,I),I),Fe=(v,s,I)=>{if(!s.has(v))throw TypeError("Cannot "+I)};var j=(v,s,I)=>(Fe(v,s,"read from private field"),I?I.call(v):s.get(v)),Ie=(v,s,I)=>{if(s.has(v))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(v):s.set(v,I)};var A;const oe={apiBaseUrl:"",useVueLogger:!1};class we extends Error{constructor(C,q=void 0,e=void 0){super(C);le(this,"context");le(this,"innerError");this.context=q,this.innerError=e}}class ce{constructor(){Ie(this,A,{})}clearAllStores(){for(const a in j(this,A))j(this,A)[a].clear()}destroyStore(a){j(this,A)[a]&&(j(this,A)[a].$dispose(),delete j(this,A)[a])}getStore(a){return j(this,A)[a]}registerStore(a,C){j(this,A)[a]=C}}A=new WeakMap;function g(w,a){return s.get(w,(a==null?void 0:a.idProperty)||"_id")}function De(w,a){var C;return w&&((C=a.filter)!=null&&C.resourceIds)&&!a.order?a.filter.resourceIds.map(q=>w.find(e=>g(e,a)==q)).filter(q=>q!=null):w}const ue={detail:{allowMultiple:!0,autoEdit:!1,autoFromMultipleSelection:!0,autoFromSingleInsertion:!0,autoFromSingleSelection:!0,constrainToSelection:!0},filter:{namedFilter:null,query:null,resourceIds:null},idProperty:"_id",limit:5e3,limitTransientDataToLocalCollection:!0,loading:{firstPageSize:500,pageSize:5e3},order:[[{path:"history.creation.timestamp"},"desc"],[{path:"history.creation.orderInBatch"},"desc"]]},K={resources:[],totalNumResources:null,status:"NotLoaded",selection:[],detailSelection:[],invalidResources:[],transientData:{}},te={editingDetailSelection:!1,batchSaveAttempted:!1,editors:[],listNavigators:{}},Ee=(w,a)=>{a=s.merge({},ue,a);const C=ne.defineStore(w,{state:()=>({idProperty:a.idProperty,filter:a.filter,order:a.order||null,referencePathsToExpand:a.referencePathsToExpand||null,...K,...te}),getters:{fixedQueryParams:e=>{var l,d,u,h;const r={};(l=e.filter)!=null&&l.namedFilter&&(r.namedFilter=e.filter.namedFilter);const t=[];if((d=e.filter)!=null&&d.resourceIds&&t.push({l:{path:e.idProperty},r:{constant:e.filter.resourceIds},operator:"in"}),(u=e.filter)!=null&&u.query&&t.push((h=e.filter)==null?void 0:h.query),t.length>0){const p=t.length==1?t[0]:{and:t};r.q=J(p)}return e.order&&(r.o=J(e.order)),e.referencePathsToExpand&&(r.r=J(e.referencePathsToExpand)),r}},actions:{reset(){for(const e in K)this[e]=K[e];for(const e in te)this[e]=te[e]},resetRetainingTransientData(){if(a.limitTransientDataToLocalCollection)this.reset();else{const e=this.transientData;this.reset(),this.transientData=e}},setEditingDetailSelection(e){this.editingDetailSelection=e},setFilter(e){s.isEqual(e,this.filter)||(this.filter=e,this.status="NotLoaded",this.resources=[],this.totalNumResources=null,this.selection=[],this.detailSelection=[],this.invalidResources=[],this.editingDetailSelection=!1)},async setQuery(e){var r,t;if(!s.isEqual(e,(r=this.filter)==null?void 0:r.query)&&(e!=null||((t=this.filter)==null?void 0:t.query)!=null)){const l=s.cloneDeep(this.filter)||{};e!==null?l.query=e:s.unset(l,"query");const d=this.status;this.setFilter(l),d!="NotLoaded"&&await this.loadResources()}},async setFilterResourceIds(e){if(!s.isEqual(e,s.get(this.filter,"resourceIds"))){const r=s.cloneDeep(this.filter)||{};e!=null?r.resourceIds=e:s.unset(r,"resourceIds");const t=this.status;this.setFilter(r),t!="NotLoaded"&&await this.loadResources()}},setBatchSaveAttempted(e){e!=this.batchSaveAttempted&&(this.batchSaveAttempted=e)},clear(){for(const e in K)this[e]=K[e]},clearRetainingTransientData(){if(a.limitTransientDataToLocalCollection)this.reset();else{const e=this.transientData;this.reset(),this.transientData=e}},async ensureCollectionLoaded(){["Loaded","Loading","LoadingMore","Failed"].includes(this.status)||await this.loadResources()},async loadResources(e={}){this.resetRetainingTransientData();const r=I.v4();this._loadId=r,await this._loadResources(0,r,e)},async _loadResources(e,r,t){var b,N,O,k,Q;const l=e==0;if(this.status=l?"Loading":"LoadingMore",this._loadOffset=e,((b=this.filter)==null?void 0:b.query)===!1){this.resources=[],this.totalNumResources=0;return}const d=this.fixedQueryParams,u=s.cloneDeep(d),h=l?(N=this.filter)!=null&&N.resourceIds&&!this.order?null:t.firstPageSize||((O=a.loading)==null?void 0:O.firstPageSize)||t.pageSize||((k=a.loading)==null?void 0:k.pageSize)||null:t.pageSize||((Q=a.loading)==null?void 0:Q.pageSize)||null,p=h!=null||a.limit!=null?s.min(s.filter([h,a.limit],R=>R!=null)):void 0;p!=null?(u.offset=e,u.limit=p):e!=0&&(u.offset=e);const D=s.map(u,(R,m)=>R!=null?`${encodeURIComponent(m)}=${encodeURIComponent(R)}`:null).filter(R=>R!=null).join("&"),T=s.isEmpty(D)?a.restCollectionUrl:`${a.restCollectionUrl}?${D}`;try{const R=await $.get(T),m=this.fixedQueryParams;if(r!=this._loadId||e!=this._loadOffset||!s.isEqual(d,m))console.log(`Discarding resources fetched by obsolete query from ${a.restCollectionUrl}.`);else{const E=ae.decode(s.get(R,"data.data",[])),L=(l?0:this.resources.length)+E.length,y=p==null||E.length<p||a.limit&&L>=a.limit;console.log(`Loaded ${E.length}${l?"":" more"} resources from ${a.restCollectionUrl}`),l&&(this.resources=[]);const X=[...this.resources,...E.map(Z=>Object.freeze(Z))];this.resources=De(X,this),s.get(R,"data.totalNumEntities")?this.totalNumResources=s.get(R,"data.totalNumEntities"):this.totalNumResources=null,this.status=y?"Loaded":"LoadingMore",y||this._loadResources(this.resources.length,r,t)}}catch(R){console.log(`Error while loading resources (URL="${T}"):`,R),this.clearRetainingTransientData(),this.status="Failed"}},async checkForDeletedResource(e){let r;try{r=await $.get(`${a.restCollectionUrl}/${e}`)}catch(t){$.isAxiosError(t)&&(r=t.response)}return r&&r.status==404?(this.recordDeletion(e),!0):!1},recordDeletion(e){var r;if(["Loaded","LoadingMore"].includes(this.status)){let t=this.resources.findIndex(l=>g(l,this)==e);t>=0&&this.resources.splice(t,1),t=this.selection.findIndex(l=>g(l,this)==e),t>=0&&this.selection.splice(t,1),t=this.detailSelection.findIndex(l=>g(l,this)==e),t>=0&&(this.detailSelection.splice(t,1),this.detailSelection.length==0&&(this.editingDetailSelection=((r=a.detail)==null?void 0:r.autoEdit)||!1)),a.limitTransientDataToLocalCollection&&delete this.transientData[e]}},recordInsertion(e,{insertAtBeginning:r,transientData:t}={}){var l;if(["Loaded","LoadingMore"].includes(this.status)){const d=Object.freeze(e);r?this.resources.unshift(d):this.resources.push(d),(l=a.detail)!=null&&l.autoFromSingleInsertion&&(this.detailSelection.length==0||this.detailSelection.length==1&&g(this.detailSelection[0],this)==null)&&(this.detailSelection=[d],this.editingDetailSelection=a.detail.autoEdit);const u=g(e,this);u&&(t===void 0?delete this.transientData[u]:this.transientData[u]=t)}},recordUpdate(e){const r=g(e,this);if(r&&["Loaded","LoadingMore"].includes(this.status)){const t=Object.freeze(e);let l=this.resources.findIndex(d=>g(d,this)==r);l>=0&&(this.resources[l]=t),l=this.selection.findIndex(d=>g(d,this)==r),l>=0&&(this.selection[l]=t),l=this.detailSelection.findIndex(d=>g(d,this)==r),l>=0&&(this.detailSelection[l]=t)}},async refreshResource(e){if(e){const r={};this.referencePathsToExpand&&(r.r=J(this.referencePathsToExpand));const t=s.map(r,(u,h)=>u!=null?`${encodeURIComponent(h)}=${encodeURIComponent(u)}`:null).filter(u=>u!=null).join("&"),l=s.isEmpty(t)?`${a.restCollectionUrl}/${e}`:`${a.restCollectionUrl}/${e}?${t}`,d=await $.get(l);if(d.status==200){const u=d.data;return this.recordUpdate(u),u}}return null},addResource(e={}){this.detailSelection=[s.omit(s.merge({},e),this.idProperty)],this.editingDetailSelection=!0},async deleteResource(e){if((await $.delete(`${a.restCollectionUrl}/${e}`)).status==200&&["Loaded","LoadingMore"].includes(this.status)){let t=this.resources.findIndex(l=>g(l,this)==e);t>=0&&this.resources.splice(t,1),t=this.selection.findIndex(l=>g(l,this)==e),t>=0&&this.selection.splice(t,1),t=this.detailSelection.findIndex(l=>g(l,this)==e),t>=0&&(this.detailSelection.splice(t,1),this.detailSelection.length==0&&(this.editingDetailSelection=a.detail.autoEdit)),a.limitTransientDataToLocalCollection&&delete this.transientData[e]}},async saveResource(e){const r=g(e,this),t=r==null,l=await $({method:t?"post":"put",url:t?a.restCollectionUrl:`${a.restCollectionUrl}/${r}`,data:e});if(l.status==200){const d=l.data,u=g(d,this),h=u?await this.refreshResource(u):null;return t&&this.recordInsertion(h||Object.freeze(d)),h||d}return null},async saveResources(e){const r=await $({method:"put",url:a.restCollectionUrl,data:e});if(r.status==200){const t=r.data||[],l=[];for(const[d,u]of t.entries()){const h=g(e[d],this)==null,p=g(u,this),D=p?await this.refreshResource(p):null;h&&this.recordInsertion(D||u),l.push(D||Object.freeze(u))}return l}return[]},clearTransientData(){this.transientData={}},setInvalidResourceIds(e){s.isEqual(e,this.invalidResources.map(r=>g(r,this)))||(this.invalidResources=e.map(r=>this.resources.find(t=>g(t,this)==r)).filter(r=>r!=null))},setTransientDataForResources(e){const{transientData:r,merge:t=!0}=e;t?s.merge(this.transientData,r):s.assign(this.transientData,r)},clearSelection(){this.setSelection([])},deselectResources(e){const r=this.selection.map(t=>g(t,this)).filter(t=>t!=null&&!e.includes(t));this.setSelection(r)},selectResources(e,r){const{addToSelection:t,edit:l}=r||{},d=this.selection.map(h=>g(h,this));let u=e;if(t){const h=s.difference(e,d);h.length>0&&(u=d.concat(h).filter(p=>p!=null))}s.isEqual(d,u)||this.setSelection(u,l)},setSelection(e,r){if(!s.isEqual(e,this.selection.map(t=>g(t,this)))){let t=!0;if(this.editors.length>0){if(a.detail.autoFromSingleSelection&&this.selection.length==1)t=!1;else if(a.detail.autoFromMultipleSelection&&a.detail.allowMultiple&&this.selection.length>1)t=!1;else if(a.detail.constrainToSelection){const l=this.selection.map(h=>g(h,this)),u=this.detailSelection.map(h=>g(h,this)).filter(h=>l.includes(h));this.detailSelection.filter(h=>!u.includes(g(h,this))).length>0&&(t=!1)}}if(!t)return;if(this.selection=e.map(l=>this.resources.find(d=>g(d,this)==l)).filter(l=>l!=null),a.detail.autoFromSingleSelection&&this.selection.length==1){const l=this.selection[0];(this.detailSelection.length!=1||g(this.detailSelection[0],this)!=g(l,this))&&(this.detailSelection=[l])}else if(a.detail.autoFromMultipleSelection&&a.detail.allowMultiple&&this.selection.length>1)s.isEqual(this.selection.map(l=>g(l,this)),this.detailSelection.map(l=>g(l,this)))||(this.detailSelection=s.clone(this.selection));else if(a.detail.constrainToSelection){const l=this.selection.map(h=>g(h,this)),d=this.detailSelection.map(h=>g(h,this)),u=d.filter(h=>l.includes(h));s.isEqual(u,d)||(this.detailSelection=this.detailSelection.filter(h=>u.includes(g(h,this))))}this.detailSelection.length==0?this.editingDetailSelection=!1:this.editingDetailSelection=r!==void 0?r:this.editingDetailSelection||a.detail.autoEdit}},hideDetail(){this.detailSelection.length>0&&(this.detailSelection=[],this.editingDetailSelection=!1)},showSelectionAsDetail(e){if(this.selection.length<=1||a.detail.allowMultiple){const r=this.selection.map(l=>g(l,this)),t=this.detailSelection.map(l=>g(l,this));s.isEqual(r,t)||(this.detailSelection=s.clone(this.selection)),this.detailSelection.length==0?this.editingDetailSelection=!1:this.editingDetailSelection=e!==void 0?e:this.editingDetailSelection||a.detail.autoEdit}},deregisterEditor(e){s.remove(this.editors,r=>r==e)},registerEditor(e){this.editors.includes(e)||this.editors.push(e)},deregisterListNavigator({name:e,listNavigator:r}){(r==null||this.listNavigators[e]==r)&&delete this.listNavigators[e]},registerListNavigator({name:e,listNavigator:r}){this.listNavigators[e]!=r&&(this.listNavigators[e]=r)}}});return(()=>{const e=(r,t)=>{const l=C(r,t);return ee.registerStore(l.$id,l),l};return e.$id=C.$id,e})()},ee=new ce,Ue=(w={})=>{var he,fe,ge,ve;const{collectionId:a,draftBatchId:C,enabled:q,resourceType:e,options:r}=w,t=n.ref(void 0),l=n.ref(a),d=n.ref(C),u=n.ref(q??!0),h=n.ref([n.toRef(e)]),p=n.ref(r),D=n.computed(()=>d.value),T=n.ref(u.value),b=n.ref(I.v4()),N=n.ref((fe=(he=p.value)==null?void 0:he.filter)==null?void 0:fe.resourceIds),O=n.ref((ve=(ge=p.value)==null?void 0:ge.filter)==null?void 0:ve.query),k=n.computed(()=>d.value==null&&l.value!=null&&ee.getStore(l.value)!=null),Q=n.ref(k.value),R=n.computed(()=>L("status","Uninitialized"));function m(i){if(t.value)return i(t.value)}async function E(i){if(t.value)return await i(t.value)}function L(i,c){if(t.value)return t.value[i];if(c!==void 0)return c;throw"Attempted to use a REST collection store that has not been created, with no default value."}const y=(i={})=>{var me,pe,Se,ye;const{collectionId:c,draftBatchId:U,enabled:z,resourceType:re,options:Re}=i;l.value=c,d.value=U,u.value=z??!0,h.value=[n.toRef(re)],Re!=null&&(p.value=Re,N.value=(pe=(me=p.value)==null?void 0:me.filter)==null?void 0:pe.resourceIds,O.value=(ye=(Se=p.value)==null?void 0:Se.filter)==null?void 0:ye.query),b.value=I.v4(),X(u.value)},X=async i=>{i!=T.value&&(T.value=i,i&&(_(),x()))},Z=async i=>{N.value=i,await E(async c=>await c.setFilterResourceIds(N.value||null))},V=async i=>{if(O.value=i,R.value!="Uninitialized"){const c=i,U=n.computed(()=>s.isFunction(c)?S.value?c(S.value):null:c);await E(z=>z.setQuery(U.value||null))}},_=()=>{p.value=s.merge({},p.value||{},{filter:{resourceIds:N.value,query:O.value}})},S=n.computed(()=>h.value[0].value||void 0),B=function(i){const c=s.get(i,"filter.query"),U=s.get(i,"referencePathsToExpand"),z=s.isFunction(c)?c(S.value):c,re=S.value?s.isFunction(U)?U(S.value):U||[]:[];return{...s.cloneDeep(i||{}),filter:{...s.cloneDeep((i==null?void 0:i.filter)||{}),query:z},referencePathsToExpand:re}},P=n.computed(()=>B(p.value)),M=n.computed(()=>{if(!S.value)return null;if(P.value.restCollectionUrl!==void 0)return P.value.restCollectionUrl;if(!Q.value)return!S.value||!S.value.collectionName?null:D.value?`${G.config.apiBaseUrl}/draft-batches/${D.value}/${S.value.collectionName}`:`${G.config.apiBaseUrl}/${S.value.collectionName}`}),o=n.computed(()=>{var i;if(S.value)return s.mergeWith(s.cloneDeep(ue),P.value,{idProperty:(i=S.value)==null?void 0:i.idProperty,restCollectionUrl:M.value||""},(c,U)=>{if(s.isArray(U)&&U.length==0&&(c==null||s.isArray(c)))return U})}),f=n.ref(0),F=n.computed(()=>{var i;return f.value,l.value||S.value&&((i=S.value)==null?void 0:i.collectionName)&&(D.value?`draftBatches/${D.value}/${S.value.collectionName}/${b.value}`:`${S.value.collectionName}/${b.value}`)||null}),x=()=>{if(T.value){let i=!1;return S.value&&F.value&&(t.value=ee.getStore(F.value),t.value?i=!1:o.value&&(Q.value=!1,t.value=Ee(F.value,o.value)(),i=!0)),i}else return!1},H=()=>{F.value&&l.value==F.value?(t.value=void 0,x()):(t.value=void 0,f.value=f.value+1,x())};n.watch(D,(i,c)=>{s.isEqual(i,c)||H()}),n.watch(T,(i,c)=>{i!=c&&(i?x():t.value=void 0)}),n.watch(S,(i,c)=>{i&&!c?x():!i&&c||s.isEqual(i,c)||H()}),n.watch(o,(i,c)=>{s.isEqual(i,c)||H()}),n.watch(k,()=>{k.value||(Q.value=!1)}),n.watch(F,()=>x()),n.watch(M,(i,c)=>{s.isEqual(i,c)||H()});const W=[],qe=function(i){R.value!="Uninitialized"?n.nextTick(i):W.push(i)};return n.watch(R,(i,c)=>{if(i!="Uninitialized"&&c=="Uninitialized"){const U=s.clone(W);W.splice(0,W.length);for(const z of U)z()}}),x(),{collectionId:F,draftBatchId:D,resourceType:S,enabled:T,status:R,batchSaveAttempted:n.computed(()=>L("batchSaveAttempted",!1)),listNavigators:n.computed(()=>L("listNavigators",!1)),invalidResources:n.computed(()=>L("invalidResources",[])),resources:n.computed(()=>R.value!="Uninitialized"?(E(i=>i.ensureCollectionLoaded()),L("resources",[])):[]),transientData:n.computed(()=>L("transientData",[])),detailSelection:n.computed(()=>L("detailSelection",[])),editingDetailSelection:n.computed(()=>L("editingDetailSelection",!1)),selection:n.computed(()=>L("selection",[])),reconfigureCollection:y,setEditingDetailSelection:i=>m(c=>c.setEditingDetailSelection(i)),setEnabled:X,setFilterResourceIds:Z,setQuery:V,ensureStore:x,setBatchSaveAttempted:i=>m(c=>c.setBatchSaveAttempted(i)),clear:()=>m(i=>i.clear()),ensureCollectionLoaded:async()=>await E(async i=>i.ensureCollectionLoaded()),loadResources:async()=>await E(async i=>await i.loadResources()),addResource:i=>m(c=>c.addResource(i)),checkForDeletedResource:async i=>await E(async c=>await c.checkForDeletedResource(i))==!0,recordDeletion:i=>m(c=>c.recordDeletion(i)),recordInsertion:(i,{insertAtBeginning:c=!1,transientData:U=void 0}={})=>m(z=>z.recordInsertion(i,{insertAtBeginning:c,transientData:U})),recordUpdate:i=>m(c=>c.recordUpdate(i)),refreshResource:async i=>await E(async c=>await c.refreshResource(i)),deleteResource:async i=>await E(async c=>await c.deleteResource(i)),saveResource:async i=>await E(async c=>await c.saveResource(i)),saveResources:async i=>await E(async c=>await c.saveResources(i)),clearTransientData:()=>m(i=>i.clearTransientData()),setInvalidResourceIds:i=>m(c=>c.setInvalidResourceIds(i)),setTransientDataForResources:i=>m(c=>c.setTransientDataForResources(i)),clearSelection:()=>m(i=>i.clearSelection()),deselectResources:i=>m(c=>c.deselectResources(i)),selectResources:(i,c)=>m(U=>U.selectResources(i,c)),hideDetail:()=>m(i=>i.hideDetail()),deregisterEditor:i=>m(c=>c.deregisterEditor(i)),registerEditor:i=>m(c=>c.registerEditor(i)),deregisterListNavigator:i=>m(c=>c.deregisterListNavigator(i)),registerListNavigator:i=>m(c=>c.registerListNavigator(i)),onItemsStoreReady:qe}},Ce=()=>{ee.clearAllStores()};function ie(w,a){return s.get(w,(a==null?void 0:a.idProperty)||"_id")}const de={idProperty:"_id"},Y={resource:null,status:"NotLoaded"},Te=(w,a)=>{a=s.merge({},de,a);const C=ne.defineStore(w,{state:()=>({idProperty:a.idProperty,resourceId:a.resourceId||null,resourceUrl:a.resourceUrl||null,referencePathsToExpand:a.referencePathsToExpand||null,...Y}),getters:{currentResourceUrl:e=>e.resourceUrl||(a.restCollectionUrl&&e.resourceId?`${a.restCollectionUrl}/${e.resourceId}`:null)||a.restCollectionUrl||null,fixedQueryParams:e=>{const r={};return e.referencePathsToExpand&&(r.r=J(e.referencePathsToExpand)),r}},actions:{reset(){for(const e in Y)this[e]=Y[e]},async setResourceId(e){const r=this.currentResourceUrl;this.resourceId=e,!s.isEqual(this.currentResourceUrl,r)&&this.status!="NotLoaded"&&await this.loadResource()},async setResourceUrl(e){const r=this.currentResourceUrl;this.resourceUrl=e,!s.isEqual(this.currentResourceUrl,r)&&this.status!="NotLoaded"&&await this.loadResource()},clear(){for(const e in Y)this[e]=Y[e]},async ensureResourceLoaded(){["Loaded","Loading","Failed"].includes(this.status)||await this.loadResource()},async loadResource(){this.reset();const e=I.v4();if(this._loadId=e,this.currentResourceUrl){this.status="Loading";const r=this.fixedQueryParams,t=s.cloneDeep(r),l=s.map(t,(u,h)=>u!=null?`${encodeURIComponent(h)}=${encodeURIComponent(u)}`:null).filter(u=>u!=null).join("&"),d=s.isEmpty(l)?this.currentResourceUrl:`${this.currentResourceUrl}?${l}`;try{const u=await $.get(d),h=this.fixedQueryParams;e!=this._loadId||!s.isEqual(r,h)?console.log(`Discarding resource fetched by obsolete query from ${d}.`):(this.resource=ae.decode(s.get(u,"data",{})),this.status="Loaded")}catch(u){console.log(`Error while loading resource (URL="${d}")`,u),this.reset(),this.status="Failed"}}else throw"Cannot load a resource because its URL, or its ID and collection URL, are unknown."},async checkForDeletedResource(){if(this.currentResourceUrl){let e;try{e=await $.get(this.currentResourceUrl)}catch(r){$.isAxiosError(r)&&(e=r.response)}return e&&e.status==404?(this.recordDeletion(),!0):!1}else throw"Cannot check for a deleted resource because its URL, or its ID and collection URL, are unknown."},recordDeletion(){this.resource=null,this.status="Loaded"},recordInsertion(e){this.resourceId=ie(e,this)||null,this.status=="Loaded"&&(this.resource=Object.freeze(e))},recordUpdate(e){this.resourceId=ie(e,this)||null,this.status=="Loaded"&&(this.resource=Object.freeze(e))},async refreshResource(){return await this.loadResource(),this.resource},async deleteResource(){if(this.currentResourceUrl)(await $.delete(this.currentResourceUrl)).status==200&&this.recordDeletion();else throw"Cannot delete a resource because its URL, or its ID and collection URL, are unknown."},async saveResource(e){const r=ie(e,this),t=r==null;if(!r)throw"The REST resource store cannot create new resources on the server.";if(!this.currentResourceUrl)throw"Cannot save a resource because its URL, or its ID and collection URL, are unknown.";const l=await $({method:t?"post":"put",url:this.currentResourceUrl,data:e});if(l.status==200){const d=l.data,u=await this.refreshResource();return t&&this.recordInsertion(u||d),u||Object.freeze(d)}return null},async makeCustomApiRequest(e){const{method:r,subpath:t,url:l,data:d}=e;let u=l;if(!u)if(this.currentResourceUrl)u=`${this.currentResourceUrl}/${t}`;else throw"Cannot make a custom API request for a resource because its URL, or its ID and collection URL, are unknown.";const h=await $({method:r||"get",url:u,data:d});return h.status>=200&&h.status<300?h.data:null}}});return(()=>{const e=(r,t)=>{const l=C(r,t);return se.registerStore(l.$id,l),l};return e.$id=C.$id,e})()},se=new ce,Le=(w={})=>{const{resourceClientId:a,draftBatchId:C,enabled:q,resourceType:e,options:r}=w,t=n.ref(void 0),l=n.ref(a),d=n.ref(C),u=n.ref(q??!0),h=n.ref([n.toRef(e)]),p=n.ref(r),D=n.computed(()=>d.value),T=n.ref(u.value),b=n.ref(I.v4()),N=n.computed(()=>d.value==null&&l.value!=null&&se.getStore(l.value)!=null),O=n.ref(N.value),k=n.computed(()=>m("status","Uninitialized"));function Q(o){if(t.value)return o(t.value)}async function R(o){if(t.value)return await o(t.value)}function m(o,f){if(t.value)return t.value[o];if(f!==void 0)return f;throw"Attempted to use a REST resource store that has not been created, with no default value."}const E=(o={})=>{const{resourceClientId:f,draftBatchId:F,enabled:x,resourceType:H,options:W}=o;l.value=f,d.value=F,u.value=x??!0,h.value=[n.toRef(H)],W!=null&&(p.value=W),b.value=I.v4(),L(u.value)},L=async o=>{o!=T.value&&(T.value=o,o&&P())},y=n.computed(()=>h.value[0].value||void 0),X=function(o){const f=s.get(o,"referencePathsToExpand"),F=y.value?s.isFunction(f)?f(y.value):f||[]:[];return{...s.cloneDeep(o||{}),referencePathsToExpand:F}},Z=n.computed(()=>X(p.value)),V=n.computed(()=>{if(!y.value)return null;if(!O.value)return!y.value||!y.value.collectionName?null:D.value?`${G.config.apiBaseUrl}/draft-batches/${D.value}/${y.value.collectionName}`:`${G.config.apiBaseUrl}/${y.value.collectionName}`}),_=n.computed(()=>{if(y.value&&V.value)return s.mergeWith(s.cloneDeep(de),Z.value,{idProperty:y.value.idProperty,restCollectionUrl:V.value},(o,f)=>{if(s.isArray(f)&&f.length==0&&(o==null||s.isArray(o)))return f})}),S=n.ref(0),B=n.computed(()=>{var o;return S.value,l.value||y.value&&((o=y.value)==null?void 0:o.collectionName)&&(D.value?`draftBatches/${D.value}/${y.value.collectionName}/${b.value}`:`${y.value.collectionName}/${b.value}`)||null}),P=()=>{if(T.value){let o=!1;return y.value&&B.value&&(t.value=se.getStore(B.value),t.value?o=!1:_.value&&(O.value=!1,t.value=Te(B.value,_.value)(),o=!0)),o}else return!1},M=()=>{B.value&&l.value==B.value?(t.value=void 0,P()):(t.value=void 0,S.value=S.value+1,P())};return n.watch(D,(o,f)=>{s.isEqual(o,f)||M()}),n.watch(T,(o,f)=>{o!=f&&(o?P():t.value=void 0)}),n.watch(y,(o,f)=>{o&&!f?P():!o&&f||s.isEqual(o,f)||M()}),n.watch(_,(o,f)=>{s.isEqual(o,f)||M()}),n.watch(N,()=>{N.value||(O.value=!1)}),n.watch(B,()=>P()),n.watch(V,(o,f)=>{s.isEqual(o,f)||M()}),P(),{resourceClientId:B,draftBatchId:D,enabled:T,resourceType:y,status:k,resource:n.computed(()=>k.value!="Uninitialized"?(R(o=>o.ensureResourceLoaded()),m("resource",[])):[]),resourceId:n.computed(()=>m("resourceId",null)),resourceUrl:n.computed(()=>m("resourceUrl",null)),reconfigureClient:E,setEnabled:L,setResourceId:async o=>await R(async f=>await f.setResourceId(o)),setResourceUrl:async o=>await R(async f=>await f.setResourceUrl(o)),ensureStore:P,clear:()=>Q(o=>o.clear()),ensureResourceLoaded:async()=>await R(async o=>o.ensureResourceLoaded()),loadResource:async()=>await R(async o=>await o.loadResource()),checkForDeletedResource:async()=>await R(async o=>await o.checkForDeletedResource())==!0,recordDeletion:()=>R(o=>o.recordDeletion()),recordInsertion:o=>R(f=>f.recordInsertion(o)),recordUpdate:o=>R(f=>f.recordUpdate(o)),refreshResource:async()=>await R(async o=>await o.refreshResource()),deleteResource:async()=>await R(async o=>await o.deleteResource()),saveResource:async o=>await R(async f=>await f.saveResource(o)),makeCustomApiRequest:async o=>await R(async f=>await f.makeCustomApiRequest(o))}},G={config:{...oe}};function $e(w){G.config=s.merge({},oe,w)}v.ApiClientError=we,v.clearAllRestCollections=Ce,v.initRestClient=$e,v.restClient=G,v.useRestCollection=Ue,v.useRestResource=Le,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
1
+ (function(v,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("lodash"),require("uuid"),require("vue"),require("axios"),require("jsog"),require("json-stringify-deterministic"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","lodash","uuid","vue","axios","jsog","json-stringify-deterministic","pinia"],s):(v=typeof globalThis<"u"?globalThis:v||self,s(v["rest-client-vue"]={},v._,v.uuid,v.Vue,v.axios,v.jsog,v.stringify,v.pinia))})(this,function(v,s,I,a,$,ne,J,ae){"use strict";var Pe=Object.defineProperty;var Fe=(v,s,I)=>s in v?Pe(v,s,{enumerable:!0,configurable:!0,writable:!0,value:I}):v[s]=I;var le=(v,s,I)=>(Fe(v,typeof s!="symbol"?s+"":s,I),I),Ne=(v,s,I)=>{if(!s.has(v))throw TypeError("Cannot "+I)};var j=(v,s,I)=>(Ne(v,s,"read from private field"),I?I.call(v):s.get(v)),Ie=(v,s,I)=>{if(s.has(v))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(v):s.set(v,I)};var z;const oe={apiBaseUrl:"",useVueLogger:!1};class we extends Error{constructor(U,q=void 0,e=void 0){super(U);le(this,"context");le(this,"innerError");this.context=q,this.innerError=e}}class ce{constructor(){Ie(this,z,{})}clearAllStores(){for(const n in j(this,z))j(this,z)[n].clear()}destroyStore(n){j(this,z)[n]&&(j(this,z)[n].$dispose(),delete j(this,z)[n])}getStore(n){return j(this,z)[n]}registerStore(n,U){j(this,z)[n]=U}}z=new WeakMap;function g(w,n){return s.get(w,(n==null?void 0:n.idProperty)||"_id")}function De(w,n){var U;return w&&((U=n.filter)!=null&&U.resourceIds)&&!n.order?n.filter.resourceIds.map(q=>w.find(e=>g(e,n)==q)).filter(q=>q!=null):w}const ue={detail:{allowMultiple:!0,autoEdit:!1,autoFromMultipleSelection:!0,autoFromSingleInsertion:!0,autoFromSingleSelection:!0,constrainToSelection:!0},filter:{namedFilter:null,query:null,resourceIds:null},idProperty:"_id",limit:5e3,limitTransientDataToLocalCollection:!0,loading:{firstPageSize:500,pageSize:5e3},order:[[{path:"history.creation.timestamp"},"desc"],[{path:"history.creation.orderInBatch"},"desc"]]},K={resources:[],remoteCollectionSize:null,status:"NotLoaded",selection:[],detailSelection:[],invalidResources:[],transientData:{}},te={editingDetailSelection:!1,batchSaveAttempted:!1,editors:[],listNavigators:{}},Ce=(w,n)=>{n=s.merge({},ue,n);const U=ae.defineStore(w,{state:()=>({idProperty:n.idProperty,filter:n.filter,order:n.order||null,referencePathsToExpand:n.referencePathsToExpand||null,...K,...te}),getters:{fixedQueryParams:e=>{var l,d,u,h;const r={};(l=e.filter)!=null&&l.namedFilter&&(r.namedFilter=e.filter.namedFilter);const t=[];if((d=e.filter)!=null&&d.resourceIds&&t.push({l:{path:e.idProperty},r:{constant:e.filter.resourceIds},operator:"in"}),(u=e.filter)!=null&&u.query&&t.push((h=e.filter)==null?void 0:h.query),t.length>0){const S=t.length==1?t[0]:{and:t};r.q=J(S)}return e.order&&(r.o=J(e.order)),e.referencePathsToExpand&&(r.r=J(e.referencePathsToExpand)),r}},actions:{reset(){for(const e in K)this[e]=K[e];for(const e in te)this[e]=te[e]},resetRetainingTransientData(){if(n.limitTransientDataToLocalCollection)this.reset();else{const e=this.transientData;this.reset(),this.transientData=e}},setEditingDetailSelection(e){this.editingDetailSelection=e},setFilter(e){s.isEqual(e,this.filter)||(this.filter=e,this.status="NotLoaded",this.resources=[],this.remoteCollectionSize=null,this.selection=[],this.detailSelection=[],this.invalidResources=[],this.editingDetailSelection=!1)},async setQuery(e){var r,t;if(!s.isEqual(e,(r=this.filter)==null?void 0:r.query)&&(e!=null||((t=this.filter)==null?void 0:t.query)!=null)){const l=s.cloneDeep(this.filter)||{};e!==null?l.query=e:s.unset(l,"query");const d=this.status;this.setFilter(l),d!="NotLoaded"&&await this.loadResources()}},async setFilterResourceIds(e){if(!s.isEqual(e,s.get(this.filter,"resourceIds"))){const r=s.cloneDeep(this.filter)||{};e!=null?r.resourceIds=e:s.unset(r,"resourceIds");const t=this.status;this.setFilter(r),t!="NotLoaded"&&await this.loadResources()}},setBatchSaveAttempted(e){e!=this.batchSaveAttempted&&(this.batchSaveAttempted=e)},clear(){for(const e in K)this[e]=K[e]},clearRetainingTransientData(){if(n.limitTransientDataToLocalCollection)this.reset();else{const e=this.transientData;this.reset(),this.transientData=e}},async ensureCollectionLoaded(){["Loaded","Loading","LoadingMore","Failed"].includes(this.status)||await this.loadResources()},async loadResources(e={}){this.resetRetainingTransientData();const r=I.v4();this._loadId=r,await this._loadResources(0,r,e)},async _loadResources(e,r,t){var A,F,b,k,Q;const l=e==0;if(this.status=l?"Loading":"LoadingMore",this._loadOffset=e,((A=this.filter)==null?void 0:A.query)===!1){this.resources=[],this.remoteCollectionSize=0;return}const d=this.fixedQueryParams,u=s.cloneDeep(d),h=l?(F=this.filter)!=null&&F.resourceIds&&!this.order?null:t.firstPageSize||((b=n.loading)==null?void 0:b.firstPageSize)||t.pageSize||((k=n.loading)==null?void 0:k.pageSize)||null:t.pageSize||((Q=n.loading)==null?void 0:Q.pageSize)||null,S=h!=null||n.limit!=null?s.min(s.filter([h,n.limit],m=>m!=null)):void 0;S!=null?(u.offset=e,u.limit=S):e!=0&&(u.offset=e);const D=s.map(u,(m,R)=>m!=null?`${encodeURIComponent(R)}=${encodeURIComponent(m)}`:null).filter(m=>m!=null).join("&"),L=s.isEmpty(D)?n.restCollectionUrl:`${n.restCollectionUrl}?${D}`;try{const m=await $.get(L),R=this.fixedQueryParams;if(r!=this._loadId||e!=this._loadOffset||!s.isEqual(d,R))console.log(`Discarding resources fetched by obsolete query from ${n.restCollectionUrl}.`);else{const C=ne.decode(s.get(m,"data.data",[])),T=(l?0:this.resources.length)+C.length,y=S==null||C.length<S||n.limit&&T>=n.limit;console.log(`Loaded ${C.length}${l?"":" more"} resources from ${n.restCollectionUrl}`),l&&(this.resources=[]);const X=[...this.resources,...C.map(Z=>Object.freeze(Z))];this.resources=De(X,this),s.get(m,"data.totalCollectionSize")?this.remoteCollectionSize=s.get(m,"data.totalCollectionSize"):this.remoteCollectionSize=null,this.status=y?"Loaded":"LoadingMore",y||this._loadResources(this.resources.length,r,t)}}catch(m){console.log(`Error while loading resources (URL="${L}"):`,m),this.clearRetainingTransientData(),this.status="Failed"}},async checkForDeletedResource(e){let r;try{r=await $.get(`${n.restCollectionUrl}/${e}`)}catch(t){$.isAxiosError(t)&&(r=t.response)}return r&&r.status==404?(this.recordDeletion(e),!0):!1},recordDeletion(e){var r;if(["Loaded","LoadingMore"].includes(this.status)){let t=this.resources.findIndex(l=>g(l,this)==e);t>=0&&this.resources.splice(t,1),t=this.selection.findIndex(l=>g(l,this)==e),t>=0&&this.selection.splice(t,1),t=this.detailSelection.findIndex(l=>g(l,this)==e),t>=0&&(this.detailSelection.splice(t,1),this.detailSelection.length==0&&(this.editingDetailSelection=((r=n.detail)==null?void 0:r.autoEdit)||!1)),n.limitTransientDataToLocalCollection&&delete this.transientData[e]}},recordInsertion(e,{insertAtBeginning:r,transientData:t}={}){var l;if(["Loaded","LoadingMore"].includes(this.status)){const d=Object.freeze(e);r?this.resources.unshift(d):this.resources.push(d),(l=n.detail)!=null&&l.autoFromSingleInsertion&&(this.detailSelection.length==0||this.detailSelection.length==1&&g(this.detailSelection[0],this)==null)&&(this.detailSelection=[d],this.editingDetailSelection=n.detail.autoEdit);const u=g(e,this);u&&(t===void 0?delete this.transientData[u]:this.transientData[u]=t)}},recordUpdate(e){const r=g(e,this);if(r&&["Loaded","LoadingMore"].includes(this.status)){const t=Object.freeze(e);let l=this.resources.findIndex(d=>g(d,this)==r);l>=0&&(this.resources[l]=t),l=this.selection.findIndex(d=>g(d,this)==r),l>=0&&(this.selection[l]=t),l=this.detailSelection.findIndex(d=>g(d,this)==r),l>=0&&(this.detailSelection[l]=t)}},async refreshResource(e){if(e){const r={};this.referencePathsToExpand&&(r.r=J(this.referencePathsToExpand));const t=s.map(r,(u,h)=>u!=null?`${encodeURIComponent(h)}=${encodeURIComponent(u)}`:null).filter(u=>u!=null).join("&"),l=s.isEmpty(t)?`${n.restCollectionUrl}/${e}`:`${n.restCollectionUrl}/${e}?${t}`,d=await $.get(l);if(d.status==200){const u=d.data;return this.recordUpdate(u),u}}return null},addResource(e={}){this.detailSelection=[s.omit(s.merge({},e),this.idProperty)],this.editingDetailSelection=!0},async deleteResource(e){if((await $.delete(`${n.restCollectionUrl}/${e}`)).status==200&&["Loaded","LoadingMore"].includes(this.status)){let t=this.resources.findIndex(l=>g(l,this)==e);t>=0&&this.resources.splice(t,1),t=this.selection.findIndex(l=>g(l,this)==e),t>=0&&this.selection.splice(t,1),t=this.detailSelection.findIndex(l=>g(l,this)==e),t>=0&&(this.detailSelection.splice(t,1),this.detailSelection.length==0&&(this.editingDetailSelection=n.detail.autoEdit)),n.limitTransientDataToLocalCollection&&delete this.transientData[e]}},async saveResource(e){const r=g(e,this),t=r==null,l=await $({method:t?"post":"put",url:t?n.restCollectionUrl:`${n.restCollectionUrl}/${r}`,data:e});if(l.status==200){const d=l.data,u=g(d,this),h=u?await this.refreshResource(u):null;return t&&this.recordInsertion(h||Object.freeze(d)),h||d}return null},async saveResources(e){const r=await $({method:"put",url:n.restCollectionUrl,data:e});if(r.status==200){const t=r.data||[],l=[];for(const[d,u]of t.entries()){const h=g(e[d],this)==null,S=g(u,this),D=S?await this.refreshResource(S):null;h&&this.recordInsertion(D||u),l.push(D||Object.freeze(u))}return l}return[]},clearTransientData(){this.transientData={}},setInvalidResourceIds(e){s.isEqual(e,this.invalidResources.map(r=>g(r,this)))||(this.invalidResources=e.map(r=>this.resources.find(t=>g(t,this)==r)).filter(r=>r!=null))},setTransientDataForResources(e){const{transientData:r,merge:t=!0}=e;t?s.merge(this.transientData,r):s.assign(this.transientData,r)},clearSelection(){this.setSelection([])},deselectResources(e){const r=this.selection.map(t=>g(t,this)).filter(t=>t!=null&&!e.includes(t));this.setSelection(r)},selectResources(e,r){const{addToSelection:t,edit:l}=r||{},d=this.selection.map(h=>g(h,this));let u=e;if(t){const h=s.difference(e,d);h.length>0&&(u=d.concat(h).filter(S=>S!=null))}s.isEqual(d,u)||this.setSelection(u,l)},setSelection(e,r){if(!s.isEqual(e,this.selection.map(t=>g(t,this)))){let t=!0;if(this.editors.length>0){if(n.detail.autoFromSingleSelection&&this.selection.length==1)t=!1;else if(n.detail.autoFromMultipleSelection&&n.detail.allowMultiple&&this.selection.length>1)t=!1;else if(n.detail.constrainToSelection){const l=this.selection.map(h=>g(h,this)),u=this.detailSelection.map(h=>g(h,this)).filter(h=>l.includes(h));this.detailSelection.filter(h=>!u.includes(g(h,this))).length>0&&(t=!1)}}if(!t)return;if(this.selection=e.map(l=>this.resources.find(d=>g(d,this)==l)).filter(l=>l!=null),n.detail.autoFromSingleSelection&&this.selection.length==1){const l=this.selection[0];(this.detailSelection.length!=1||g(this.detailSelection[0],this)!=g(l,this))&&(this.detailSelection=[l])}else if(n.detail.autoFromMultipleSelection&&n.detail.allowMultiple&&this.selection.length>1)s.isEqual(this.selection.map(l=>g(l,this)),this.detailSelection.map(l=>g(l,this)))||(this.detailSelection=s.clone(this.selection));else if(n.detail.constrainToSelection){const l=this.selection.map(h=>g(h,this)),d=this.detailSelection.map(h=>g(h,this)),u=d.filter(h=>l.includes(h));s.isEqual(u,d)||(this.detailSelection=this.detailSelection.filter(h=>u.includes(g(h,this))))}this.detailSelection.length==0?this.editingDetailSelection=!1:this.editingDetailSelection=r!==void 0?r:this.editingDetailSelection||n.detail.autoEdit}},hideDetail(){this.detailSelection.length>0&&(this.detailSelection=[],this.editingDetailSelection=!1)},showSelectionAsDetail(e){if(this.selection.length<=1||n.detail.allowMultiple){const r=this.selection.map(l=>g(l,this)),t=this.detailSelection.map(l=>g(l,this));s.isEqual(r,t)||(this.detailSelection=s.clone(this.selection)),this.detailSelection.length==0?this.editingDetailSelection=!1:this.editingDetailSelection=e!==void 0?e:this.editingDetailSelection||n.detail.autoEdit}},deregisterEditor(e){s.remove(this.editors,r=>r==e)},registerEditor(e){this.editors.includes(e)||this.editors.push(e)},deregisterListNavigator({name:e,listNavigator:r}){(r==null||this.listNavigators[e]==r)&&delete this.listNavigators[e]},registerListNavigator({name:e,listNavigator:r}){this.listNavigators[e]!=r&&(this.listNavigators[e]=r)}}});return(()=>{const e=(r,t)=>{const l=U(r,t);return ee.registerStore(l.$id,l),l};return e.$id=U.$id,e})()},ee=new ce,Ee=(w={})=>{var he,fe,ge,ve;const{collectionId:n,draftBatchId:U,enabled:q,resourceType:e,options:r}=w,t=a.ref(void 0),l=a.ref(n),d=a.ref(U),u=a.ref(q??!0),h=a.ref([a.toRef(e)]),S=a.ref(r),D=a.computed(()=>d.value),L=a.ref(u.value),A=a.ref(I.v4()),F=a.ref((fe=(he=S.value)==null?void 0:he.filter)==null?void 0:fe.resourceIds),b=a.ref((ve=(ge=S.value)==null?void 0:ge.filter)==null?void 0:ve.query),k=a.computed(()=>d.value==null&&l.value!=null&&ee.getStore(l.value)!=null),Q=a.ref(k.value),m=a.computed(()=>T("status","Uninitialized"));function R(i){if(t.value)return i(t.value)}async function C(i){if(t.value)return await i(t.value)}function T(i,c){if(t.value)return t.value[i];if(c!==void 0)return c;throw"Attempted to use a REST collection store that has not been created, with no default value."}const y=(i={})=>{var Re,Se,pe,ye;const{collectionId:c,draftBatchId:E,enabled:O,resourceType:re,options:me}=i;l.value=c,d.value=E,u.value=O??!0,h.value=[a.toRef(re)],me!=null&&(S.value=me,F.value=(Se=(Re=S.value)==null?void 0:Re.filter)==null?void 0:Se.resourceIds,b.value=(ye=(pe=S.value)==null?void 0:pe.filter)==null?void 0:ye.query),A.value=I.v4(),X(u.value)},X=async i=>{i!=L.value&&(L.value=i,i&&(_(),x()))},Z=async i=>{F.value=i,await C(async c=>await c.setFilterResourceIds(F.value||null))},V=async i=>{if(b.value=i,m.value!="Uninitialized"){const c=i,E=a.computed(()=>s.isFunction(c)?p.value?c(p.value):null:c);await C(O=>O.setQuery(E.value||null))}},_=()=>{S.value=s.merge({},S.value||{},{filter:{resourceIds:F.value,query:b.value}})},p=a.computed(()=>h.value[0].value||void 0),B=function(i){const c=s.get(i,"filter.query"),E=s.get(i,"referencePathsToExpand"),O=s.isFunction(c)?c(p.value):c,re=p.value?s.isFunction(E)?E(p.value):E||[]:[];return{...s.cloneDeep(i||{}),filter:{...s.cloneDeep((i==null?void 0:i.filter)||{}),query:O},referencePathsToExpand:re}},P=a.computed(()=>B(S.value)),M=a.computed(()=>{if(!p.value)return null;if(P.value.restCollectionUrl!==void 0)return P.value.restCollectionUrl;if(!Q.value)return!p.value||!p.value.collectionName?null:D.value?`${G.config.apiBaseUrl}/draft-batches/${D.value}/${p.value.collectionName}`:`${G.config.apiBaseUrl}/${p.value.collectionName}`}),o=a.computed(()=>{var i;if(p.value)return s.mergeWith(s.cloneDeep(ue),P.value,{idProperty:(i=p.value)==null?void 0:i.idProperty,restCollectionUrl:M.value||""},(c,E)=>{if(s.isArray(E)&&E.length==0&&(c==null||s.isArray(c)))return E})}),f=a.ref(0),N=a.computed(()=>{var i;return f.value,l.value||p.value&&((i=p.value)==null?void 0:i.collectionName)&&(D.value?`draftBatches/${D.value}/${p.value.collectionName}/${A.value}`:`${p.value.collectionName}/${A.value}`)||null}),x=()=>{if(L.value){let i=!1;return p.value&&N.value&&(t.value=ee.getStore(N.value),t.value?i=!1:o.value&&(Q.value=!1,t.value=Ce(N.value,o.value)(),i=!0)),i}else return!1},H=()=>{N.value&&l.value==N.value?(t.value=void 0,x()):(t.value=void 0,f.value=f.value+1,x())};a.watch(D,(i,c)=>{s.isEqual(i,c)||H()}),a.watch(L,(i,c)=>{i!=c&&(i?x():t.value=void 0)}),a.watch(p,(i,c)=>{i&&!c?x():!i&&c||s.isEqual(i,c)||H()}),a.watch(o,(i,c)=>{s.isEqual(i,c)||H()}),a.watch(k,()=>{k.value||(Q.value=!1)}),a.watch(N,()=>x()),a.watch(M,(i,c)=>{s.isEqual(i,c)||H()});const W=[],qe=function(i){m.value!="Uninitialized"?a.nextTick(i):W.push(i)};return a.watch(m,(i,c)=>{if(i!="Uninitialized"&&c=="Uninitialized"){const E=s.clone(W);W.splice(0,W.length);for(const O of E)O()}}),x(),{collectionId:N,draftBatchId:D,resourceType:p,enabled:L,status:m,batchSaveAttempted:a.computed(()=>T("batchSaveAttempted",!1)),listNavigators:a.computed(()=>T("listNavigators",!1)),invalidResources:a.computed(()=>T("invalidResources",[])),resources:a.computed(()=>m.value!="Uninitialized"?(C(i=>i.ensureCollectionLoaded()),T("resources",[])):[]),remoteCollectionSize:a.computed(()=>T("remoteCollectionSize",null)),transientData:a.computed(()=>T("transientData",[])),detailSelection:a.computed(()=>T("detailSelection",[])),editingDetailSelection:a.computed(()=>T("editingDetailSelection",!1)),selection:a.computed(()=>T("selection",[])),reconfigureCollection:y,setEditingDetailSelection:i=>R(c=>c.setEditingDetailSelection(i)),setEnabled:X,setFilterResourceIds:Z,setQuery:V,ensureStore:x,setBatchSaveAttempted:i=>R(c=>c.setBatchSaveAttempted(i)),clear:()=>R(i=>i.clear()),ensureCollectionLoaded:async()=>await C(async i=>i.ensureCollectionLoaded()),loadResources:async()=>await C(async i=>await i.loadResources()),addResource:i=>R(c=>c.addResource(i)),checkForDeletedResource:async i=>await C(async c=>await c.checkForDeletedResource(i))==!0,recordDeletion:i=>R(c=>c.recordDeletion(i)),recordInsertion:(i,{insertAtBeginning:c=!1,transientData:E=void 0}={})=>R(O=>O.recordInsertion(i,{insertAtBeginning:c,transientData:E})),recordUpdate:i=>R(c=>c.recordUpdate(i)),refreshResource:async i=>await C(async c=>await c.refreshResource(i)),deleteResource:async i=>await C(async c=>await c.deleteResource(i)),saveResource:async i=>await C(async c=>await c.saveResource(i)),saveResources:async i=>await C(async c=>await c.saveResources(i)),clearTransientData:()=>R(i=>i.clearTransientData()),setInvalidResourceIds:i=>R(c=>c.setInvalidResourceIds(i)),setTransientDataForResources:i=>R(c=>c.setTransientDataForResources(i)),clearSelection:()=>R(i=>i.clearSelection()),deselectResources:i=>R(c=>c.deselectResources(i)),selectResources:(i,c)=>R(E=>E.selectResources(i,c)),hideDetail:()=>R(i=>i.hideDetail()),deregisterEditor:i=>R(c=>c.deregisterEditor(i)),registerEditor:i=>R(c=>c.registerEditor(i)),deregisterListNavigator:i=>R(c=>c.deregisterListNavigator(i)),registerListNavigator:i=>R(c=>c.registerListNavigator(i)),onItemsStoreReady:qe}},Ue=()=>{ee.clearAllStores()};function ie(w,n){return s.get(w,(n==null?void 0:n.idProperty)||"_id")}const de={idProperty:"_id"},Y={resource:null,status:"NotLoaded"},Te=(w,n)=>{n=s.merge({},de,n);const U=ae.defineStore(w,{state:()=>({idProperty:n.idProperty,resourceId:n.resourceId||null,resourceUrl:n.resourceUrl||null,referencePathsToExpand:n.referencePathsToExpand||null,...Y}),getters:{currentResourceUrl:e=>e.resourceUrl||(n.restCollectionUrl&&e.resourceId?`${n.restCollectionUrl}/${e.resourceId}`:null)||n.restCollectionUrl||null,fixedQueryParams:e=>{const r={};return e.referencePathsToExpand&&(r.r=J(e.referencePathsToExpand)),r}},actions:{reset(){for(const e in Y)this[e]=Y[e]},async setResourceId(e){const r=this.currentResourceUrl;this.resourceId=e,!s.isEqual(this.currentResourceUrl,r)&&this.status!="NotLoaded"&&await this.loadResource()},async setResourceUrl(e){const r=this.currentResourceUrl;this.resourceUrl=e,!s.isEqual(this.currentResourceUrl,r)&&this.status!="NotLoaded"&&await this.loadResource()},clear(){for(const e in Y)this[e]=Y[e]},async ensureResourceLoaded(){["Loaded","Loading","Failed"].includes(this.status)||await this.loadResource()},async loadResource(){this.reset();const e=I.v4();if(this._loadId=e,this.currentResourceUrl){this.status="Loading";const r=this.fixedQueryParams,t=s.cloneDeep(r),l=s.map(t,(u,h)=>u!=null?`${encodeURIComponent(h)}=${encodeURIComponent(u)}`:null).filter(u=>u!=null).join("&"),d=s.isEmpty(l)?this.currentResourceUrl:`${this.currentResourceUrl}?${l}`;try{const u=await $.get(d),h=this.fixedQueryParams;e!=this._loadId||!s.isEqual(r,h)?console.log(`Discarding resource fetched by obsolete query from ${d}.`):(this.resource=ne.decode(s.get(u,"data",{})),this.status="Loaded")}catch(u){console.log(`Error while loading resource (URL="${d}")`,u),this.reset(),this.status="Failed"}}else throw"Cannot load a resource because its URL, or its ID and collection URL, are unknown."},async checkForDeletedResource(){if(this.currentResourceUrl){let e;try{e=await $.get(this.currentResourceUrl)}catch(r){$.isAxiosError(r)&&(e=r.response)}return e&&e.status==404?(this.recordDeletion(),!0):!1}else throw"Cannot check for a deleted resource because its URL, or its ID and collection URL, are unknown."},recordDeletion(){this.resource=null,this.status="Loaded"},recordInsertion(e){this.resourceId=ie(e,this)||null,this.status=="Loaded"&&(this.resource=Object.freeze(e))},recordUpdate(e){this.resourceId=ie(e,this)||null,this.status=="Loaded"&&(this.resource=Object.freeze(e))},async refreshResource(){return await this.loadResource(),this.resource},async deleteResource(){if(this.currentResourceUrl)(await $.delete(this.currentResourceUrl)).status==200&&this.recordDeletion();else throw"Cannot delete a resource because its URL, or its ID and collection URL, are unknown."},async saveResource(e){const r=ie(e,this),t=r==null;if(!r)throw"The REST resource store cannot create new resources on the server.";if(!this.currentResourceUrl)throw"Cannot save a resource because its URL, or its ID and collection URL, are unknown.";const l=await $({method:t?"post":"put",url:this.currentResourceUrl,data:e});if(l.status==200){const d=l.data,u=await this.refreshResource();return t&&this.recordInsertion(u||d),u||Object.freeze(d)}return null},async makeCustomApiRequest(e){const{method:r,subpath:t,url:l,data:d}=e;let u=l;if(!u)if(this.currentResourceUrl)u=`${this.currentResourceUrl}/${t}`;else throw"Cannot make a custom API request for a resource because its URL, or its ID and collection URL, are unknown.";const h=await $({method:r||"get",url:u,data:d});return h.status>=200&&h.status<300?h.data:null}}});return(()=>{const e=(r,t)=>{const l=U(r,t);return se.registerStore(l.$id,l),l};return e.$id=U.$id,e})()},se=new ce,Le=(w={})=>{const{resourceClientId:n,draftBatchId:U,enabled:q,resourceType:e,options:r}=w,t=a.ref(void 0),l=a.ref(n),d=a.ref(U),u=a.ref(q??!0),h=a.ref([a.toRef(e)]),S=a.ref(r),D=a.computed(()=>d.value),L=a.ref(u.value),A=a.ref(I.v4()),F=a.computed(()=>d.value==null&&l.value!=null&&se.getStore(l.value)!=null),b=a.ref(F.value),k=a.computed(()=>R("status","Uninitialized"));function Q(o){if(t.value)return o(t.value)}async function m(o){if(t.value)return await o(t.value)}function R(o,f){if(t.value)return t.value[o];if(f!==void 0)return f;throw"Attempted to use a REST resource store that has not been created, with no default value."}const C=(o={})=>{const{resourceClientId:f,draftBatchId:N,enabled:x,resourceType:H,options:W}=o;l.value=f,d.value=N,u.value=x??!0,h.value=[a.toRef(H)],W!=null&&(S.value=W),A.value=I.v4(),T(u.value)},T=async o=>{o!=L.value&&(L.value=o,o&&P())},y=a.computed(()=>h.value[0].value||void 0),X=function(o){const f=s.get(o,"referencePathsToExpand"),N=y.value?s.isFunction(f)?f(y.value):f||[]:[];return{...s.cloneDeep(o||{}),referencePathsToExpand:N}},Z=a.computed(()=>X(S.value)),V=a.computed(()=>{if(!y.value)return null;if(!b.value)return!y.value||!y.value.collectionName?null:D.value?`${G.config.apiBaseUrl}/draft-batches/${D.value}/${y.value.collectionName}`:`${G.config.apiBaseUrl}/${y.value.collectionName}`}),_=a.computed(()=>{if(y.value&&V.value)return s.mergeWith(s.cloneDeep(de),Z.value,{idProperty:y.value.idProperty,restCollectionUrl:V.value},(o,f)=>{if(s.isArray(f)&&f.length==0&&(o==null||s.isArray(o)))return f})}),p=a.ref(0),B=a.computed(()=>{var o;return p.value,l.value||y.value&&((o=y.value)==null?void 0:o.collectionName)&&(D.value?`draftBatches/${D.value}/${y.value.collectionName}/${A.value}`:`${y.value.collectionName}/${A.value}`)||null}),P=()=>{if(L.value){let o=!1;return y.value&&B.value&&(t.value=se.getStore(B.value),t.value?o=!1:_.value&&(b.value=!1,t.value=Te(B.value,_.value)(),o=!0)),o}else return!1},M=()=>{B.value&&l.value==B.value?(t.value=void 0,P()):(t.value=void 0,p.value=p.value+1,P())};return a.watch(D,(o,f)=>{s.isEqual(o,f)||M()}),a.watch(L,(o,f)=>{o!=f&&(o?P():t.value=void 0)}),a.watch(y,(o,f)=>{o&&!f?P():!o&&f||s.isEqual(o,f)||M()}),a.watch(_,(o,f)=>{s.isEqual(o,f)||M()}),a.watch(F,()=>{F.value||(b.value=!1)}),a.watch(B,()=>P()),a.watch(V,(o,f)=>{s.isEqual(o,f)||M()}),P(),{resourceClientId:B,draftBatchId:D,enabled:L,resourceType:y,status:k,resource:a.computed(()=>k.value!="Uninitialized"?(m(o=>o.ensureResourceLoaded()),R("resource",[])):[]),resourceId:a.computed(()=>R("resourceId",null)),resourceUrl:a.computed(()=>R("resourceUrl",null)),reconfigureClient:C,setEnabled:T,setResourceId:async o=>await m(async f=>await f.setResourceId(o)),setResourceUrl:async o=>await m(async f=>await f.setResourceUrl(o)),ensureStore:P,clear:()=>Q(o=>o.clear()),ensureResourceLoaded:async()=>await m(async o=>o.ensureResourceLoaded()),loadResource:async()=>await m(async o=>await o.loadResource()),checkForDeletedResource:async()=>await m(async o=>await o.checkForDeletedResource())==!0,recordDeletion:()=>m(o=>o.recordDeletion()),recordInsertion:o=>m(f=>f.recordInsertion(o)),recordUpdate:o=>m(f=>f.recordUpdate(o)),refreshResource:async()=>await m(async o=>await o.refreshResource()),deleteResource:async()=>await m(async o=>await o.deleteResource()),saveResource:async o=>await m(async f=>await f.saveResource(o)),makeCustomApiRequest:async o=>await m(async f=>await f.makeCustomApiRequest(o))}},G={config:{...oe}};function $e(w){G.config=s.merge({},oe,w)}v.ApiClientError=we,v.clearAllRestCollections=Ue,v.initRestClient=$e,v.restClient=G,v.useRestCollection=Ee,v.useRestResource=Le,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
@@ -142,6 +142,8 @@ export interface RestCollection<T extends Resource = Resource> {
142
142
  invalidResources: Ref<T[]>;
143
143
  /** The array of resources that have been loaded from the REST API into the local collection. */
144
144
  resources: Ref<T[]>;
145
+ /** The total number of resources available in the remote collection. */
146
+ remoteCollectionSize: Ref<number | null>;
145
147
  /** Transient data that a client has associated with the resources via {@link setTransientDataForResources}. */
146
148
  transientData: Ref<any[]>;
147
149
  /** Resources in the current detail view, a sublist of {@link resources}. */
@@ -1 +1 @@
1
- {"version":3,"file":"rest-collection.d.ts","sourceRoot":"","sources":["../../src/rest-collection.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0B,GAAG,EAAe,MAAM,KAAK,CAAA;AAI9D,OAAO,EAAC,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,iBAAiB,EAAE,CAAC,QAAQ,EAAE,gCAAgC,KAAK,IAAI,CAAA;CACxE;6DAEsD,qBAAqB;AAA5E,wBAwcC;AAED,eAAO,MAAM,uBAAuB,YAA2C,CAAA"}
@@ -41,7 +41,7 @@ export interface RestCollectionStoreState {
41
41
  order: QueryOrder | null;
42
42
  referencePathsToExpand: string[] | null;
43
43
  resources: Resource[];
44
- totalNumResources: number | null;
44
+ remoteCollectionSize: number | null;
45
45
  status: RestCollectionStoreStatus;
46
46
  selection: Resource[];
47
47
  detailSelection: Resource[];
@@ -98,7 +98,7 @@ declare const makeStore: (storeId: string, options: RestCollectionStoreOptions)
98
98
  }, import("../queries.js").QueryOrderDirection])[] | null;
99
99
  referencePathsToExpand: string[] | null;
100
100
  resources: Resource[];
101
- totalNumResources: number | null;
101
+ remoteCollectionSize: number | null;
102
102
  status: RestCollectionStoreStatus;
103
103
  selection: Resource[];
104
104
  detailSelection: Resource[];
@@ -448,7 +448,7 @@ export declare const storeRegistry: StoreRegistry<import("pinia").Store<string,
448
448
  }, import("../queries.js").QueryOrderDirection])[] | null;
449
449
  referencePathsToExpand: string[] | null;
450
450
  resources: Resource[];
451
- totalNumResources: number | null;
451
+ remoteCollectionSize: number | null;
452
452
  status: RestCollectionStoreStatus;
453
453
  selection: Resource[];
454
454
  detailSelection: Resource[];
@@ -1 +1 @@
1
- {"version":3,"file":"rest-collection-store.d.ts","sourceRoot":"","sources":["../../../src/stores/rest-collection-store.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,sBAAsB,EAAE,sBAAsB,EAAC,MAAM,uBAAuB,CAAA;AACpF,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,iCAAiC,CAAA;AACpE,OAAO,EAAC,WAAW,EAAE,UAAU,EAAC,MAAM,eAAe,CAAA;AACrD,OAAO,EAAC,aAAa,EAAC,MAAM,2BAA2B,CAAA;AAsBvD,2FAA2F;AAC3F,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MA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