@rapidmx/web-client 0.14.0 → 0.14.1

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.
@@ -132,7 +132,11 @@ function wallTimeOfDayMs(instantMs: number, timezone: string | undefined): numbe
132
132
  async function toSeriesFields(occurrence: CalendarOccurrence, fields: EventFields): Promise<EventFields> {
133
133
  const { startDate, endDate, ...rest } = fields;
134
134
  if (sameMinute(startDate as string, occurrence.startDate) && sameMinute(endDate as string, occurrence.endDate)) {
135
- return rest;
135
+ // `saveEventSeries()` treats *any* `timezone`/`allDay` in the update as a possible reinterpretation of
136
+ // the master's instant and fetches the master to check - so when neither differs from the occurrence's
137
+ // own, both are dropped too, or every plain series save (e.g. just a new title) would pay for that GET.
138
+ const { timezone, allDay, ...others } = rest;
139
+ return timezone === occurrence.timezone && allDay === occurrence.allDay ? others : rest;
136
140
  }
137
141
  const master = await getCalendarEvent(occurrence.uid);
138
142
  const timezone = fields.timezone as string;
@@ -628,7 +632,7 @@ export default function EventModal({
628
632
  variant="secondary"
629
633
  className="!w-auto"
630
634
  disabled={!validatedJoinUrl}
631
- onClick={() => window.open(validatedJoinUrl!, "_blank", "noopener,noreferrer")}
635
+ onClick={() => window.open(validatedJoinUrl, "_blank", "noopener,noreferrer")}
632
636
  >
633
637
  Join video call
634
638
  </Button>
@@ -69,7 +69,11 @@ function wallTimeOfDayMs(instantMs, timezone) {
69
69
  async function toSeriesFields(occurrence, fields) {
70
70
  const { startDate, endDate, ...rest } = fields;
71
71
  if (sameMinute(startDate, occurrence.startDate) && sameMinute(endDate, occurrence.endDate)) {
72
- return rest;
72
+ // `saveEventSeries()` treats *any* `timezone`/`allDay` in the update as a possible reinterpretation of
73
+ // the master's instant and fetches the master to check - so when neither differs from the occurrence's
74
+ // own, both are dropped too, or every plain series save (e.g. just a new title) would pay for that GET.
75
+ const { timezone, allDay, ...others } = rest;
76
+ return timezone === occurrence.timezone && allDay === occurrence.allDay ? others : rest;
73
77
  }
74
78
  const master = await getCalendarEvent(occurrence.uid);
75
79
  const timezone = fields.timezone;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rapidmx/web-client",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "RapidMX's webmail and admin console React UI for web-based clients.",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/rapidmx/web-client",
@@ -17,7 +17,7 @@
17
17
  "./shared/styles/app.css": "./apps/shared/styles/app.css"
18
18
  },
19
19
  "scripts": {
20
- "build": "rimraf dist && tsc -p tsconfig.json && shx mkdir -p dist/apps/shared/styles && shx cp apps/shared/styles/app.css dist/apps/shared/styles/app.css && node scripts/checkDistReferences.mjs",
20
+ "build": "yarn lint && rimraf dist && tsc -p tsconfig.json && shx mkdir -p dist/apps/shared/styles && shx cp apps/shared/styles/app.css dist/apps/shared/styles/app.css && node scripts/checkDistReferences.mjs",
21
21
  "lint": "eslint ./apps ./test",
22
22
  "test": "vitest run --coverage",
23
23
  "test:watch": "vitest --watch --coverage",