From 9d2e646964982cd2b036929d6f3dffcc351421cd Mon Sep 17 00:00:00 2001 From: mortendevold <2213243+mortendevold@users.noreply.github.com> Date: Thu, 10 Oct 2024 08:16:58 +0200 Subject: [PATCH] Add missing config option hideSectionsNotForSale (#25) --- src/index.test.ts | 3 ++- src/index.ts | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index.test.ts b/src/index.test.ts index 36fdf9d..015301c 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -201,7 +201,8 @@ const fullChartRendererConfig: Required = { showRowLines: false, themeColors: 'someTheme', themePreset: 'somePreset', - tooltipStyle: 'someStyle' + tooltipStyle: 'someStyle', + hideSectionsNotForSale: false } // Set up a complete Event Manager config diff --git a/src/index.ts b/src/index.ts index ab12ab1..ec2cee3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -322,6 +322,10 @@ export interface ChartRendererConfigOptions extends DeprecatedConfigProperties, * Called when the chart needs to prompt how many places to select for each ticket type. {@link https://docs.seats.io/docs/renderer/prompts-api/onPlacesWithTicketTypesPrompt See documentation} */ onPlacesWithTicketTypesPrompt?: (parameters: PlacesWithTicketTypesPromptParameters, confirmSelection: (placesPerTicketType: Dict | string[]) => void) => void + /** + * For charts with sections, enabling this setting will hide sections where all bookable objects are set as not for sale. By extension, this will also hide entire floors if every object on it is set as not for sale. {@link https://docs.seats.io/docs/renderer/config-hidesectionsnotforsale/ See documentation} + */ + hideSectionsNotForSale?: boolean } export type ExtractedEventManagerProps = Pick