@dev-crew-berlin/enter-js-utils 0.80.1 → 0.80.3

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 (60) hide show
  1. package/dist/api-client/api-base.d.ts +6 -6
  2. package/dist/generated/api-schema.d.ts +6 -6
  3. package/dist/lib/api-result.d.ts +5 -5
  4. package/dist/lib/csrf.d.ts +1 -1
  5. package/dist/lib/headers.d.ts +6 -7
  6. package/dist/lib/result.d.ts +7 -7
  7. package/dist/lib/tokens.d.ts +4 -4
  8. package/dist/models/attendee.d.ts +2 -2
  9. package/dist/models/branch.d.ts +2 -1
  10. package/dist/models/branch.js +7 -0
  11. package/dist/models/checkin-counter.d.ts +1 -1
  12. package/dist/models/checkin-counts.d.ts +1 -1
  13. package/dist/models/checkin.d.ts +2 -2
  14. package/dist/models/checkins.d.ts +2 -2
  15. package/dist/models/email.d.ts +1 -1
  16. package/dist/models/event.d.ts +11 -11
  17. package/dist/models/field-group.d.ts +3 -3
  18. package/dist/models/field-value.d.ts +1 -1
  19. package/dist/models/field.d.ts +12 -12
  20. package/dist/models/instance.d.ts +1 -1
  21. package/dist/models/instance.js +1 -1
  22. package/dist/models/permission.d.ts +1 -1
  23. package/dist/models/rsvp.d.ts +2 -2
  24. package/dist/models/user.d.ts +1 -1
  25. package/dist/models/variable.d.ts +1 -1
  26. package/dist/ui/button.d.ts +1 -1
  27. package/dist/ui/button.stories.d.ts +1 -1
  28. package/dist/ui/checkin-count-indicator.d.ts +2 -2
  29. package/dist/ui/checkin-count-indicator.stories.d.ts +1 -1
  30. package/dist/ui/checkin-progress-bar.d.ts +1 -1
  31. package/dist/ui/checkin-progress-bar.stories.d.ts +1 -1
  32. package/dist/ui/companion-info.d.ts +1 -1
  33. package/dist/ui/companion-info.stories.d.ts +1 -1
  34. package/dist/ui/enter-logo.d.ts +1 -1
  35. package/dist/ui/enter-logo.stories.d.ts +1 -1
  36. package/dist/ui/form-elements/input.d.ts +1 -1
  37. package/dist/ui/form-elements/input.stories.d.ts +1 -1
  38. package/dist/ui/form-elements/label.d.ts +1 -1
  39. package/dist/ui/form-elements/label.stories.d.ts +1 -1
  40. package/dist/ui/form-elements/search-input.d.ts +1 -1
  41. package/dist/ui/form-elements/search-input.stories.d.ts +1 -1
  42. package/dist/ui/form-elements/segmented-control.d.ts +1 -1
  43. package/dist/ui/form-elements/segmented-control.stories.d.ts +1 -1
  44. package/dist/ui/guest-card.d.ts +1 -1
  45. package/dist/ui/guest-card.stories.d.ts +1 -1
  46. package/dist/ui/icons/add-guest-icon.d.ts +1 -1
  47. package/dist/ui/icons/add-guest-icon.stories.d.ts +1 -1
  48. package/dist/ui/icons/caret-icon.d.ts +1 -1
  49. package/dist/ui/icons/caret-icon.stories.d.ts +1 -1
  50. package/dist/ui/icons/filter-icon.d.ts +1 -1
  51. package/dist/ui/icons/filter-icon.stories.d.ts +1 -1
  52. package/dist/ui/icons/search-icon.d.ts +1 -1
  53. package/dist/ui/icons/search-icon.stories.d.ts +1 -1
  54. package/dist/ui/icons/settings-icon.d.ts +1 -1
  55. package/dist/ui/icons/settings-icon.stories.d.ts +1 -1
  56. package/dist/ui/icons/sort-list-icon.d.ts +1 -1
  57. package/dist/ui/icons/sort-list-icon.stories.d.ts +1 -1
  58. package/dist/ui/tag.d.ts +1 -1
  59. package/dist/ui/tag.stories.d.ts +1 -1
  60. package/package.json +2 -2
@@ -4,20 +4,20 @@ export interface APICredentials {
4
4
  accessToken: string;
5
5
  url: string;
6
6
  }
