@remit/web-client 0.0.327 → 0.0.328

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.
Files changed (48) hide show
  1. package/dist/src/components/settings/AccountFormPanel.js +1 -1
  2. package/dist/src/lib/calendar-route.d.ts +2 -6
  3. package/dist/src/lib/calendar-route.js +4 -2
  4. package/dist/src/lib/mail-search.d.ts +32 -74
  5. package/dist/src/lib/mail-search.js +11 -0
  6. package/dist/src/routeTree.gen.d.ts +551 -814
  7. package/dist/src/routes/calendar/$view.$date/$calendarObjectId/$recurrenceId.d.ts +4 -12
  8. package/dist/src/routes/calendar/$view.$date/$calendarObjectId/index.d.ts +4 -12
  9. package/dist/src/routes/calendar/$view.$date/$calendarObjectId.d.ts +4 -12
  10. package/dist/src/routes/calendar/$view.$date/index.d.ts +4 -12
  11. package/dist/src/routes/calendar/$view.$date/new.d.ts +4 -12
  12. package/dist/src/routes/calendar/$view.$date/suggestion.$suggestionId.d.ts +4 -12
  13. package/dist/src/routes/calendar/$view.$date.d.ts +4 -12
  14. package/dist/src/routes/calendar/index.d.ts +4 -12
  15. package/dist/src/routes/mail/$mailboxId/$threadId/$messageId/$mode.{-$outboxMessageId}.d.ts +13 -24
  16. package/dist/src/routes/mail/$mailboxId/$threadId/$messageId.d.ts +12 -16
  17. package/dist/src/routes/mail/$mailboxId/$threadId/index.d.ts +12 -16
  18. package/dist/src/routes/mail/$mailboxId/$threadId.d.ts +12 -16
  19. package/dist/src/routes/mail/$mailboxId/compose.{-$outboxMessageId}.d.ts +12 -16
  20. package/dist/src/routes/mail/$mailboxId/index.d.ts +12 -16
  21. package/dist/src/routes/mail/$mailboxId.d.ts +12 -16
  22. package/dist/src/routes/mail/brief/$threadId/$messageId/$mode.{-$outboxMessageId}.d.ts +13 -24
  23. package/dist/src/routes/mail/brief/$threadId/$messageId.d.ts +12 -16
  24. package/dist/src/routes/mail/brief/$threadId/index.d.ts +12 -16
  25. package/dist/src/routes/mail/brief/$threadId.d.ts +12 -16
  26. package/dist/src/routes/mail/brief/compose.{-$outboxMessageId}.d.ts +12 -16
  27. package/dist/src/routes/mail/brief/index.d.ts +12 -16
  28. package/dist/src/routes/mail/brief.d.ts +12 -16
  29. package/dist/src/routes/mail/flagged/$threadId/$messageId/$mode.{-$outboxMessageId}.d.ts +13 -24
  30. package/dist/src/routes/mail/flagged/$threadId/$messageId.d.ts +12 -16
  31. package/dist/src/routes/mail/flagged/$threadId/index.d.ts +12 -16
  32. package/dist/src/routes/mail/flagged/$threadId.d.ts +12 -16
  33. package/dist/src/routes/mail/flagged/compose.{-$outboxMessageId}.d.ts +12 -16
  34. package/dist/src/routes/mail/flagged/index.d.ts +12 -16
  35. package/dist/src/routes/mail/flagged.d.ts +12 -16
  36. package/dist/src/routes/mail/index.d.ts +24 -32
  37. package/dist/src/routes/mail/outbox/compose.{-$outboxMessageId}.d.ts +12 -16
  38. package/dist/src/routes/mail/outbox/draft/$outboxMessageId.d.ts +12 -16
  39. package/dist/src/routes/mail/outbox/index.d.ts +12 -16
  40. package/dist/src/routes/mail/outbox.d.ts +12 -16
  41. package/dist/src/routes/mail.d.ts +13 -14
  42. package/dist/src/routes/mail.js +2 -10
  43. package/dist/src/routes/settings/accounts.d.ts +1 -17
  44. package/dist/src/routing/index.d.ts +1 -1
  45. package/dist/src/routing/index.js +1 -1
  46. package/dist/src/routing/wizard-history.d.ts +10 -4
  47. package/dist/src/routing/wizard-history.js +2 -10
  48. package/package.json +2 -2
@@ -35,7 +35,7 @@ export const deriveUseDifferentSmtpCreds = (account) => {
35
35
  return smtpUsername !== account.username;
36
36
  };
