Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/graphql/graphql_operations_generated.json

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions app/javascript/AppRoot.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Suspense, useMemo, useState, useEffect, useContext, RefObject, useRef } from 'react';
import { Suspense, useMemo, useState, useEffect, useContext, useRef } from 'react';
import { useLocation, useNavigate, useLoaderData, Outlet, useNavigation } from 'react-router';
import { Settings } from 'luxon';
import { PageLoadingIndicator } from '@neinteractiveliterature/litform';
Expand All @@ -17,12 +17,11 @@ import { initErrorReporting } from 'ErrorReporting';

export function buildAppRootContextValue(
data: AppRootQueryData | null | undefined,
navigationBarRef: RefObject<HTMLElement | null>,
): AppRootContextValue {
): Omit<AppRootContextValue, 'navigationBarRef'> {
return {
assumedIdentityFromProfile: data?.assumedIdentityFromProfile,
cmsNavigationItems: data?.cmsParentByRequestHost.cmsNavigationItems ?? [],
convention: data?.convention,
convention: data?.convention ?? null,
conventionAcceptingProposals: data?.convention?.accepting_proposals,
conventionCanceled: data?.convention?.canceled,
conventionName: data?.convention?.name,
Expand Down Expand Up @@ -63,7 +62,6 @@ export function buildAppRootContextValue(
// eslint-disable-next-line i18next/no-literal-string
language: data?.convention?.language ?? 'en',
myProfile: data?.convention?.my_profile,
navigationBarRef,
rootSiteName: data?.rootSite?.site_name,
siteMode: data?.convention?.site_mode,
signupMode: data?.convention?.signup_mode,
Expand Down Expand Up @@ -96,7 +94,10 @@ function AppRoot(): React.JSX.Element {
reloadOnAppEntrypointHeadersMismatch();
}, [location.pathname]);

const appRootContextValue = useMemo(() => buildAppRootContextValue(data, navigationBarRef), [data]);
const appRootContextValue = useMemo(
() => ({ ...buildAppRootContextValue(data), navigationBarRef }),
[data, navigationBarRef],
);

useEffect(() => {
if (
Expand Down
12 changes: 8 additions & 4 deletions app/javascript/Authentication/queries.generated.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
/* eslint-disable */
/** Internal type. DO NOT USE DIRECTLY. */
type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
/** Internal type. DO NOT USE DIRECTLY. */
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
import * as Types from '../graphqlTypes.generated';

import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type AccountFormContentQueryVariables = Types.Exact<{ [key: string]: never; }>;
export type AccountFormContentQueryVariables = Exact<{ [key: string]: never; }>;


export type AccountFormContentQueryData = { __typename: 'Query', currentAbility: { __typename: 'Ability', can_create_cms_partials: boolean }, rootSite: { __typename: 'RootSite', id: string, blockPartial?: { __typename: 'CmsPartial', id: string, content?: string | null, content_html: string, current_ability_can_delete: boolean, current_ability_can_update: boolean } | null } };
export type AccountFormContentQueryData = { __typename: 'Query', currentAbility: { __typename: 'Ability', can_create_cms_partials: boolean }, rootSite: { __typename: 'RootSite', id: string, blockPartial: { __typename: 'CmsPartial', id: string, content: string | null, content_html: string, current_ability_can_delete: boolean, current_ability_can_update: boolean } | null } };

export type EditUserQueryVariables = Types.Exact<{ [key: string]: never; }>;
export type EditUserQueryVariables = Exact<{ [key: string]: never; }>;


export type EditUserQueryData = { __typename: 'Query', convention?: { __typename: 'Convention', id: string, name: string } | null, currentUser?: { __typename: 'User', id: string, first_name?: string | null, last_name?: string | null, email?: string | null } | null };
export type EditUserQueryData = { __typename: 'Query', convention: { __typename: 'Convention', id: string, name: string } | null, currentUser: { __typename: 'User', id: string, first_name: string | null, last_name: string | null, email: string | null } | null };


export const AccountFormContentQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AccountFormContentQuery"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currentAbility"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"can_create_cms_partials"}}]}},{"kind":"Field","name":{"kind":"Name","value":"rootSite"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"blockPartial"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"name"},"value":{"kind":"EnumValue","value":"ACCOUNT_FORM_TEXT"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"content_html"}},{"kind":"Field","name":{"kind":"Name","value":"current_ability_can_delete"}},{"kind":"Field","name":{"kind":"Name","value":"current_ability_can_update"}}]}}]}}]}}]} as unknown as DocumentNode<AccountFormContentQueryData, AccountFormContentQueryVariables>;
Expand Down
6 changes: 3 additions & 3 deletions app/javascript/BuiltInFormControls/TimezoneSelect.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState, useMemo, ReactNode, SetStateAction, useId } from 'react';
import { useState, useMemo, ReactNode, useId } from 'react';