7
- declare type HTTPMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
8
- declare type JSONRes = {
7
+ type HTTPMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
8
+ type JSONRes = {
9
9
  content: {
10
10
  'application/json': unknown;
11
11
  };
12
12
  };
13
- declare type ResJSON<Code extends number> = {
13
+ type ResJSON<Code extends number> = {
14
14
  responses: Record<Code, JSONRes>;
15
15
  };
16
- declare type ResponseType<Path extends keyof paths, Method extends HTTPMethod> = paths[Path] extends Record<Method, ResJSON<200>> ? paths[Path][Method]['responses'][200]['content']['application/json'] : paths[Path] extends Record<Method, ResJSON<204>> ? paths[Path][Method]['responses'][204]['content']['application/json'] : never;
17
- export declare type RequestBody<Path extends keyof paths, Method extends HTTPMethod> = paths[Path] extends Record<Method, {
16
+ type ResponseType<Path extends keyof paths, Method extends HTTPMethod> = paths[Path] extends Record<Method, ResJSON<200>> ? paths[Path][Method]['responses'][200]['content']['application/json'] : paths[Path] extends Record<Method, ResJSON<204>> ? paths[Path][Method]['responses'][204]['content']['application/json'] : never;
17
+ export type RequestBody<Path extends keyof paths, Method extends HTTPMethod> = paths[Path] extends Record<Method, {
18
18
  requestBody: JSONRes;
19
19
  }> ? paths[Path][Method]['requestBody']['content']['application/json'] : never;
20
- export declare type FetchOptions = {
20
+ export type FetchOptions = {
21
21
  cache?: 'force-cache' | 'no-store';
22
22
  next?: {
23
23
  revalidate: false | 0 | number;
@@ -2,7 +2,7 @@
2
2
  * This file was auto-generated by openapi-typescript.
3
3
  * Do not make direct changes to the file.
4
4
  */
5
- export declare type paths = {
5
+ export type paths = {
6
6
  "/health": {
7
7
  /**
8
8
  * Healthcheck
@@ -90,8 +90,8 @@ export declare type paths = {
90
90
  post: operations["generate_signed_registration_token_instances__instance_name__registration_registration_token_post"];
91
91
  };
92
92
  };
93
- export declare type webhooks = Record<string, never>;
94
- export declare type components = {
93
+ export type webhooks = Record<string, never>;
94
+ export type components = {
95
95
  schemas: {
96
96
  /**
97
97
  * AttendeeAuthCodeRequested
@@ -2818,9 +2818,9 @@ export declare type components = {
2818
2818
  headers: never;
2819
2819
  pathItems: never;
2820
2820
  };
2821
- export declare type $defs = Record<string, never>;
2822
- export declare type external = Record<string, never>;
2823
- export declare type operations = {
2821
+ export type $defs = Record<string, never>;
2822
+ export type external = Record<string, never>;
2823
+ export type operations = {
2824
2824
  /**
2825
2825
  * Healthcheck
2826
2826
  * @description healthcheck to see if api server is running
@@ -1,18 +1,18 @@
1
1
  import { Result } from './result';
2
- export declare type NetworkError = {
2
+ export type NetworkError = {
3
3
  type: 'network-error';
4
4
  endpoint: string;
5
5
  message: string;
6
6
  };
7
- export declare type HTTPError = {
7
+ export type HTTPError = {
8
8
  type: 'http-error';
9
9
  endpoint: string;
10
10
  statusCode: number;
11
11
  message: string | null;
12
12
  };
13
- export declare type ClientError = {
13
+ export type ClientError = {
14
14
  type: 'client-error';
15
15
  message: string;
16
16
  };
17
- export declare type APIError = NetworkError | HTTPError | ClientError;
18
- export declare type APIResult<Model> = Result<APIError[], Model>;
17
+ export type APIError = NetworkError | HTTPError | ClientError;
18
+ export type APIResult<Model> = Result<APIError[], Model>;
@@ -1,5 +1,5 @@
1
1
  import { CookieGetter, CookieSetter } from './headers';
2
- export declare type CsrfOptions = {
2
+ export type CsrfOptions = {
3
3
  cookieSignSecret: string;
4
4
  cookieName?: string;
5
5
  };
@@ -1,17 +1,16 @@
1
- /// <reference types="node" />
2
1
  import { IncomingMessage, ServerResponse } from 'http';
3
- export declare type CookieOptions = {
2
+ export type CookieOptions = {
4
3
  sameSite?: 'lax' | 'strict' | 'none';
5
4
  path?: string;
6
5
  };
7
- export declare type RequestCookie = {
6
+ export type RequestCookie = {
8
7
  name: string;
9
8
  value: string;
10
9
  };
11
- export declare type CookieGetter = (name: string) => RequestCookie | undefined;
12
- export declare type CookieSetter = (name: string, value: string, options?: CookieOptions) => void;
13
- export declare type CookieRemover = (name: string) => void;
14
- export declare type HeaderGetter = (name: string) => string | null;
10
+ export type CookieGetter = (name: string) => RequestCookie | undefined;
11
+ export type CookieSetter = (name: string, value: string, options?: CookieOptions) => void;
12
+ export type CookieRemover = (name: string) => void;
13
+ export type HeaderGetter = (name: string) => string | null;
15
14
  export declare function nodeCookies(request: {
16
15
  cookies: Partial<{
17
16
  [key: string]: string;
@@ -1,20 +1,20 @@
1
- export declare type Failure<Reason> = {
1
+ export type Failure<Reason> = {
2
2
  success: false;
3
3
  error: Reason;
4
4
  };
5
- export declare type Success<Payload> = {
5
+ export type Success<Payload> = {
6
6
  success: true;
7
7
  data: Payload;
8
8
  };
9
- export declare type Result<Reason, Payload> = Failure<Reason> | Success<Payload>;
9
+ export type Result<Reason, Payload> = Failure<Reason> | Success<Payload>;
10
10
  export declare function success<Payload>(data: Payload): Success<Payload>;
11
11
  export declare function failure<Reason>(reason: Reason): Failure<Reason>;
12
12
  export declare function asSuccess<Payload>(result: Result<unknown, Payload>): Success<Payload> | undefined;
13
13
  export declare function asFailure<Reason>(result: Result<Reason, unknown>): Failure<Reason> | undefined;
14
- declare type UnwrapSuccess<T> = T extends Success<infer Payload> ? Payload : never;
15
- declare type UnwrapFailure<T> = T extends Failure<infer Reason> ? Reason : never;
16
- declare type UnwrapArray<T> = T extends (infer R)[] ? R : never;
17
- declare type MergedSuccesses<T> = {
14
+ type UnwrapSuccess<T> = T extends Success<infer Payload> ? Payload : never;
15
+ type UnwrapFailure<T> = T extends Failure<infer Reason> ? Reason : never;
16
+ type UnwrapArray<T> = T extends (infer R)[] ? R : never;
17
+ type MergedSuccesses<T> = {
18
18
  [K in keyof T]: UnwrapSuccess<T[K]>;
19
19
  };
20
20
  /**
@@ -1,15 +1,15 @@
1
1
  import { CookieGetter, CookieRemover, CookieSetter } from './headers';
2
2
  import { Result } from './result';
3
- export declare type TokenOptions = {
3
+ export type TokenOptions = {
4
4
  jwtSecret: string;
5
5
  instanceName: string;
6
6
  };
7
7
  export declare const tokenValidationErrorCodes: readonly ["token_missing", "token_invalid", "token_expired", "security_question_check_failed"];
8
- export declare type TokenValidationError = typeof tokenValidationErrorCodes[number];
9
- export declare type RegistrationTokenOptions = {
8
+ export type TokenValidationError = typeof tokenValidationErrorCodes[number];
9
+ export type RegistrationTokenOptions = {
10
10
  registrationTokenCookieName?: string;
11
11
  };
12
- export declare type RegistrationToken = {
12
+ export type RegistrationToken = {
13
13
  attendeeId: string;
14
14
  sessionType: string;
15
15
  flags: {
@@ -3,8 +3,8 @@ import { Checkin } from './checkin';
3
3
  import { Checkins } from './checkins';
4
4
  import { FieldValue } from './field-value';
5
5
  import { Rsvp } from './rsvp';
6
- export declare type AttendeeJSON = components['schemas']['PublicAttendee-Output'];
7
- declare type AttendeeJSONInput = components['schemas']['PublicAttendee-Input'];
6
+ export type AttendeeJSON = components['schemas']['PublicAttendee-Output'];
7
+ type AttendeeJSONInput = components['schemas']['PublicAttendee-Input'];
8
8
  export declare class Attendee {
9
9
  id: string;
10
10
  userdata: Map<string, FieldValue>;
@@ -1,9 +1,10 @@
1
1
  import { components } from '../generated/api-schema';
2
2
  import { CheckinCounter } from './checkin-counter';
3
- export declare type BranchJSON = components['schemas']['Branch'];
3
+ export type BranchJSON = components['schemas']['Branch'];
4
4
  export declare class Branch {
5
5
  title: string;
6
6
  guestlistLabel: string;
7
7
  checkinCounters: Map<string, CheckinCounter>;
8
8
  constructor(json: BranchJSON);
9
+ toJSON(): BranchJSON;
9
10
  }
@@ -4,4 +4,11 @@ export class Branch {
4
4
  this.guestlistLabel = json.guestlistLabel;
5
5
  this.checkinCounters = new Map(Object.entries(json.checkinCounters));
6
6
  }
7
+ toJSON() {
8
+ return {
9
+ title: this.title,
10
+ guestlistLabel: this.guestlistLabel,
11
+ checkinCounters: Object.fromEntries(this.checkinCounters)
12
+ };
13
+ }
7
14
  }
@@ -1,2 +1,2 @@
1
1
  import { components } from '../generated/api-schema';
2
- export declare type CheckinCounter = components['schemas']['CheckinCounter'];
2
+ export type CheckinCounter = components['schemas']['CheckinCounter'];
@@ -1,4 +1,4 @@
1
1
  import { components } from '../generated/api-schema';
2
- export declare type CheckinCounts = {
2
+ export type CheckinCounts = {
3
3
  [checkinTag: string]: components['schemas']['CheckinCount'];
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import { components } from '../generated/api-schema';
2
- export declare type CheckinJSON = components['schemas']['Checkin-Output'];
3
- declare type CheckinJSONInput = components['schemas']['Checkin-Input'];
2
+ export type CheckinJSON = components['schemas']['Checkin-Output'];
3
+ type CheckinJSONInput = components['schemas']['Checkin-Input'];
4
4
  export declare class Checkin {
5
5
  id: string;
6
6
  time: Date;
@@ -1,7 +1,7 @@
1
1
  import { components } from '../generated/api-schema';
2
2
  import { Checkin } from './checkin';
3
- export declare type CheckinsJSON = components['schemas']['Checkins-Output'];
4
- declare type CheckinsJSONInput = components['schemas']['Checkins-Input'];
3
+ export type CheckinsJSON = components['schemas']['Checkins-Output'];
4
+ type CheckinsJSONInput = components['schemas']['Checkins-Input'];
5
5
  export declare class Checkins {
6
6
  checkins: Checkin[];
7
7
  deleted: Set<string>;
@@ -1,2 +1,2 @@
1
1
  import { components } from '../generated/api-schema';
2
- export declare type Email = components['schemas']['PublicEmail'];
2
+ export type Email = components['schemas']['PublicEmail'];
@@ -1,12 +1,12 @@
1
1
  import { components } from '../generated/api-schema';
2
- export declare type AttendeeCreatedEvent = components['schemas']['AttendeeCreatedEvent'];
3
- export declare type AttendeeUpdatedEvent = components['schemas']['AttendeeUpdatedEvent'];
4
- export declare type AttendeeRespondedEvent = components['schemas']['AttendeeRespondedEvent'];
5
- export declare type AttendeeDeletedEvent = components['schemas']['AttendeeDeletedEvent'];
6
- export declare type AttendeeAuthCodeRequestedEvent = components['schemas']['AttendeeAuthCodeRequested'];
7
- export declare type EmailUnsubscribedEvent = components['schemas']['EmailUnsubscribedEvent'];
8
- export declare type EmailStatusUpdatedEvent = components['schemas']['EmailStatusUpdatedEvent'];
9
- export declare type CheckinCreatedEvent = components['schemas']['CheckinCreatedEvent'];
10
- export declare type CheckinDeletedEvent = components['schemas']['CheckinDeletedEvent'];
11
- export declare type PaymentPaidEvent = components['schemas']['PaymentPaidEvent'];
12
- export declare type Event = components['schemas']['RootModel_list_Annotated_Union_AttendeeCreatedEvent__AttendeeUpdatedEvent__AttendeeRespondedEvent__AttendeeAuthCodeRequested__EmailStatusUpdatedEvent__EmailUnsubscribedEvent__AttendeeDeletedEvent__CheckinCreatedEvent__CheckinDeletedEvent__PaymentPaidEvent___FieldInfo_annotation_NoneType__required_True__discriminator__event_____'][number];
2
+ export type AttendeeCreatedEvent = components['schemas']['AttendeeCreatedEvent'];
3
+ export type AttendeeUpdatedEvent = components['schemas']['AttendeeUpdatedEvent'];
4
+ export type AttendeeRespondedEvent = components['schemas']['AttendeeRespondedEvent'];
5
+ export type AttendeeDeletedEvent = components['schemas']['AttendeeDeletedEvent'];
6
+ export type AttendeeAuthCodeRequestedEvent = components['schemas']['AttendeeAuthCodeRequested'];
7
+ export type EmailUnsubscribedEvent = components['schemas']['EmailUnsubscribedEvent'];
8
+ export type EmailStatusUpdatedEvent = components['schemas']['EmailStatusUpdatedEvent'];
9
+ export type CheckinCreatedEvent = components['schemas']['CheckinCreatedEvent'];
10
+ export type CheckinDeletedEvent = components['schemas']['CheckinDeletedEvent'];
11
+ export type PaymentPaidEvent = components['schemas']['PaymentPaidEvent'];
12
+ export type Event = components['schemas']['RootModel_list_Annotated_Union_AttendeeCreatedEvent__AttendeeUpdatedEvent__AttendeeRespondedEvent__AttendeeAuthCodeRequested__EmailStatusUpdatedEvent__EmailUnsubscribedEvent__AttendeeDeletedEvent__CheckinCreatedEvent__CheckinDeletedEvent__PaymentPaidEvent___FieldInfo_annotation_NoneType__required_True__discriminator__event_____'][number];
@@ -1,8 +1,8 @@
1
1
  import { components } from '../generated/api-schema';
2
2
  import { Field } from './field';
3
- export declare type Dictionary<T> = Record<string, T>;
4
- export declare type FieldGroupJSON = components['schemas']['FieldGroup-Output'];
5
- export declare type FieldGroup = Omit<FieldGroupJSON, 'questions'>;
3
+ export type Dictionary<T> = Record<string, T>;
4
+ export type FieldGroupJSON = components['schemas']['FieldGroup-Output'];
5
+ export type FieldGroup = Omit<FieldGroupJSON, 'questions'>;
6
6
  export declare class FieldGroups {
7
7
  private _groups;
8
8
  get groups(): Map<string, FieldGroup>;
@@ -1,2 +1,2 @@
1
1
  import { components } from '../generated/api-schema';
2
- export declare type FieldValue = components['schemas']['PublicAttendee-Output']['userdata'][string];
2
+ export type FieldValue = components['schemas']['PublicAttendee-Output']['userdata'][string];
@@ -1,37 +1,37 @@
1
1
  import { components } from '../generated/api-schema';
2
- export declare type StaticField = components['schemas']['StaticField-Output'] & {
2
+ export type StaticField = components['schemas']['StaticField-Output'] & {
3
3
  group: string;
4
4
  };
5
- export declare type TextField = components['schemas']['TextField-Output'] & {
5
+ export type TextField = components['schemas']['TextField-Output'] & {
6
6
  group: string;
7
7
  };
8
- export declare type LongtextField = components['schemas']['LongtextField-Output'] & {
8
+ export type LongtextField = components['schemas']['LongtextField-Output'] & {
9
9
  group: string;
10
10
  };
11
- export declare type EmailField = components['schemas']['EmailField-Output'] & {
11
+ export type EmailField = components['schemas']['EmailField-Output'] & {
12
12
  group: string;
13
13
  };
14
- export declare type NumberField = components['schemas']['NumberField-Output'] & {
14
+ export type NumberField = components['schemas']['NumberField-Output'] & {
15
15
  group: string;
16
16
  };
17
- export declare type CheckboxField = components['schemas']['CheckboxGroupField-Output'] & {
17
+ export type CheckboxField = components['schemas']['CheckboxGroupField-Output'] & {
18
18
  group: string;
19
19
  };
20
- export declare type ToggleField = components['schemas']['CheckboxField-Output'] & {
20
+ export type ToggleField = components['schemas']['CheckboxField-Output'] & {
21
21
  group: string;
22
22
  };
23
- export declare type RadioField = components['schemas']['RadioButtonGroupField-Output'] & {
23
+ export type RadioField = components['schemas']['RadioButtonGroupField-Output'] & {
24
24
  group: string;
25
25
  };
26
- export declare type SelectField = components['schemas']['DropdownField-Output'] & {
26
+ export type SelectField = components['schemas']['DropdownField-Output'] & {
27
27
  group: string;
28
28
  };
29
- export declare type CodeField = components['schemas']['CodeField-Output'] & {
29
+ export type CodeField = components['schemas']['CodeField-Output'] & {
30
30
  group: string;
31
31
  };
32
- export declare type DateField = components['schemas']['DateField-Output'] & {
32
+ export type DateField = components['schemas']['DateField-Output'] & {
33
33
  group: string;
34
34
  };
35
- export declare type Field = components['schemas']['FieldGroup-Output']['questions'][number] & {
35
+ export type Field = components['schemas']['FieldGroup-Output']['questions'][number] & {
36
36
  group: string;
37
37
  };
@@ -1,7 +1,7 @@
1
1
  import { components } from '../generated/api-schema';
2
2
  import { Attendee } from './attendee';
3
3
  import { Branch } from './branch';
4
- export declare type InstanceJSON = components['schemas']['PublicInstance'];
4
+ export type InstanceJSON = components['schemas']['PublicInstance'];
5
5
  export declare class Instance {
6
6
  name: string;
7
7
  title: string;
@@ -20,7 +20,7 @@ export class Instance {
20
20
  }
21
21
  toJSON() {
22
22
  // convert each branch to its json representation
23
- const branches = Object.fromEntries(new Map(Object.entries(this.branches).map(([branchName, branch]) => [branchName, branch.toJSON()])));
23
+ const branches = Object.fromEntries(this.branches.entries().map(([branchName, branch]) => [branchName, branch.toJSON()]));
24
24
  return {
25
25
  name: this.name,
26
26
  title: this.title,
@@ -1,2 +1,2 @@
1
1
  import { components } from '../generated/api-schema';
2
- export declare type Permission = components['schemas']['PublicUser']['permissions'][string][number];
2
+ export type Permission = components['schemas']['PublicUser']['permissions'][string][number];
@@ -1,6 +1,6 @@
1
1
  import { components } from '../generated/api-schema';
2
- export declare type RsvpJSON = components['schemas']['RSVP-Output'];
3
- export declare type RsvpJSONInput = components['schemas']['RSVP-Input'];
2
+ export type RsvpJSON = components['schemas']['RSVP-Output'];
3
+ export type RsvpJSONInput = components['schemas']['RSVP-Input'];
4
4
  export declare class Rsvp {
5
5
  tieBreaker: string;
6
6
  time: Date | null;
@@ -1,2 +1,2 @@
1
1
  import { components } from '../generated/api-schema';
2
- export declare type User = components['schemas']['PublicUser'];
2
+ export type User = components['schemas']['PublicUser'];
@@ -1,2 +1,2 @@
1
1
  import { components } from '../generated/api-schema';
2
- export declare type Variable = components['schemas']['Variable-Output'];
2
+ export type Variable = components['schemas']['Variable-Output'];
@@ -1,6 +1,6 @@
1
1
  import { ButtonHTMLAttributes, FunctionComponent } from 'react';
2
2
  import 'styled-jsx';
3
- declare type Props = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'color'> & {
3
+ type Props = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'color'> & {
4
4
  appearance?: 'default' | 'primary' | 'danger' | 'green';
5
5
  borderless?: boolean;
6
6
  fullWidth?: boolean;
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { Button } from './button';
3
3
  declare const meta: Meta<typeof Button>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof Button>;
5
+ type Story = StoryObj<typeof Button>;
6
6
  export declare const Basic: Story;
7
7
  export declare const FullWidth: Story;
8
8
  export declare const Primary: Story;
@@ -1,9 +1,9 @@
1
1
  import { FunctionComponent } from 'react';
2
2
  import 'styled-jsx';
3
- export declare type Checkin = {
3
+ export type Checkin = {
4
4
  time: Date;
5
5
  };
6
- declare type Props = {
6
+ type Props = {
7
7
  checkins: Checkin[];
8
8
  response: 'positive-response';
9
9
  rsvpCount: number;
@@ -2,7 +2,7 @@ import { Meta, StoryObj } from '@storybook/react';
2
2
  import { CheckinCountIndicator } from './checkin-count-indicator';
3
3
  declare const meta: Meta<typeof CheckinCountIndicator>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof CheckinCountIndicator>;
5
+ type Story = StoryObj<typeof CheckinCountIndicator>;
6
6
  export declare const SingleResponse: Story;
7
7
  export declare const Decline: Story;
8
8
  export declare const NoResponse: Story;
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent, ReactNode } from 'react';
2
- declare type Props = {
2
+ type Props = {
3
3
  checkinCount: number;
4
4
  rsvp: number;
5
5
  children?: ReactNode;
@@ -2,7 +2,7 @@ import { Meta, StoryObj } from '@storybook/react';
2
2
  import { CheckinProgressBar } from './checkin-progress-bar';
3
3
  declare const meta: Meta<typeof CheckinProgressBar>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof CheckinProgressBar>;
5
+ type Story = StoryObj<typeof CheckinProgressBar>;
6
6
  export declare const Basic: Story;
7
7
  export declare const WithoutTagName: Story;
8
8
  export declare const NoCheckins: Story;
@@ -1,7 +1,7 @@
1
1
  import { FunctionComponent } from 'react';
2
2
  import 'styled-jsx';
3
3
  import { Attendee } from '../models';
4
- declare type Props = {
4
+ type Props = {
5
5
  companionStatus: {
6
6
  isCompanion: false;
7
7
  } | {
@@ -2,7 +2,7 @@ import { Meta, StoryObj } from '@storybook/react';
2
2
  import { CompanionInfo } from './companion-info';
3
3
  declare const meta: Meta<typeof CompanionInfo>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof CompanionInfo>;
5
+ type Story = StoryObj<typeof CompanionInfo>;
6
6
  export declare const WithMainGuestFound: Story;
7
7
  export declare const WithoutMainGuest: Story;
8
8
  export declare const NotACompanion: Story;
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent } from 'react';
2
- declare type Props = {
2
+ type Props = {
3
3
  white?: boolean;
4
4
  };
5
5
  export declare const EnterLogo: FunctionComponent<Props>;
@@ -2,6 +2,6 @@ import { Meta, StoryObj } from '@storybook/react';
2
2
  import { EnterLogo } from './enter-logo';
3
3
  declare const meta: Meta<typeof EnterLogo>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof EnterLogo>;
5
+ type Story = StoryObj<typeof EnterLogo>;
6
6
  export declare const Basic: Story;
7
7
  export declare const White: Story;
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent, InputHTMLAttributes } from 'react';
2
- declare type Props = InputHTMLAttributes<HTMLInputElement> & {
2
+ type Props = InputHTMLAttributes<HTMLInputElement> & {
3
3
  label: string;
4
4
  };
5
5
  export declare const Input: FunctionComponent<Props>;
@@ -2,7 +2,7 @@ import { Meta, StoryObj } from '@storybook/react';
2
2
  import { Input } from './input';
3
3
  declare const meta: Meta<typeof Input>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof Input>;
5
+ type Story = StoryObj<typeof Input>;
6
6
  export declare const Basic: Story;
7
7
  export declare const NumberInput: Story;
8
8
  export declare const WithValue: Story;
@@ -1,4 +1,4 @@
1
1
  import React, { LabelHTMLAttributes } from 'react';
2
- declare type Props = LabelHTMLAttributes<HTMLLabelElement>;
2
+ type Props = LabelHTMLAttributes<HTMLLabelElement>;
3
3
  export declare const Label: React.FunctionComponent<Props>;
4
4
  export {};
@@ -2,5 +2,5 @@ import { Meta, StoryObj } from '@storybook/react';
2
2
  import { Label } from './label';
3
3
  declare const meta: Meta<typeof Label>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof Label>;
5
+ type Story = StoryObj<typeof Label>;
6
6
  export declare const Basic: Story;
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent, InputHTMLAttributes } from 'react';
2
- declare type Props = InputHTMLAttributes<HTMLInputElement> & {
2
+ type Props = InputHTMLAttributes<HTMLInputElement> & {
3
3
  textColor?: string;
4
4
  borderColor?: string;
5
5
  placeholder?: string;
@@ -2,6 +2,6 @@ import { Meta, StoryObj } from '@storybook/react';
2
2
  import { SearchInput } from './search-input';
3
3
  declare const meta: Meta<typeof SearchInput>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof SearchInput>;
5
+ type Story = StoryObj<typeof SearchInput>;
6
6
  export declare const Basic: Story;
7
7
  export declare const WhiteText: Story;
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
- declare type Props<Segment extends string> = {
2
+ type Props<Segment extends string> = {
3
3
  segments: Segment[];
4
4
  activeSegment?: Segment;
5
5
  colors?: string[];
@@ -2,5 +2,5 @@ import { Meta, StoryObj } from '@storybook/react';
2
2
  import { SegmentedControl } from './segmented-control';
3
3
  declare const meta: Meta<typeof SegmentedControl>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof SegmentedControl>;
5
+ type Story = StoryObj<typeof SegmentedControl>;
6
6
  export declare const Basic: Story;
@@ -1,7 +1,7 @@
1
1
  import { FunctionComponent } from 'react';
2
2
  import 'styled-jsx';
3
3
  import { Attendee } from '../models';
4
- declare type Props = {
4
+ type Props = {
5
5
  attendee: Attendee;
6
6
  branchName: string;
7
7
  counterName: string;
@@ -2,7 +2,7 @@ import { Meta, StoryObj } from '@storybook/react';
2
2
  import { GuestCard } from './guest-card';
3
3
  declare const meta: Meta<typeof GuestCard>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof GuestCard>;
5
+ type Story = StoryObj<typeof GuestCard>;
6
6
  export declare const WithBackground: Story;
7
7
  export declare const Plain: Story;
8
8
  export declare const Dense: Story;
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent } from 'react';
2
- declare type Props = {
2
+ type Props = {
3
3
  color?: string;
4
4
  };
5
5
  export declare const AddGuestIcon: FunctionComponent<Props>;
@@ -2,6 +2,6 @@ import { Meta, StoryObj } from '@storybook/react';
2
2
  import { AddGuestIcon } from './add-guest-icon';
3
3
  declare const meta: Meta<typeof AddGuestIcon>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof AddGuestIcon>;
5
+ type Story = StoryObj<typeof AddGuestIcon>;
6
6
  export declare const Basic: Story;
7
7
  export declare const White: Story;
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent } from 'react';
2
- declare type Props = {
2
+ type Props = {
3
3
  color?: string;
4
4
  rotateDeg: number;
5
5
  };
@@ -2,6 +2,6 @@ import { Meta, StoryObj } from '@storybook/react';
2
2
  import { CaretIcon } from './caret-icon';
3
3
  declare const meta: Meta<typeof CaretIcon>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof CaretIcon>;
5
+ type Story = StoryObj<typeof CaretIcon>;
6
6
  export declare const Basic: Story;
7
7
  export declare const White: Story;
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent } from 'react';
2
- declare type Props = {
2
+ type Props = {
3
3
  color?: string;
4
4
  };
5
5
  export declare const FilterIcon: FunctionComponent<Props>;
@@ -2,6 +2,6 @@ import { Meta, StoryObj } from '@storybook/react';
2
2
  import { FilterIcon } from './filter-icon';
3
3
  declare const meta: Meta<typeof FilterIcon>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof FilterIcon>;
5
+ type Story = StoryObj<typeof FilterIcon>;
6
6
  export declare const Basic: Story;
7
7
  export declare const White: Story;
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent } from 'react';
2
- declare type Props = {
2
+ type Props = {
3
3
  color?: string;
4
4
  };
5
5
  export declare const SearchIcon: FunctionComponent<Props>;
@@ -2,6 +2,6 @@ import { Meta, StoryObj } from '@storybook/react';
2
2
  import { SearchIcon } from './search-icon';
3
3
  declare const meta: Meta<typeof SearchIcon>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof SearchIcon>;
5
+ type Story = StoryObj<typeof SearchIcon>;
6
6
  export declare const Basic: Story;
7
7
  export declare const White: Story;
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent } from 'react';
2
- declare type Props = {
2
+ type Props = {
3
3
  color?: string;
4
4
  };
5
5
  export declare const SettingsIcon: FunctionComponent<Props>;
@@ -2,6 +2,6 @@ import { Meta, StoryObj } from '@storybook/react';
2
2
  import { SettingsIcon } from './settings-icon';
3
3
  declare const meta: Meta<typeof SettingsIcon>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof SettingsIcon>;
5
+ type Story = StoryObj<typeof SettingsIcon>;
6
6
  export declare const Basic: Story;
7
7
  export declare const White: Story;
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent } from 'react';
2
- declare type Props = {
2
+ type Props = {
3
3
  color?: string;
4
4
  ascending: boolean;
5
5
  };
@@ -2,6 +2,6 @@ import { Meta, StoryObj } from '@storybook/react';
2
2
  import { SortListIcon } from './sort-list-icon';
3
3
  declare const meta: Meta<typeof SortListIcon>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof SortListIcon>;
5
+ type Story = StoryObj<typeof SortListIcon>;
6
6
  export declare const Basic: Story;
7
7
  export declare const White: Story;
package/dist/ui/tag.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { FunctionComponent, ReactNode } from 'react';
2
2
  import 'styled-jsx';
3
- declare type Props = {
3
+ type Props = {
4
4
  children: ReactNode;
5
5
  };
6
6
  export declare const Tag: FunctionComponent<Props>;
@@ -2,5 +2,5 @@ import { Meta, StoryObj } from '@storybook/react';
2
2
  import { Tag } from './tag';
3
3
  declare const meta: Meta<typeof Tag>;
4
4
  export default meta;
5
- declare type Story = StoryObj<typeof Tag>;
5
+ type Story = StoryObj<typeof Tag>;
6
6
  export declare const Basic: Story;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-crew-berlin/enter-js-utils",
3
- "version": "0.80.1",
3
+ "version": "0.80.3",
4
4
  "description": "utils such as vaildation and other helpers to work with data from the enter app",
5
5
  "files": [
6
6
  "dist",
@@ -67,7 +67,7 @@
67
67
  "prettier": "^2.6.2",
68
68
  "react": "^18.3.1",
69
69
  "react-dom": "^18.3.1",
70
- "typescript": "^4.8.4"
70
+ "typescript": "^5.6.3"
71
71
  },
72
72
  "peerDependencies": {
73
73
  "react": "^18.1.0",