37
37
  const accountFormSchema = z.object({
38
- email: z.string().email().min(1, "Email is required"),
38
+ email: z.email(),
39
39
  displayName: z.string().optional(),
40
40
  username: z.string().optional(),
41
41
  password: z.string().optional(),
@@ -84,10 +84,6 @@ export declare function readCalendarIds(value: unknown): string[];
84
84
  * rather than a fact about the view, so it belongs to no tier of the address.
85
85
  */
86
86
  export declare const calendarSearchSchema: z.ZodObject<{
87
- calendarId: z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>, string[] | undefined, unknown>;
88
- }, "strip", z.ZodTypeAny, {
89
- calendarId?: string[] | undefined;
90
- }, {
91
- calendarId?: unknown;
92
- }>;
87
+ calendarId: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string[], unknown>>, z.ZodTransform<string[] | undefined, string[]>>>;
88
+ }, z.core.$strip>;
93
89
  export type CalendarSearch = z.infer<typeof calendarSearchSchema>;
@@ -140,6 +140,8 @@ export function readCalendarIds(value) {
140
140
  */
141
141
  export const calendarSearchSchema = z.object({
142
142
  calendarId: z
143
- .preprocess(readCalendarIds, z.array(calendarIdSchema))
144
- .transform((ids) => (ids.length === 0 ? undefined : ids)),
143
+ .unknown()
144
+ .transform(readCalendarIds)
145
+ .transform((ids) => (ids.length === 0 ? undefined : ids))
146
+ .optional(),
145
147
  });
@@ -16,19 +16,11 @@ import { z } from "zod";
16
16
  */
17
17
  export declare const briefSearchSchema: z.ZodObject<{
18
18
  q: z.ZodOptional<z.ZodString>;
19
- }, "strip", z.ZodTypeAny, {
20
- q?: string | undefined;
21
- }, {
22
- q?: string | undefined;
23
- }>;
19
+ }, z.core.$strip>;
24
20
  /** The same, for `/mail/flagged/<thread>/<message>`. */
25
21
  export declare const flaggedSearchSchema: z.ZodObject<{
26
22
  q: z.ZodOptional<z.ZodString>;
27
- }, "strip", z.ZodTypeAny, {
28
- q?: string | undefined;
29
- }, {
30
- q?: string | undefined;
31
- }>;
23
+ }, z.core.$strip>;
32
24
  /**
33
25
  * The outbox's open message is a path segment
34
26
  * (`/mail/outbox/draft/<outboxMessageId>`), so the query carries nothing but
@@ -36,11 +28,7 @@ export declare const flaggedSearchSchema: z.ZodObject<{
36
28
  */
37
29
  export declare const outboxSearchSchema: z.ZodObject<{
38
30
  q: z.ZodOptional<z.ZodString>;
39
- }, "strip", z.ZodTypeAny, {
40
- q?: string | undefined;
41
- }, {
42
- q?: string | undefined;
43
- }>;
31
+ }, z.core.$strip>;
44
32
  /**
45
33
  * A folder's open thread and the message inside it are path segments
46
34
  * (`/mail/<mailbox>/<thread>/<message>`), so the query carries nothing but the
@@ -48,94 +36,64 @@ export declare const outboxSearchSchema: z.ZodObject<{
48
36
  */
49
37
  export declare const mailboxSearchSchema: z.ZodObject<{
50
38
  q: z.ZodOptional<z.ZodString>;
51
- }, "strip", z.ZodTypeAny, {
52
- q?: string | undefined;
53
- }, {
54
- q?: string | undefined;
55
- }>;
39
+ }, z.core.$strip>;
56
40
  /**
57
41
  * `/mail` itself only redirects to the brief, so it accepts what the brief
58
42
  * accepts and hands it straight on.
59
43
  */
60
44
  export declare const mailIndexSearchSchema: z.ZodObject<{
61
45
  q: z.ZodOptional<z.ZodString>;
62
- }, "strip", z.ZodTypeAny, {
63
- q?: string | undefined;
64
- }, {
65
- q?: string | undefined;
66
- }>;
46
+ }, z.core.$strip>;
47
+ /**
48
+ * The `/mail` layout's own search: the query, plus the selection wizard's step
49
+ * (#477 clause 1.6) and the affordance that opened it, so a reload lands back on
50
+ * the walk it was in. The router owns history, so the step is a validated
51
+ * search param rather than a raw pushState entry.
52
+ */
53
+ export declare const mailSearchSchema: z.ZodObject<{
54
+ q: z.ZodOptional<z.ZodString>;
55
+ wizard: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
56
+ name: "name";
57
+ match: "match";
58
+ run: "run";
59
+ folder: "folder";
60
+ rule: "rule";
61
+ review: "review";
62
+ properties: "properties";
63
+ }>>>;
64
+ wizardFrom: z.ZodCatch<z.ZodOptional<z.ZodLiteral<"search">>>;
65
+ }, z.core.$strip>;
67
66
  /** Every list's schema, by the path it validates. */