import * as React from 'react';
import Select from 'react-select';
Expand Down Expand Up @@ -48,7 +48,7 @@ function getFormattedOffset(zoneName: string) {
export type TimezoneSelectProps = {
label: ReactNode;
value?: string | null;
onChange: React.Dispatch<SetStateAction<string | null | undefined>>;
onChange: (value: string | null) => void;
};

function TimezoneSelect(props: TimezoneSelectProps): React.JSX.Element {
Expand Down Expand Up @@ -92,7 +92,7 @@ function TimezoneSelect(props: TimezoneSelectProps): React.JSX.Element {
value={value && isValidZone(value) ? timezoneSelectData.zones[value] : undefined}
onInputChange={(input) => filterOptions(input)}
onChange={(newValue: ZoneData | null) => {
onChange(newValue?.name);
onChange(newValue?.name ?? null);
}}
getOptionValue={(zone) => zone.name}
filterOption={() => true}
Expand Down
42 changes: 34 additions & 8 deletions app/javascript/BuiltInFormControls/previewQueries.generated.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
/* eslint-disable */
/** Internal type. DO NOT USE DIRECTLY. */
type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
/** Internal type. DO NOT USE DIRECTLY. */
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
import * as Types from '../graphqlTypes.generated';

import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type PreviewLiquidQueryVariables = Types.Exact<{
liquid: Types.Scalars['String']['input'];
/** An event that can trigger a notification. */
export type NotificationEventKey =
| 'EVENTS_EVENT_UPDATED'
| 'EVENT_PROPOSALS_NEW_PROPOSAL'
| 'EVENT_PROPOSALS_PROPOSAL_SUBMIT_CONFIRMATION'
| 'EVENT_PROPOSALS_PROPOSAL_UPDATED'
| 'EVENT_PROPOSALS_UNFINISHED_DRAFT_REMINDER'
| 'ORDERS_CANCELLED'
| 'ORDERS_PURCHASED'
| 'SIGNUPS_HOLD_EXPIRED'
| 'SIGNUPS_NEW_SIGNUP'
| 'SIGNUPS_REGISTRATION_POLICY_CHANGE_MOVED_SIGNUPS'
| 'SIGNUPS_SIGNUP_CONFIRMATION'
| 'SIGNUPS_USER_SIGNUP_MOVED'
| 'SIGNUPS_WITHDRAWAL'
| 'SIGNUPS_WITHDRAW_CONFIRMATION'
| 'SIGNUP_QUEUE_NO_TICKET_REMINDER'
| 'SIGNUP_REQUESTS_NEW_SIGNUP_REQUEST'
| 'SIGNUP_REQUESTS_REQUEST_ACCEPTED'
| 'TICKETS_PURCHASED'
| 'USER_ACTIVITY_ALERTS_ALERT';

export type PreviewLiquidQueryVariables = Exact<{
liquid: string;
}>;


Expand All @@ -12,10 +38,10 @@ export type PreviewLiquidQueryData = { __typename: 'Query', cmsParent:
| { __typename: 'RootSite', id: string, previewLiquid: string }
};

export type PreviewMarkdownQueryVariables = Types.Exact<{
markdown: Types.Scalars['String']['input'];
eventId?: Types.InputMaybe<Types.Scalars['ID']['input']>;
eventProposalId?: Types.InputMaybe<Types.Scalars['ID']['input']>;
export type PreviewMarkdownQueryVariables = Exact<{
markdown: string;
eventId?: string | number | null | undefined;
eventProposalId?: string | number | null | undefined;
}>;


Expand All @@ -24,9 +50,9 @@ export type PreviewMarkdownQueryData = { __typename: 'Query', cmsParent:
| { __typename: 'RootSite', id: string, previewMarkdown: string }
};

export type PreviewNotifierLiquidQueryVariables = Types.Exact<{
export type PreviewNotifierLiquidQueryVariables = Exact<{
eventKey: Types.NotificationEventKey;
liquid: Types.Scalars['String']['input'];
liquid: string;
}>;


Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
/* eslint-disable */
/** Internal type. DO NOT USE DIRECTLY. */
type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
/** Internal type. DO NOT USE DIRECTLY. */
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
import * as Types from '../graphqlTypes.generated';

import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type DefaultEventsQueryVariables = Types.Exact<{
title?: Types.InputMaybe<Types.Scalars['String']['input']>;
export type DefaultEventsQueryVariables = Exact<{
title?: string | null | undefined;
}>;


export type DefaultEventsQueryData = { __typename: 'Query', convention: { __typename: 'Convention', id: string, events_paginated: { __typename: 'EventsPagination', entries: Array<{ __typename: 'Event', id: string, title?: string | null }> } } };
export type DefaultEventsQueryData = { __typename: 'Query', convention: { __typename: 'Convention', id: string, events_paginated: { __typename: 'EventsPagination', entries: Array<{ __typename: 'Event', id: string, title: string | null }> } } };

export type DefaultUserConProfilesQueryVariables = Types.Exact<{
name?: Types.InputMaybe<Types.Scalars['String']['input']>;
export type DefaultUserConProfilesQueryVariables = Exact<{
name?: string | null | undefined;
}>;


export type DefaultUserConProfilesQueryData = { __typename: 'Query', convention: { __typename: 'Convention', id: string, user_con_profiles_paginated: { __typename: 'UserConProfilesPagination', entries: Array<{ __typename: 'UserConProfile', id: string, name_without_nickname: string, email?: string | null }> } } };
export type DefaultUserConProfilesQueryData = { __typename: 'Query', convention: { __typename: 'Convention', id: string, user_con_profiles_paginated: { __typename: 'UserConProfilesPagination', entries: Array<{ __typename: 'UserConProfile', id: string, name_without_nickname: string, email: string | null }> } } };

export type DefaultUsersQueryVariables = Types.Exact<{
name?: Types.InputMaybe<Types.Scalars['String']['input']>;
export type DefaultUsersQueryVariables = Exact<{
name?: string | null | undefined;
}>;


export type DefaultUsersQueryData = { __typename: 'Query', users_paginated: { __typename: 'UsersPagination', entries: Array<{ __typename: 'User', id: string, name?: string | null, email?: string | null }> } };
export type DefaultUsersQueryData = { __typename: 'Query', users_paginated: { __typename: 'UsersPagination', entries: Array<{ __typename: 'User', id: string, name: string | null, email: string | null }> } };


export const DefaultEventsQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"DefaultEventsQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"title"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"convention"},"name":{"kind":"Name","value":"conventionByRequestHost"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"events_paginated"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filters"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"title"},"value":{"kind":"Variable","name":{"kind":"Name","value":"title"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"per_page"},"value":{"kind":"IntValue","value":"50"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entries"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}}]}}]}}]}}]}}]} as unknown as DocumentNode<DefaultEventsQueryData, DefaultEventsQueryVariables>;
Expand Down
3 changes: 2 additions & 1 deletion app/javascript/BuiltInForms/RunFormFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { EventAdminEventsQueryData } from '../EventAdmin/queries.generated';
import { Run } from '../graphqlTypes.generated';
import { useAppDateTimeFormat } from '../TimeUtils';
import Timespan from '../Timespan';
import { ScheduleEventInput } from '../EventsApp/ScheduleGrid/Schedule';

export type RunForRunFormFields = Pick<Run, '__typename' | 'title_suffix' | 'schedule_note'> & {
id: string;
Expand All @@ -28,7 +29,7 @@ type WithStartsAt<RunType extends RunForRunFormFields> = Omit<RunType, 'starts_a
export type RunFormFieldsProps<RunType extends RunForRunFormFields> = {
run: RunType;
convention: EventAdminEventsQueryData['convention'];
event: EventAdminEventsQueryData['convention']['events'][0];
event: ScheduleEventInput;
onChange: React.Dispatch<React.SetStateAction<RunType>>;
};

Expand Down
8 changes: 6 additions & 2 deletions app/javascript/ClickwrapAgreement/mutations.generated.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
/* eslint-disable */
/** Internal type. DO NOT USE DIRECTLY. */
type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
/** Internal type. DO NOT USE DIRECTLY. */
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
import * as Types from '../graphqlTypes.generated';

import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type AcceptClickwrapAgreementMutationVariables = Types.Exact<{ [key: string]: never; }>;
export type AcceptClickwrapAgreementMutationVariables = Exact<{ [key: string]: never; }>;


export type AcceptClickwrapAgreementMutationData = { __typename: 'Mutation', acceptClickwrapAgreement: { __typename: 'AcceptClickwrapAgreementPayload', my_profile: { __typename: 'UserConProfile', id: string, accepted_clickwrap_agreement?: boolean | null } } };
export type AcceptClickwrapAgreementMutationData = { __typename: 'Mutation', acceptClickwrapAgreement: { __typename: 'AcceptClickwrapAgreementPayload', my_profile: { __typename: 'UserConProfile', id: string, accepted_clickwrap_agreement: boolean | null } } };


export const AcceptClickwrapAgreementDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"AcceptClickwrapAgreement"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"acceptClickwrapAgreement"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"my_profile"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"accepted_clickwrap_agreement"}}]}}]}}]}}]} as unknown as DocumentNode<AcceptClickwrapAgreementMutationData, AcceptClickwrapAgreementMutationVariables>;
8 changes: 6 additions & 2 deletions app/javascript/ClickwrapAgreement/queries.generated.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
/* eslint-disable */
/** Internal type. DO NOT USE DIRECTLY. */
type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
/** Internal type. DO NOT USE DIRECTLY. */
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
import * as Types from '../graphqlTypes.generated';

import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type ClickwrapAgreementQueryVariables = Types.Exact<{ [key: string]: never; }>;
export type ClickwrapAgreementQueryVariables = Exact<{ [key: string]: never; }>;


export type ClickwrapAgreementQueryData = { __typename: 'Query', convention: { __typename: 'Convention', id: string, name: string, clickwrap_agreement_html?: string | null, my_profile?: { __typename: 'UserConProfile', id: string, accepted_clickwrap_agreement?: boolean | null } | null } };
export type ClickwrapAgreementQueryData = { __typename: 'Query', convention: { __typename: 'Convention', id: string, name: string, clickwrap_agreement_html: string | null, my_profile: { __typename: 'UserConProfile', id: string, accepted_clickwrap_agreement: boolean | null } | null } };


export const ClickwrapAgreementQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ClickwrapAgreementQuery"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"convention"},"name":{"kind":"Name","value":"conventionByRequestHost"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"clickwrap_agreement_html"}},{"kind":"Field","name":{"kind":"Name","value":"my_profile"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"accepted_clickwrap_agreement"}}]}}]}}]}}]} as unknown as DocumentNode<ClickwrapAgreementQueryData, ClickwrapAgreementQueryVariables>;
Loading
Loading