rest-client-vue 1.1.1-b6 → 1.1.1-b9

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
@@ -127,6 +127,17 @@ export declare interface RestCollection<T extends Resource = Resource> {
127
127
  * To allow for asynchronous loading of resource types, this may be undefined.
128
128
  */
129
129
  resourceType: Ref<ResourceType | undefined>;
130
+ /**
131
+ * The REST collection URL, either as specified in {@link RestCollectionOptions.options} or calculated from the entity
132
+ * type and draft batch ID.
133
+ *
134
+ * Two special cases arise:
135
+ * - restCollectionUrl is undefined when the REST collection is configured to use an existing store. (This may be
136
+ * addressed in future work.)
137
+ * - restCollectionUrl is null when the URL could not be calculated because the entity type was missing or lacked a
138
+ * REST collection name. In this case the collection will not be functional.
139
+ */
140
+ restCollectionUrl: Ref<string | null | undefined>;
130
141
  /** A status indicating whether resources have been loaded yet from the REST API. */
131
142
  status: Ref<RestCollectionStatus>;
132
143
  batchSaveAttempted: Ref<boolean>;
@@ -4,7 +4,7 @@ var ae = (f, s, R) => (Ce(f, typeof s != "symbol" ? s + "" : s, R), R), Te = (f,
4
4
  if (!s.has(f))
5
5
  throw TypeError("Cannot " + R);
6
6
  };
7
- var Q = (f, s, R) => (Te(f, s, "read from private field"), R ? R.call(f) : s.get(f)), Se = (f, s, R) => {
7
+ var M = (f, s, R) => (Te(f, s, "read from private field"), R ? R.call(f) : s.get(f)), Se = (f, s, R) => {
8
8
  if (s.has(f))
9
9
  throw TypeError("Cannot add the same private member more than once");
10
10
  s instanceof WeakSet ? s.add(f) : s.set(f, R);
@@ -34,17 +34,17 @@ class Ie {
34
34
  Se(this, k, {});
35
35
  }
36
36
  clearAllStores() {
37
- for (const s in Q(this, k))
38
- Q(this, k)[s].clear();
37
+ for (const s in M(this, k))
38
+ M(this, k)[s].clear();
39
39
  }
40
40
  destroyStore(s) {
41
- Q(this, k)[s] && (Q(this, k)[s].$dispose(), delete Q(this, k)[s]);
41
+ M(this, k)[s] && (M(this, k)[s].$dispose(), delete M(this, k)[s]);
42
42
  }
43
43
  getStore(s) {
44
- return Q(this, k)[s];
44
+ return M(this, k)[s];
45
45
  }
46
46
  registerStore(s, R) {
47
- Q(this, k)[s] = R;
47
+ M(this, k)[s] = R;
48
48
  }
49
49
  }
50
50
  k = new WeakMap();
@@ -744,9 +744,7 @@ const De = {
744
744
  propertyBlacklist: te,
745
745
  referencePathsToExpand: ie
746
746
  };
747
- }, x = S(() => _(y.value)), M = S(() => {
748
- if (!p.value)
749
- return null;
747
+ }, x = S(() => _(y.value)), Q = S(() => {
750
748
  if (x.value.restCollectionUrl !== void 0)
751
749
  return x.value.restCollectionUrl;
752
750
  if (!O.value)
@@ -759,7 +757,7 @@ const De = {
759
757
  x.value,
760
758
  {
761
759
  idProperty: (i = p.value) == null ? void 0 : i.idProperty,
762
- restCollectionUrl: M.value || ""
760
+ restCollectionUrl: Q.value || ""
763
761
  },
764
762
  (o, w) => {
765
763
  if (a.isArray(w) && w.length == 0 && (o == null || a.isArray(o)))
@@ -790,7 +788,7 @@ const De = {
790
788
  a.isEqual(i, o) || G();
791
789
  }), T(B, () => {
792
790
  B.value || (O.value = !1);
793
- }), T(N, () => b()), T(M, (i, o) => {
791
+ }), T(N, () => b()), T(Q, (i, o) => {
794
792
  a.isEqual(i, o) || G();
795
793
  });
796
794
  const j = [], Ee = function(i) {
@@ -808,6 +806,7 @@ const De = {
808
806
  collectionId: N,
809
807
  draftBatchId: U,
810
808
  resourceType: p,
809
+ restCollectionUrl: Q,
811
810
  // Status
812
811
  enabled: L,
813
812
  status: g,
@@ -1191,21 +1190,21 @@ const Ue = {
1191
1190
  return D.value && _.value && (t.value = ce.getStore(_.value), t.value ? n = !1 : Y.value && (A.value = !1, t.value = xe(_.value, Y.value)(), n = !0)), n;
1192
1191
  } else
1193
1192
  return !1;
1194
- }, M = () => {
1193
+ }, Q = () => {
1195
1194
  _.value && l.value == _.value ? (t.value = void 0, x()) : (t.value = void 0, p.value = p.value + 1, x());
1196
1195
  };
1197
1196
  return T(U, (n, h) => {
1198
- a.isEqual(n, h) || M();
1197
+ a.isEqual(n, h) || Q();
1199
1198
  }), T(L, (n, h) => {
1200
1199
  n != h && (n ? x() : t.value = void 0);
1201
1200
  }), T(D, (n, h) => {
1202
- n && !h ? x() : !n && h || a.isEqual(n, h) || M();
1201
+ n && !h ? x() : !n && h || a.isEqual(n, h) || Q();
1203
1202
  }), T(Y, (n, h) => {
1204
- a.isEqual(n, h) || M();
1203
+ a.isEqual(n, h) || Q();
1205
1204
  }), T(F, () => {
1206
1205
  F.value || (A.value = !1);
1207
1206
  }), T(_, () => x()), T(K, (n, h) => {
1208
- a.isEqual(n, h) || M();
1207
+ a.isEqual(n, h) || Q();
1209
1208
  }), x(), {
1210
1209
  // Configuration
1211
1210
  resourceClientId: _,
@@ -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,a,$,oe,G,ce){"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 ae=(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 A;const ue={apiBaseUrl:"",useVueLogger:!1};class we extends Error{constructor(U,q=void 0,e=void 0){super(U);ae(this,"context");ae(this,"innerError");this.context=q,this.innerError=e}}class de{constructor(){Ie(this,A,{})}clearAllStores(){for(const n in j(this,A))j(this,A)[n].clear()}destroyStore(n){j(this,A)[n]&&(j(this,A)[n].$dispose(),delete j(this,A)[n])}getStore(n){return j(this,A)[n]}registerStore(n,U){j(this,A)[n]=U}}A=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 he={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.indexInBatch"},"desc"]]},K={resources:[],remoteCollectionSize:null,status:"NotLoaded",selection:[],detailSelection:[],invalidResources:[],transientData:{}},se={editingDetailSelection:!1,batchSaveAttempted:!1,editors:[],listNavigators:{}},Ce=(w,n)=>{n=s.merge({},he,n);const U=ce.defineStore(w,{state:()=>({idProperty:n.idProperty,filter:n.filter,order:n.order||null,propertyBlacklist:n.propertyBlacklist||null,referencePathsToExpand:n.referencePathsToExpand||null,...K,...se}),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=G(S)}return e.order&&(r.o=G(e.order)),e.propertyBlacklist&&(r.ex=G(e.propertyBlacklist)),e.referencePathsToExpand&&(r.r=G(e.referencePathsToExpand)),r}},actions:{reset(){for(const e in K)this[e]=K[e];for(const e in se)this[e]=se[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 b,N,k,B,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.remoteCollectionSize=0;return}const d=this.fixedQueryParams,u=s.cloneDeep(d),h=l?(N=this.filter)!=null&&N.resourceIds&&!this.order?null:t.firstPageSize||((k=n.loading)==null?void 0:k.firstPageSize)||t.pageSize||((B=n.loading)==null?void 0:B.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],p=>p!=null)):void 0;S!=null?(u.offset=e,u.limit=S):e!=0&&(u.offset=e);const D=s.map(u,(p,m)=>p!=null?`${encodeURIComponent(m)}=${encodeURIComponent(p)}`:null).filter(p=>p!=null).join("&"),L=s.isEmpty(D)?n.restCollectionUrl:`${n.restCollectionUrl}?${D}`;try{const p=await $.get(L),m=this.fixedQueryParams;if(r!=this._loadId||e!=this._loadOffset||!s.isEqual(d,m))console.log(`Discarding resources fetched by obsolete query from ${n.restCollectionUrl}.`);else{const C=oe.decode(s.get(p,"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 H=[...this.resources,...C.map(Z=>Object.freeze(Z))];this.resources=De(H,this),s.get(p,"data.totalCollectionSize")?this.remoteCollectionSize=s.get(p,"data.totalCollectionSize"):this.remoteCollectionSize=null,this.status=y?"Loaded":"LoadingMore",y||this._loadResources(this.resources.length,r,t)}}catch(p){console.log(`Error while loading resources (URL="${L}"):`,p),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=G(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 de,Ee=(w={})=>{var ge,ve,pe,me;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),b=a.ref(I.v4()),N=a.ref((ve=(ge=S.value)==null?void 0:ge.filter)==null?void 0:ve.resourceIds),k=a.ref((me=(pe=S.value)==null?void 0:pe.filter)==null?void 0:me.query),B=a.computed(()=>d.value==null&&l.value!=null&&ee.getStore(l.value)!=null),Q=a.ref(B.value),p=a.computed(()=>T("status","Uninitialized"));function m(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 ie,Re,Se,ye;const{collectionId:c,draftBatchId:E,enabled:F,resourceType:ne,options:te}=i;l.value=c,d.value=E,u.value=F??!0,h.value=[a.toRef(ne)],te!=null&&(S.value=te,N.value=(Re=(ie=S.value)==null?void 0:ie.filter)==null?void 0:Re.resourceIds,k.value=(ye=(Se=S.value)==null?void 0:Se.filter)==null?void 0:ye.query),b.value=I.v4(),H(u.value)},H=async i=>{i!=L.value&&(L.value=i,i&&(_(),z()))},Z=async i=>{N.value=i,await C(async c=>await c.setFilterResourceIds(N.value||null))},V=async i=>{if(k.value=i,p.value!="Uninitialized"){const c=i,E=a.computed(()=>s.isFunction(c)?R.value?c(R.value):null:c);await C(F=>F.setQuery(E.value||null))}},_=()=>{S.value=s.merge({},S.value||{},{filter:{resourceIds:N.value,query:k.value}})},R=a.computed(()=>h.value[0].value||void 0),O=function(i){const c=s.get(i,"filter.query"),E=s.get(i,"propertyBlacklist"),F=s.get(i,"referencePathsToExpand"),ne=s.isFunction(c)?c(R.value):c,te=R.value?s.isFunction(E)?E(R.value):E||[]:[],ie=R.value?s.isFunction(F)?F(R.value):F||[]:[];return{...s.cloneDeep(i||{}),filter:{...s.cloneDeep((i==null?void 0:i.filter)||{}),query:ne},propertyBlacklist:te,referencePathsToExpand:ie}},P=a.computed(()=>O(S.value)),M=a.computed(()=>{if(!R.value)return null;if(P.value.restCollectionUrl!==void 0)return P.value.restCollectionUrl;if(!Q.value)return!R.value||!R.value.collectionName?null:D.value?`${X.config.apiBaseUrl}/draft-batches/${D.value}/${R.value.collectionName}`:`${X.config.apiBaseUrl}/${R.value.collectionName}`}),o=a.computed(()=>{var i;if(R.value)return s.mergeWith(s.cloneDeep(he),P.value,{idProperty:(i=R.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),x=a.computed(()=>{var i;return f.value,l.value||R.value&&((i=R.value)==null?void 0:i.collectionName)&&(D.value?`draftBatches/${D.value}/${R.value.collectionName}/${b.value}`:`${R.value.collectionName}/${b.value}`)||null}),z=()=>{if(L.value){let i=!1;return R.value&&x.value&&(t.value=ee.getStore(x.value),t.value?i=!1:o.value&&(Q.value=!1,t.value=Ce(x.value,o.value)(),i=!0)),i}else return!1},J=()=>{x.value&&l.value==x.value?(t.value=void 0,z()):(t.value=void 0,f.value=f.value+1,z())};a.watch(D,(i,c)=>{s.isEqual(i,c)||J()}),a.watch(L,(i,c)=>{i!=c&&(i?z():t.value=void 0)}),a.watch(R,(i,c)=>{i&&!c?z():!i&&c||s.isEqual(i,c)||J()}),a.watch(o,(i,c)=>{s.isEqual(i,c)||J()}),a.watch(B,()=>{B.value||(Q.value=!1)}),a.watch(x,()=>z()),a.watch(M,(i,c)=>{s.isEqual(i,c)||J()});const W=[],qe=function(i){p.value!="Uninitialized"?a.nextTick(i):W.push(i)};return a.watch(p,(i,c)=>{if(i!="Uninitialized"&&c=="Uninitialized"){const E=s.clone(W);W.splice(0,W.length);for(const F of E)F()}}),z(),{collectionId:x,draftBatchId:D,resourceType:R,enabled:L,status:p,batchSaveAttempted:a.computed(()=>T("batchSaveAttempted",!1)),listNavigators:a.computed(()=>T("listNavigators",!1)),invalidResources:a.computed(()=>T("invalidResources",[])),resources:a.computed(()=>p.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=>m(c=>c.setEditingDetailSelection(i)),setEnabled:H,setFilterResourceIds:Z,setQuery:V,ensureStore:z,setBatchSaveAttempted:i=>m(c=>c.setBatchSaveAttempted(i)),clear:()=>m(i=>i.clear()),ensureCollectionLoaded:async()=>await C(async i=>i.ensureCollectionLoaded()),loadResources:async()=>await C(async i=>await i.loadResources()),addResource:i=>m(c=>c.addResource(i)),checkForDeletedResource:async i=>await C(async c=>await c.checkForDeletedResource(i))==!0,recordDeletion:i=>m(c=>c.recordDeletion(i)),recordInsertion:(i,{insertAtBeginning:c=!1,transientData:E=void 0}={})=>m(F=>F.recordInsertion(i,{insertAtBeginning:c,transientData:E})),recordUpdate:i=>m(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:()=>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(E=>E.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}},Ue=()=>{ee.clearAllStores()};function re(w,n){return s.get(w,(n==null?void 0:n.idProperty)||"_id")}const fe={idProperty:"_id"},Y={resource:null,status:"NotLoaded"},Te=(w,n)=>{n=s.merge({},fe,n);const U=ce.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=G(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=oe.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=re(e,this)||null,this.status=="Loaded"&&(this.resource=Object.freeze(e))},recordUpdate(e){this.resourceId=re(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=re(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 le.registerStore(l.$id,l),l};return e.$id=U.$id,e})()},le=new de,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),b=a.ref(I.v4()),N=a.computed(()=>d.value==null&&l.value!=null&&le.getStore(l.value)!=null),k=a.ref(N.value),B=a.computed(()=>m("status","Uninitialized"));function Q(o){if(t.value)return o(t.value)}async function p(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 C=(o={})=>{const{resourceClientId:f,draftBatchId:x,enabled:z,resourceType:J,options:W}=o;l.value=f,d.value=x,u.value=z??!0,h.value=[a.toRef(J)],W!=null&&(S.value=W),b.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),H=function(o){const f=s.get(o,"referencePathsToExpand"),x=y.value?s.isFunction(f)?f(y.value):f||[]:[];return{...s.cloneDeep(o||{}),referencePathsToExpand:x}},Z=a.computed(()=>H(S.value)),V=a.computed(()=>{if(!y.value)return null;if(!k.value)return!y.value||!y.value.collectionName?null:D.value?`${X.config.apiBaseUrl}/draft-batches/${D.value}/${y.value.collectionName}`:`${X.config.apiBaseUrl}/${y.value.collectionName}`}),_=a.computed(()=>{if(y.value&&V.value)return s.mergeWith(s.cloneDeep(fe),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})}),R=a.ref(0),O=a.computed(()=>{var o;return R.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(L.value){let o=!1;return y.value&&O.value&&(t.value=le.getStore(O.value),t.value?o=!1:_.value&&(k.value=!1,t.value=Te(O.value,_.value)(),o=!0)),o}else return!1},M=()=>{O.value&&l.value==O.value?(t.value=void 0,P()):(t.value=void 0,R.value=R.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(N,()=>{N.value||(k.value=!1)}),a.watch(O,()=>P()),a.watch(V,(o,f)=>{s.isEqual(o,f)||M()}),P(),{resourceClientId:O,draftBatchId:D,enabled:L,resourceType:y,status:B,resource:a.computed(()=>B.value!="Uninitialized"?(p(o=>o.ensureResourceLoaded()),m("resource",[])):[]),resourceId:a.computed(()=>m("resourceId",null)),resourceUrl:a.computed(()=>m("resourceUrl",null)),reconfigureClient:C,setEnabled:T,setResourceId:async o=>await p(async f=>await f.setResourceId(o)),setResourceUrl:async o=>await p(async f=>await f.setResourceUrl(o)),ensureStore:P,clear:()=>Q(o=>o.clear()),ensureResourceLoaded:async()=>await p(async o=>o.ensureResourceLoaded()),loadResource:async()=>await p(async o=>await o.loadResource()),checkForDeletedResource:async()=>await p(async o=>await o.checkForDeletedResource())==!0,recordDeletion:()=>p(o=>o.recordDeletion()),recordInsertion:o=>p(f=>f.recordInsertion(o)),recordUpdate:o=>p(f=>f.recordUpdate(o)),refreshResource:async()=>await p(async o=>await o.refreshResource()),deleteResource:async()=>await p(async o=>await o.deleteResource()),saveResource:async o=>await p(async f=>await f.saveResource(o)),makeCustomApiRequest:async o=>await p(async f=>await f.makeCustomApiRequest(o))}},X={config:{...ue}};function $e(w){X.config=s.merge({},ue,w)}v.ApiClientError=we,v.clearAllRestCollections=Ue,v.initRestClient=$e,v.restClient=X,v.useRestCollection=Ee,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,$,oe,G,ce){"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 ae=(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 M=(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 A;const ue={apiBaseUrl:"",useVueLogger:!1};class we extends Error{constructor(U,q=void 0,e=void 0){super(U);ae(this,"context");ae(this,"innerError");this.context=q,this.innerError=e}}class de{constructor(){Ie(this,A,{})}clearAllStores(){for(const n in M(this,A))M(this,A)[n].clear()}destroyStore(n){M(this,A)[n]&&(M(this,A)[n].$dispose(),delete M(this,A)[n])}getStore(n){return M(this,A)[n]}registerStore(n,U){M(this,A)[n]=U}}A=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 he={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.indexInBatch"},"desc"]]},K={resources:[],remoteCollectionSize:null,status:"NotLoaded",selection:[],detailSelection:[],invalidResources:[],transientData:{}},se={editingDetailSelection:!1,batchSaveAttempted:!1,editors:[],listNavigators:{}},Ce=(w,n)=>{n=s.merge({},he,n);const U=ce.defineStore(w,{state:()=>({idProperty:n.idProperty,filter:n.filter,order:n.order||null,propertyBlacklist:n.propertyBlacklist||null,referencePathsToExpand:n.referencePathsToExpand||null,...K,...se}),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=G(S)}return e.order&&(r.o=G(e.order)),e.propertyBlacklist&&(r.ex=G(e.propertyBlacklist)),e.referencePathsToExpand&&(r.r=G(e.referencePathsToExpand)),r}},actions:{reset(){for(const e in K)this[e]=K[e];for(const e in se)this[e]=se[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 b,N,k,B,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.remoteCollectionSize=0;return}const d=this.fixedQueryParams,u=s.cloneDeep(d),h=l?(N=this.filter)!=null&&N.resourceIds&&!this.order?null:t.firstPageSize||((k=n.loading)==null?void 0:k.firstPageSize)||t.pageSize||((B=n.loading)==null?void 0:B.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],p=>p!=null)):void 0;S!=null?(u.offset=e,u.limit=S):e!=0&&(u.offset=e);const D=s.map(u,(p,m)=>p!=null?`${encodeURIComponent(m)}=${encodeURIComponent(p)}`:null).filter(p=>p!=null).join("&"),L=s.isEmpty(D)?n.restCollectionUrl:`${n.restCollectionUrl}?${D}`;try{const p=await $.get(L),m=this.fixedQueryParams;if(r!=this._loadId||e!=this._loadOffset||!s.isEqual(d,m))console.log(`Discarding resources fetched by obsolete query from ${n.restCollectionUrl}.`);else{const C=oe.decode(s.get(p,"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 H=[...this.resources,...C.map(Z=>Object.freeze(Z))];this.resources=De(H,this),s.get(p,"data.totalCollectionSize")?this.remoteCollectionSize=s.get(p,"data.totalCollectionSize"):this.remoteCollectionSize=null,this.status=y?"Loaded":"LoadingMore",y||this._loadResources(this.resources.length,r,t)}}catch(p){console.log(`Error while loading resources (URL="${L}"):`,p),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=G(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 de,Ee=(w={})=>{var ge,ve,pe,me;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),b=a.ref(I.v4()),N=a.ref((ve=(ge=S.value)==null?void 0:ge.filter)==null?void 0:ve.resourceIds),k=a.ref((me=(pe=S.value)==null?void 0:pe.filter)==null?void 0:me.query),B=a.computed(()=>d.value==null&&l.value!=null&&ee.getStore(l.value)!=null),Q=a.ref(B.value),p=a.computed(()=>T("status","Uninitialized"));function m(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 ie,Re,Se,ye;const{collectionId:c,draftBatchId:E,enabled:F,resourceType:ne,options:te}=i;l.value=c,d.value=E,u.value=F??!0,h.value=[a.toRef(ne)],te!=null&&(S.value=te,N.value=(Re=(ie=S.value)==null?void 0:ie.filter)==null?void 0:Re.resourceIds,k.value=(ye=(Se=S.value)==null?void 0:Se.filter)==null?void 0:ye.query),b.value=I.v4(),H(u.value)},H=async i=>{i!=L.value&&(L.value=i,i&&(_(),z()))},Z=async i=>{N.value=i,await C(async c=>await c.setFilterResourceIds(N.value||null))},V=async i=>{if(k.value=i,p.value!="Uninitialized"){const c=i,E=a.computed(()=>s.isFunction(c)?R.value?c(R.value):null:c);await C(F=>F.setQuery(E.value||null))}},_=()=>{S.value=s.merge({},S.value||{},{filter:{resourceIds:N.value,query:k.value}})},R=a.computed(()=>h.value[0].value||void 0),O=function(i){const c=s.get(i,"filter.query"),E=s.get(i,"propertyBlacklist"),F=s.get(i,"referencePathsToExpand"),ne=s.isFunction(c)?c(R.value):c,te=R.value?s.isFunction(E)?E(R.value):E||[]:[],ie=R.value?s.isFunction(F)?F(R.value):F||[]:[];return{...s.cloneDeep(i||{}),filter:{...s.cloneDeep((i==null?void 0:i.filter)||{}),query:ne},propertyBlacklist:te,referencePathsToExpand:ie}},P=a.computed(()=>O(S.value)),j=a.computed(()=>{if(P.value.restCollectionUrl!==void 0)return P.value.restCollectionUrl;if(!Q.value)return!R.value||!R.value.collectionName?null:D.value?`${X.config.apiBaseUrl}/draft-batches/${D.value}/${R.value.collectionName}`:`${X.config.apiBaseUrl}/${R.value.collectionName}`}),o=a.computed(()=>{var i;if(R.value)return s.mergeWith(s.cloneDeep(he),P.value,{idProperty:(i=R.value)==null?void 0:i.idProperty,restCollectionUrl:j.value||""},(c,E)=>{if(s.isArray(E)&&E.length==0&&(c==null||s.isArray(c)))return E})}),f=a.ref(0),x=a.computed(()=>{var i;return f.value,l.value||R.value&&((i=R.value)==null?void 0:i.collectionName)&&(D.value?`draftBatches/${D.value}/${R.value.collectionName}/${b.value}`:`${R.value.collectionName}/${b.value}`)||null}),z=()=>{if(L.value){let i=!1;return R.value&&x.value&&(t.value=ee.getStore(x.value),t.value?i=!1:o.value&&(Q.value=!1,t.value=Ce(x.value,o.value)(),i=!0)),i}else return!1},J=()=>{x.value&&l.value==x.value?(t.value=void 0,z()):(t.value=void 0,f.value=f.value+1,z())};a.watch(D,(i,c)=>{s.isEqual(i,c)||J()}),a.watch(L,(i,c)=>{i!=c&&(i?z():t.value=void 0)}),a.watch(R,(i,c)=>{i&&!c?z():!i&&c||s.isEqual(i,c)||J()}),a.watch(o,(i,c)=>{s.isEqual(i,c)||J()}),a.watch(B,()=>{B.value||(Q.value=!1)}),a.watch(x,()=>z()),a.watch(j,(i,c)=>{s.isEqual(i,c)||J()});const W=[],qe=function(i){p.value!="Uninitialized"?a.nextTick(i):W.push(i)};return a.watch(p,(i,c)=>{if(i!="Uninitialized"&&c=="Uninitialized"){const E=s.clone(W);W.splice(0,W.length);for(const F of E)F()}}),z(),{collectionId:x,draftBatchId:D,resourceType:R,restCollectionUrl:j,enabled:L,status:p,batchSaveAttempted:a.computed(()=>T("batchSaveAttempted",!1)),listNavigators:a.computed(()=>T("listNavigators",!1)),invalidResources:a.computed(()=>T("invalidResources",[])),resources:a.computed(()=>p.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=>m(c=>c.setEditingDetailSelection(i)),setEnabled:H,setFilterResourceIds:Z,setQuery:V,ensureStore:z,setBatchSaveAttempted:i=>m(c=>c.setBatchSaveAttempted(i)),clear:()=>m(i=>i.clear()),ensureCollectionLoaded:async()=>await C(async i=>i.ensureCollectionLoaded()),loadResources:async()=>await C(async i=>await i.loadResources()),addResource:i=>m(c=>c.addResource(i)),checkForDeletedResource:async i=>await C(async c=>await c.checkForDeletedResource(i))==!0,recordDeletion:i=>m(c=>c.recordDeletion(i)),recordInsertion:(i,{insertAtBeginning:c=!1,transientData:E=void 0}={})=>m(F=>F.recordInsertion(i,{insertAtBeginning:c,transientData:E})),recordUpdate:i=>m(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:()=>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(E=>E.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}},Ue=()=>{ee.clearAllStores()};function re(w,n){return s.get(w,(n==null?void 0:n.idProperty)||"_id")}const fe={idProperty:"_id"},Y={resource:null,status:"NotLoaded"},Te=(w,n)=>{n=s.merge({},fe,n);const U=ce.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=G(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=oe.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=re(e,this)||null,this.status=="Loaded"&&(this.resource=Object.freeze(e))},recordUpdate(e){this.resourceId=re(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=re(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 le.registerStore(l.$id,l),l};return e.$id=U.$id,e})()},le=new de,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),b=a.ref(I.v4()),N=a.computed(()=>d.value==null&&l.value!=null&&le.getStore(l.value)!=null),k=a.ref(N.value),B=a.computed(()=>m("status","Uninitialized"));function Q(o){if(t.value)return o(t.value)}async function p(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 C=(o={})=>{const{resourceClientId:f,draftBatchId:x,enabled:z,resourceType:J,options:W}=o;l.value=f,d.value=x,u.value=z??!0,h.value=[a.toRef(J)],W!=null&&(S.value=W),b.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),H=function(o){const f=s.get(o,"referencePathsToExpand"),x=y.value?s.isFunction(f)?f(y.value):f||[]:[];return{...s.cloneDeep(o||{}),referencePathsToExpand:x}},Z=a.computed(()=>H(S.value)),V=a.computed(()=>{if(!y.value)return null;if(!k.value)return!y.value||!y.value.collectionName?null:D.value?`${X.config.apiBaseUrl}/draft-batches/${D.value}/${y.value.collectionName}`:`${X.config.apiBaseUrl}/${y.value.collectionName}`}),_=a.computed(()=>{if(y.value&&V.value)return s.mergeWith(s.cloneDeep(fe),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})}),R=a.ref(0),O=a.computed(()=>{var o;return R.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(L.value){let o=!1;return y.value&&O.value&&(t.value=le.getStore(O.value),t.value?o=!1:_.value&&(k.value=!1,t.value=Te(O.value,_.value)(),o=!0)),o}else return!1},j=()=>{O.value&&l.value==O.value?(t.value=void 0,P()):(t.value=void 0,R.value=R.value+1,P())};return a.watch(D,(o,f)=>{s.isEqual(o,f)||j()}),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)||j()}),a.watch(_,(o,f)=>{s.isEqual(o,f)||j()}),a.watch(N,()=>{N.value||(k.value=!1)}),a.watch(O,()=>P()),a.watch(V,(o,f)=>{s.isEqual(o,f)||j()}),P(),{resourceClientId:O,draftBatchId:D,enabled:L,resourceType:y,status:B,resource:a.computed(()=>B.value!="Uninitialized"?(p(o=>o.ensureResourceLoaded()),m("resource",[])):[]),resourceId:a.computed(()=>m("resourceId",null)),resourceUrl:a.computed(()=>m("resourceUrl",null)),reconfigureClient:C,setEnabled:T,setResourceId:async o=>await p(async f=>await f.setResourceId(o)),setResourceUrl:async o=>await p(async f=>await f.setResourceUrl(o)),ensureStore:P,clear:()=>Q(o=>o.clear()),ensureResourceLoaded:async()=>await p(async o=>o.ensureResourceLoaded()),loadResource:async()=>await p(async o=>await o.loadResource()),checkForDeletedResource:async()=>await p(async o=>await o.checkForDeletedResource())==!0,recordDeletion:()=>p(o=>o.recordDeletion()),recordInsertion:o=>p(f=>f.recordInsertion(o)),recordUpdate:o=>p(f=>f.recordUpdate(o)),refreshResource:async()=>await p(async o=>await o.refreshResource()),deleteResource:async()=>await p(async o=>await o.deleteResource()),saveResource:async o=>await p(async f=>await f.saveResource(o)),makeCustomApiRequest:async o=>await p(async f=>await f.makeCustomApiRequest(o))}},X={config:{...ue}};function $e(w){X.config=s.merge({},ue,w)}v.ApiClientError=we,v.clearAllRestCollections=Ue,v.initRestClient=$e,v.restClient=X,v.useRestCollection=Ee,v.useRestResource=Le,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
@@ -131,6 +131,17 @@ export interface RestCollection<T extends Resource = Resource> {
131
131
  * To allow for asynchronous loading of resource types, this may be undefined.
132
132
  */
133
133
  resourceType: Ref<ResourceType | undefined>;
134
+ /**
135
+ * The REST collection URL, either as specified in {@link RestCollectionOptions.options} or calculated from the entity
136
+ * type and draft batch ID.
137
+ *
138
+ * Two special cases arise:
139
+ * - restCollectionUrl is undefined when the REST collection is configured to use an existing store. (This may be
140
+ * addressed in future work.)
141
+ * - restCollectionUrl is null when the URL could not be calculated because the entity type was missing or lacked a
142
+ * REST collection name. In this case the collection will not be functional.
143
+ */
144
+ restCollectionUrl: Ref<string | null | undefined>;
134
145
  /** A status indicating whether resources have been loaded yet from the REST API. */
135
146
  status: Ref<RestCollectionStatus>;
136
147
  batchSaveAttempted: Ref<boolean>;
@@ -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,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAC,MAAM,gCAAgC,CAAA;AACjF,OAAkB,EAEhB,oBAAoB,EAIrB,MAAM,mCAAmC,CAAA;AAE1C,6CAA6C;AAC7C,MAAM,WAAW,qBAAqB;IACpC;;;;;;;;;;;;;;;;;;;;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