@remit/ui 0.0.212 → 0.0.213
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
|
@@ -148,6 +148,7 @@ describe("CalendarInviteCard", () => {
|
|
|
148
148
|
return upTo.slice(upTo.lastIndexOf("<button"));
|
|
149
149
|
};
|
|
150
150
|
assert.match(before("Add to calendar"), /disabled=""/);
|
|
151
|
+
assert.match(before("Maybe"), /disabled=""/);
|
|
151
152
|
assert.doesNotMatch(before("Decline"), /disabled=""/);
|
|
152
153
|
assert.doesNotMatch(before("Stop offering"), /disabled=""/);
|
|
153
154
|
});
|
|
@@ -75,6 +75,11 @@ export const AlreadyOnTheCalendar: Story = {
|
|
|
75
75
|
args: { ...base, rsvp: "accepted", clashes: [] },
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
+
/** Answered maybe. On the calendar as tentative, and the organiser was not told. */
|
|
79
|
+
export const AnsweredMaybe: Story = {
|
|
80
|
+
args: { ...base, rsvp: "tentative", clashes: [] },
|
|
81
|
+
};
|
|
82
|
+
|
|
78
83
|
/** Declined, with the way back to offering other times still open. */
|
|
79
84
|
export const Declined: Story = {
|
|
80
85
|
args: { ...base, rsvp: "declined", clashes: [] },
|
|
@@ -78,7 +78,7 @@ export interface CalendarInviteCardProps {
|
|
|
78
78
|
reportHref?: string;
|
|
79
79
|
/**
|
|
80
80
|
* Why nothing can be written to a calendar yet, and the way to fix it. Set,
|
|
81
|
-
* it holds Add and Remove; the answers that write nothing stay live.
|
|
81
|
+
* it holds Add, Maybe and Remove; the answers that write nothing stay live.
|
|
82
82
|
*/
|
|
83
83
|
addBlocked?: ReactNode;
|
|
84
84
|
touch?: boolean;
|
|
@@ -271,7 +271,7 @@ export function CalendarInviteCard({
|
|
|
271
271
|
variant="secondary"
|
|
272
272
|
size={touch ? "md" : "sm"}
|
|
273
273
|
onClick={onTentative}
|
|
274
|
-
disabled={busy}
|
|
274
|
+
disabled={busy || addBlocked !== undefined}
|
|
275
275
|
className={cn(touch && "min-h-11 flex-1")}
|
|
276
276
|
>
|
|
277
277
|
Maybe
|
|
@@ -110,6 +110,10 @@ function PanelDemo({
|
|
|
110
110
|
selectedEventId,
|
|
111
111
|
actions: {
|
|
112
112
|
onAddInvite: () => setRsvp("accepted"),
|
|
113
|
+
onTentativeInvite:
|
|
114
|
+
calendar.invite?.invite.state === "cancelled"
|
|
115
|
+
? undefined
|
|
116
|
+
: () => setRsvp("tentative"),
|
|
113
117
|
onDeclineInvite: () => setRsvp("declined"),
|
|
114
118
|
onReopenInvite:
|
|
115
119
|
calendar.invite?.invite.state === "cancelled"
|
|
@@ -319,7 +323,19 @@ export const Declined = rail(KICKOFF, organiserSender, {
|
|
|
319
323
|
});
|
|
320
324
|
|
|
321
325
|
/**
|
|
322
|
-
*
|
|
326
|
+
* Answered maybe. The event is on the calendar as tentative, and the organiser
|
|
327
|
+
* was not told.
|
|
328
|
+
*/
|
|
329
|
+
export const AnsweredMaybe = rail(KICKOFF, organiserSender, {
|
|
330
|
+
...inviteWithClash,
|
|
331
|
+
invite: inviteWithClash.invite && {
|
|
332
|
+
...inviteWithClash.invite,
|
|
333
|
+
rsvp: "tentative",
|
|
334
|
+
},
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* No calendar to write to yet. Adding and maybe wait for one, with the way to make it;
|
|
323
339
|
* declining and muting write nothing to a calendar and stay live.
|
|
324
340
|
*/
|
|
325
341
|
export const NoCalendarYet = rail(KICKOFF, organiserSender, {
|