uapp-communication-sdk 1.0.0-dev.87 → 1.0.0-dev.88

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.
@@ -14111,8 +14111,9 @@ var cO = class {
14111
14111
  allDay;
14112
14112
  notes;
14113
14113
  recurrence;
14114
+ sourceMeetingId;
14114
14115
  constructor(e) {
14115
- this.id = e.id, this.userId = e.userId, this.title = e.title, this.status = e.status, this.start = e.start, this.end = e.end, this.allDay = e.allDay, this.notes = e.notes, this.recurrence = e.recurrence;
14116
+ this.id = e.id, this.userId = e.userId, this.title = e.title, this.status = e.status, this.start = e.start, this.end = e.end, this.allDay = e.allDay, this.notes = e.notes, this.recurrence = e.recurrence, this.sourceMeetingId = e.sourceMeetingId ?? null;
14116
14117
  }
14117
14118
  get durationMinutes() {
14118
14119
  return OO(this.start, this.end);
@@ -17442,7 +17443,8 @@ var jj = G({
17442
17443
  end: H(),
17443
17444
  allDay: Cj(),
17444
17445
  notes: H(),
17445
- recurrence: jj.nullable().optional()
17446
+ recurrence: jj.nullable().optional(),
17447
+ sourceMeetingId: H().nullable().optional()
17446
17448
  }).passthrough(), Nj = W(Mj), Pj = G({
17447
17449
  from: H(),
17448
17450
  to: H()
@@ -17534,7 +17536,8 @@ var jj = G({
17534
17536
  end: Xj(e.end),
17535
17537
  allDay: e.allDay,
17536
17538
  notes: e.notes,
17537
- recurrence: e.recurrence !== null && e.recurrence !== void 0 ? Zj(e.recurrence) : null
17539
+ recurrence: e.recurrence !== null && e.recurrence !== void 0 ? Zj(e.recurrence) : null,
17540
+ sourceMeetingId: e.sourceMeetingId ?? null
17538
17541
  }), $j = (e) => ({
17539
17542
  active: e.active,
17540
17543
  slots: e.slots.map((e) => ({
@@ -40978,9 +40981,11 @@ var I0 = () => {
40978
40981
  });
40979
40982
  },
40980
40983
  onDelete: () => {
40981
- e.mode === "edit" && o.mutate(e.block.id, {
40984
+ if (e.mode !== "edit") return;
40985
+ let t = e.block.sourceMeetingId !== null;
40986
+ o.mutate(e.block.id, {
40982
40987
  onSuccess: () => {
40983
- N.success("Event removed"), r();
40988
+ N.success(t ? "Meeting cancelled for everyone" : "Event removed"), r();
40984
40989
  },
40985
40990
  onError: (e) => {
40986
40991
  N.error(e.message);
@@ -40989,42 +40994,64 @@ var I0 = () => {
40989
40994
  }
40990
40995
  };
40991
40996
  }, b5 = ({ state: e, timezone: t, onClose: n }) => {
40992
- let [r, i] = T(() => b8(e)), { busy: a, onSave: o, onDelete: s } = y5(e, r, t, n), { data: c = [] } = iP(), l = p5(r, e, t), u = e.mode === "edit", d = f5(r, c, e, t), f = d.code === "title_too_long" ? null : d.error, p = d.error === null, m = (d.code === "overlap_availability" || d.code === "overlap_event") && !d.hasMeetingConflict;
40997
+ let [r, i] = T(() => b8(e)), { busy: a, onSave: o, onDelete: s } = y5(e, r, t, n), [c, l] = T(!1), u = e.mode === "edit" && e.block.sourceMeetingId !== null, { data: d = [] } = iP(), f = p5(r, e, t), p = e.mode === "edit", m = f5(r, d, e, t), h = m.code === "title_too_long" ? null : m.error, g = m.error === null, _ = (m.code === "overlap_availability" || m.code === "overlap_event") && !m.hasMeetingConflict;
40993
40998
  return /* @__PURE__ */ (0, A.jsxs)(yb, {
40994
40999
  open: !0,
40995
41000
  side: "right",
40996
- title: u ? "Edit Event" : "New Event",
41001
+ title: p ? "Edit Event" : "New Event",
40997
41002
  onOpenChange: (e) => {
40998
41003
  e || n();
40999
41004
  },
41000
41005
  footer: /* @__PURE__ */ (0, A.jsx)(v5, {
41001
- isEdit: u,
41006
+ isEdit: p,
41002
41007
  busy: a,
41003
- canSave: p,
41004
- validationError: f,
41005
- isConflict: m,
41008
+ canSave: g,
41009
+ validationError: h,
41010
+ isConflict: _,
41006
41011
  summary: _5(r),
41007
41012
  onSave: o,
41008
- onDelete: s,
41013
+ onDelete: () => {
41014
+ if (u) {
41015
+ l(!0);
41016
+ return;
41017
+ }
41018
+ s();
41019
+ },
41009
41020
  onCancel: n,
41010
41021
  onResolveConflicts: () => {
41011
- l.resolve(c, o);
41022
+ f.resolve(d, o);
41012
41023
  }
41013
41024
  }),
41014
- children: [/* @__PURE__ */ (0, A.jsxs)("header", {
41015
- className: Q.panelHead,
41016
- children: [/* @__PURE__ */ (0, A.jsx)("span", {
41017
- className: Q.panelTitle,
41018
- children: u ? "Edit Event" : "New Event"
41019
- }), /* @__PURE__ */ (0, A.jsx)(Ji, {
41020
- label: "Close",
41021
- onClick: n,
41022
- children: /* @__PURE__ */ (0, A.jsx)(Ai, { size: 18 })
41023
- })]
41024
- }), /* @__PURE__ */ (0, A.jsx)(Y8, {
41025
- draft: r,
41026
- onChange: i
41027
- })]
41025
+ children: [
41026
+ /* @__PURE__ */ (0, A.jsxs)("header", {
41027
+ className: Q.panelHead,
41028
+ children: [/* @__PURE__ */ (0, A.jsx)("span", {
41029
+ className: Q.panelTitle,
41030
+ children: p ? "Edit Event" : "New Event"
41031
+ }), /* @__PURE__ */ (0, A.jsx)(Ji, {
41032
+ label: "Close",
41033
+ onClick: n,
41034
+ children: /* @__PURE__ */ (0, A.jsx)(Ai, { size: 18 })
41035
+ })]
41036
+ }),
41037
+ /* @__PURE__ */ (0, A.jsx)(Y8, {
41038
+ draft: r,
41039
+ onChange: i
41040
+ }),
41041
+ /* @__PURE__ */ (0, A.jsx)(_b, {
41042
+ open: c,
41043
+ elevated: !0,
41044
+ title: "Cancel this meeting?",
41045
+ message: "This event came from a booking. Removing it cancels the meeting and frees the time on everyone's calendar, not just yours.",
41046
+ confirmLabel: "Cancel meeting",
41047
+ onConfirm: () => {
41048
+ l(!1), s();
41049
+ },
41050
+ onCancel: () => {
41051
+ l(!1);
41052
+ }
41053
+ })
41054
+ ]
41028
41055
  });
41029
41056
  }, x5 = () => {
41030
41057
  let e = Intl.supportedValuesOf;