68
67
  export declare const mailListSearchSchemas: {
69
68
  readonly "/mail/brief": z.ZodObject<{
70
69
  q: z.ZodOptional<z.ZodString>;
71
- }, "strip", z.ZodTypeAny, {
72
- q?: string | undefined;
73
- }, {
74
- q?: string | undefined;
75
- }>;
70
+ }, z.core.$strip>;
76
71
  readonly "/mail/flagged": z.ZodObject<{
77
72
  q: z.ZodOptional<z.ZodString>;
78
- }, "strip", z.ZodTypeAny, {
79
- q?: string | undefined;
80
- }, {
81
- q?: string | undefined;
82
- }>;
73
+ }, z.core.$strip>;
83
74
  readonly "/mail/outbox": z.ZodObject<{
84
75
  q: z.ZodOptional<z.ZodString>;
85
- }, "strip", z.ZodTypeAny, {
86
- q?: string | undefined;
87
- }, {
88
- q?: string | undefined;
89
- }>;
76
+ }, z.core.$strip>;
90
77
  readonly "/mail/$mailboxId": z.ZodObject<{
91
78
  q: z.ZodOptional<z.ZodString>;
92
- }, "strip", z.ZodTypeAny, {
93
- q?: string | undefined;
94
- }, {
95
- q?: string | undefined;
96
- }>;
79
+ }, z.core.$strip>;
97
80
  };
98
81
  export declare const composeSeedSearch: z.ZodObject<{
99
82
  body: z.ZodOptional<z.ZodString>;
100
- }, "strip", z.ZodTypeAny, {
101
- body?: string | undefined;
102
- }, {
103
- body?: string | undefined;
104
- }>;
83
+ }, z.core.$strip>;
105
84
  export type ComposeSeed = Required<z.infer<typeof composeSeedSearch>>;
106
85
  export declare const withoutComposeSeed: (prev: Record<string, unknown>) => Record<string, unknown>;
107
86
  export declare const replySearchSchemas: {
108
87
  readonly brief: z.ZodObject<{
109
88
  q: z.ZodOptional<z.ZodString>;
110
- } & {
111
89
  body: z.ZodOptional<z.ZodString>;
112
- }, "strip", z.ZodTypeAny, {
113
- body?: string | undefined;
114
- q?: string | undefined;
115
- }, {
116
- body?: string | undefined;
117
- q?: string | undefined;
118
- }>;
90
+ }, z.core.$strip>;
119
91
  readonly flagged: z.ZodObject<{
120
92
  q: z.ZodOptional<z.ZodString>;
121
- } & {
122
93
  body: z.ZodOptional<z.ZodString>;
123
- }, "strip", z.ZodTypeAny, {
124
- body?: string | undefined;
125
- q?: string | undefined;
126
- }, {
127
- body?: string | undefined;
128
- q?: string | undefined;
129
- }>;
94
+ }, z.core.$strip>;
130
95
  readonly mailbox: z.ZodObject<{
131
96
  q: z.ZodOptional<z.ZodString>;
132
- } & {
133
97
  body: z.ZodOptional<z.ZodString>;
134
- }, "strip", z.ZodTypeAny, {
135
- body?: string | undefined;
136
- q?: string | undefined;
137
- }, {
138
- body?: string | undefined;
139
- q?: string | undefined;
140
- }>;
98
+ }, z.core.$strip>;
141
99
  };
@@ -8,6 +8,7 @@
8
8
  * is one place for it to be right.
9
9
  */
10
10
  import { z } from "zod";
11
+ import { wizardEntryValue, wizardStepValue } from "../routing/wizard-history";
11
12
  /** What every list carries, whatever else it carries. */
12
13
  const listSearch = z.object({ q: z.string().optional() });
13
14
  /**
@@ -36,6 +37,16 @@ export const mailboxSearchSchema = listSearch.extend({});
36
37
  * accepts and hands it straight on.
37
38
  */
38
39
  export const mailIndexSearchSchema = briefSearchSchema;
40
+ /**
41
+ * The `/mail` layout's own search: the query, plus the selection wizard's step
42
+ * (#477 clause 1.6) and the affordance that opened it, so a reload lands back on
43
+ * the walk it was in. The router owns history, so the step is a validated
44
+ * search param rather than a raw pushState entry.
45
+ */
46
+ export const mailSearchSchema = listSearch.extend({
47
+ wizard: wizardStepValue,
48
+ wizardFrom: wizardEntryValue,
49
+ });
39
50
  /** Every list's schema, by the path it validates. */
40
51
  export const mailListSearchSchemas = {
41
52
  "/mail/brief": briefSearchSchema,