@overmap-ai/core 1.0.78-form-title-description-migration.1 → 1.0.78-form-title-description-migration.3

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.
@@ -7882,6 +7882,29 @@ class $R extends R {
7882
7882
  this.dispatch(r(d.uuid));
7883
7883
  }), [d, h];
7884
7884
  }
7885
+ update(e) {
7886
+ const { store: i } = this.client, { setOne: n } = this.actions, { selectById: a } = this.selectors, r = a(e.uuid)(i.getState());
7887
+ if (!r)
7888
+ throw new Error(`Expected form with uuid ${e.uuid} to exist`);
7889
+ const c = {
7890
+ ...r,
7891
+ ...e
7892
+ };
7893
+ this.dispatch(n(c));
7894
+ const o = this.enqueueRequest({
7895
+ description: A(l.PATCH, this.name, !1),
7896
+ method: l.PATCH,
7897
+ url: `${this.url}/${e.uuid}/`,
7898
+ payload: e,
7899
+ blockers: [r.uuid],
7900
+ blocks: [r.uuid]
7901
+ });
7902
+ return o.then((d) => {
7903
+ this.dispatch(n(d));
7904
+ }).catch(() => {
7905
+ this.dispatch(n(r));
7906
+ }), [c, o];
7907
+ }
7885
7908
  async delete(e) {
7886
7909
  const { store: i } = this.client, { deleteOne: n, addOne: a } = this.actions, { selectById: r } = this.selectors, c = i.getState(), o = r(e)(c);
7887
7910
  if (!o)