@remit/web-client 0.0.290 → 0.0.291

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/web-client",
3
- "version": "0.0.290",
3
+ "version": "0.0.291",
4
4
  "type": "module",
5
5
  "description": "Remit web client, published as composable primitives — the app shell, auth shells, and runtime config. A distributor imports what it composes and bundles it.",
6
6
  "exports": {
@@ -191,6 +191,27 @@ describe("editing one occurrence of a series", () => {
191
191
  );
192
192
  });
193
193
 
194
+ it("names the occurrence a whole-series edit was made from", async () => {
195
+ await mount(() => ({ items: [] }));
196
+ await write((writes) =>
197
+ writes.updateEvent(
198
+ { ...scopedWrite, scope: "all" },
199
+ {
200
+ start: "2026-06-11T10:00:00+02:00",
201
+ end: "2026-06-11T11:00:00+02:00",
202
+ },
203
+ ),
204
+ );
205
+
206
+ const patched = (http?.calls ?? []).find((call) => call.method === "PATCH");
207
+ assert.ok(patched, "the edit was sent");
208
+ assert.ok(patched.url.includes("scope=All"), patched.url);
209
+ assert.ok(
210
+ patched.url.includes(encodeURIComponent("2026-06-11T07:15:00Z")),
211
+ "the server moves the series by what changed on this occurrence",
212
+ );
213
+ });
214
+
194
215
  it("makes the delete conditional on the same version", async () => {
195
216
  await mount(() => ({ items: [] }));
196
217
  await write((writes) => writes.deleteEvent(scopedWrite));
@@ -95,10 +95,12 @@ export function useInvalidateCalendarReads(): () => void {
95
95
  }, [queryClient]);
96
96
  }
97
97
 
98
+ /**
99
+ * The occurrence rides along under `All` too: an edit's times are the times of
100
+ * the occurrence it was made from, and the server moves the series by as much.
101
+ */
98
102
  const scopeQuery = ({ scope, recurrenceId }: ScopedWrite) =>
99
- scope === undefined || scope === "all"
100
- ? {}
101
- : { scope: SCOPES[scope], recurrenceId };
103
+ scope === undefined ? {} : { scope: SCOPES[scope], recurrenceId };
102
104
 
103
105
  export function useCalendarWrites(): CalendarWrites {
104
106
  const invalidate = useInvalidateCalendarReads();