Skip to main content

Interface: PreparedBlock

Represents a fully prepared block with all its options and metadata.

A PreparedBlock contains all the information needed to render a configurable block in the UI, including its available options, display settings, and current state. This is the primary interface used for rendering option blocks in the configurator.

Extends​

Properties​

allowEmpty?​

optional allowEmpty?: boolean

If true, this block can have no selection and still be valid. If false, a selection is required for valid configuration.

Inherited from​

OptionSetBlock.allowEmpty


blockColor​

blockColor: string

The background color for this block in the UI. Used to visually differentiate blocks in the configurator.

Inherited from​

OptionSetBlock.blockColor


blockName​

blockName: string

Unique name of the block, used for identification in the system.

Inherited from​

OptionSetBlock.blockName


buttonSettings?​

optional buttonSettings?: ButtonWidgetSettings

Configuration for button widget. Only used when mode is BUTTON_WIDGET

Inherited from​

OptionSetBlock.buttonSettings


clearable?​

optional clearable?: boolean

If true, users can clear their selection for this block, returning it to an unselected state. If false, once an option is selected, users must choose a different option but cannot deselect entirely.

Inherited from​

OptionSetBlock.clearable


collectionSetId?​

optional collectionSetId?: string

ID of the collection set this block belongs to, if applicable. Only used when type is MATERIAL_COLLECTION.

Inherited from​

OptionSetBlock.collectionSetId


colorSettings?​

optional colorSettings?: CustomColorOption

Configuration for custom color selection functionality. Only used when mode is COLOR.

Inherited from​

OptionSetBlock.colorSettings


componentId?​

optional componentId?: string

ID of the component this block is associated with, if applicable. Used in hybrid modular products to link blocks with specific components.

Inherited from​

OptionSetBlock.componentId


disabledTooltipMessage?​

optional disabledTooltipMessage?: string

Message to display as a tooltip when hovering over a disabled block. Explains to users why the block is currently unavailable.


engrave?​

optional engrave?: BlockEngraveSettings

Configuration for text engraving functionality. Only used when mode is ENGRAVE.

Inherited from​

OptionSetBlock.engrave


filterDisplayMode?​

optional filterDisplayMode?: FilterWidgetMode

Controls how filters are being displayed in filter modal. Only relevant when widgetType is FILTER or FILTER_GROUPS.

Inherited from​

OptionSetBlock.filterDisplayMode


filterExpandableState?​

optional filterExpandableState?: FilterDisplayState

If filterDisplayMode is set to 'EXPANDABLE', controls behavior of filter items. Only relevant when widgetType is FILTER or FILTER_GROUPS.

Inherited from​

OptionSetBlock.filterExpandableState


filterWidgetType​

filterWidgetType: FilterWidgetType

The type of filtering widget to use for this block, if applicable. Only relevant when widgetType is FILTER or FILTER_GROUPS.

Inherited from​

OptionSetBlock.filterWidgetType


globalOptionSetId?​

optional globalOptionSetId?: string | null

ID of a global option set associated with this block, if applicable. Global option sets can be shared across products for consistent options.

Inherited from​

OptionSetBlock.globalOptionSetId


hideDivider?​

optional hideDivider?: boolean

If true, the divider between this block and others will be hidden. Useful for creating visually connected blocks in the interface.

Inherited from​

OptionSetBlock.hideDivider


hideHeader?​

optional hideHeader?: boolean

If true, the block header will be hidden in the UI. The block's options will still be displayed, but without the block title.

Inherited from​

OptionSetBlock.hideHeader


hideInOptionPanel?​

optional hideInOptionPanel?: boolean

If true, this block will be hidden in the option panel. The block will still affect the configuration but won't be visible in the UI.

Inherited from​

OptionSetBlock.hideInOptionPanel


hideInPdf?​

optional hideInPdf?: boolean

If true, this block will be hidden in PDF exports. Allows excluding certain configuration options from generated documentation.

Inherited from​

OptionSetBlock.hideInPdf


id​

id: string

Unique identifier for this block.

Inherited from​

OptionSetBlock.id


imageSettings?​

optional imageSettings?: CustomImageOption

Configuration for custom image upload functionality. Only used when mode is IMAGE.

Inherited from​

OptionSetBlock.imageSettings


initialValue?​

optional initialValue?: string

Initial value for this block when the configurator loads. If provided, this option will be pre-selected.

Inherited from​

OptionSetBlock.initialValue


inputSettings?​

optional inputSettings?: InputOption

Configuration for input field functionality. Only used when mode is INPUT.

Inherited from​

OptionSetBlock.inputSettings


instanceId?​

optional instanceId?: string

Instance ID for this block, when used in a modular product. Uniquely identifies the block instance across multiple components.

Inherited from​

OptionSetBlock.instanceId


isDisabled?​

optional isDisabled?: boolean

If true, this block is currently disabled and cannot be interacted with. Disabled blocks might be shown with reduced opacity or other visual indicators.


isHidden?​

optional isHidden?: boolean

If true, this block is hidden from users but can still affect the configuration. Hidden blocks are typically used for system-level settings or automated configurations.

Inherited from​

OptionSetBlock.isHidden


letterMappings​

letterMappings: LetterMappings

Maps option set IDs to letters used in configuration code generation. Each option set in the block is assigned a unique letter identifier. When generating configuration codes, this letter is combined with the selected option's ordinal number to form part of the product's overall configuration code (e.g., "a3" for the 3rd option in option set "a").

Inherited from​

OptionSetBlock.letterMappings


messageBackground?​

optional messageBackground?: string

Background color for message blocks. Only applicable when mode is MESSAGE.

Inherited from​

OptionSetBlock.messageBackground


messageContent?​

optional messageContent?: string | RawDraftContentState

Content for message blocks. Can be plain text or rich text. Only used when mode is MESSAGE.

Inherited from​

OptionSetBlock.messageContent


messageIcon?​

optional messageIcon?: YesNoValue

Whether to show an icon with a message block. Only applicable when mode is MESSAGE.

Inherited from​

OptionSetBlock.messageIcon


messageIconColor?​

optional messageIconColor?: string

Color for the icon in message blocks. Only applicable when mode is MESSAGE.

Inherited from​

OptionSetBlock.messageIconColor


messageIconType?​

optional messageIconType?: MessageIconType

The type of icon to use in message blocks. Only applicable when mode is MESSAGE.

Inherited from​

OptionSetBlock.messageIconType


messageStroke?​

optional messageStroke?: string

Stroke color for message blocks. Only applicable when mode is MESSAGE.

Inherited from​

OptionSetBlock.messageStroke


messageType?​

optional messageType?: MessageType

The type or category of the message. Can be used to display different message styling (info, warning, error, etc). Only applicable when mode is MESSAGE.

Inherited from​

OptionSetBlock.messageType


mobileThumbColumns?​

optional mobileThumbColumns?: 1 | 2 | 3 | 4 | "AUTO" | 5 | 6

Number of columns to display for thumbnail options on mobile devices. "AUTO" allows the system to determine the optimal layout for smaller screens.

Inherited from​

OptionSetBlock.mobileThumbColumns


mode​

mode: OptionSetMode

The mode that determines how options are sourced and what widget functionality is available. This defines whether the block uses linked option sets, manual options, or specialized widgets like image upload, engraving, color picker, etc.

Inherited from​

OptionSetBlock.mode


name​

name: string

Display name of the block shown to users.

Overrides​

OptionSetBlock.name


nextLetter​

nextLetter: string

The next available letter to assign when adding new option sets to this block. Maintains unique letter assignments across option sets in the configuration system.

Inherited from​

OptionSetBlock.nextLetter


options?​

optional options?: OptionSetOption[]

Available options for this block. These are the selectable choices presented to users for this block.


optionSetIds​

optionSetIds: string[]

IDs of option sets associated with this block. For MATERIAL_COLLECTION type, these are automatically populated based on the collection. For OPTION_SET type, these are manually specified.

Inherited from​

OptionSetBlock.optionSetIds


optionSetsData?​

optional optionSetsData?: OptionSetData[]

Data for the option sets contained within this block. Contains metadata and details about each option set associated with this block.


optionsLength​

optionsLength: number

The total number of options available in this block. This can be used for UI layout decisions or validation.


printOnDemandSettings?​

optional printOnDemandSettings?: PrintOnDemandOption

Configuration for print-on-demand functionality. Only used when mode is PRINT_ON_DEMAND.

Inherited from​

OptionSetBlock.printOnDemandSettings


showFilters?​

optional showFilters?: YesNoValue

If true will display selected filters in thumbnails preview. Only relevant when widgetType is FILTER or FILTER_GROUPS.

Inherited from​

OptionSetBlock.showFilters


showModalSearch?​

optional showModalSearch?: YesNoValue

If true, this block will display search for filters in filter modal. Only relevant when widgetType is FILTER or FILTER_GROUPS.

Inherited from​

OptionSetBlock.showModalSearch


showPriceDifference?​

optional showPriceDifference?: boolean

If true, the price difference will be displayed for options in this block based on their Additional Price Codes.

Inherited from​

OptionSetBlock.showPriceDifference


showThumbSearch?​

optional showThumbSearch?: YesNoValue

If true, this block will display search for thumbnails.

Inherited from​

OptionSetBlock.showThumbSearch


sliderSettings?​

optional sliderSettings?: SliderOption

Configuration for slider functionality. Only used when mode is SLIDER

Inherited from​

OptionSetBlock.sliderSettings


thumbBorder?​

optional thumbBorder?: YesNoValue

Whether to display borders around thumbnails. When YES, adds a visual border to each thumbnail for better separation.

Inherited from​

OptionSetBlock.thumbBorder


thumbCaption?​

optional thumbCaption?: YesNoValue

Whether to show captions beneath thumbnails. When YES, displays option names under the thumbnail images.

Inherited from​

OptionSetBlock.thumbCaption


thumbColumns?​

optional thumbColumns?: 1 | 2 | 3 | 4 | "AUTO" | 5 | 6

Number of columns to display for thumbnail options. "AUTO" allows the system to determine the optimal layout based on available space and number of options.

Inherited from​

OptionSetBlock.thumbColumns


thumbnail?​

optional thumbnail?: string

Block thumbnail image. Currently used only at custom UIs

Inherited from​

OptionSetBlock.thumbnail


thumbStyle?​

optional thumbStyle?: ThumbStyle

The visual style to use for thumbnail options. Determines corner rounding and overall appearance of thumbnail images.

Inherited from​

OptionSetBlock.thumbStyle


type​

type: OptionSetType | null

The source type for options in this block when in LINKED mode. Determines whether options come from material collections or specific option sets.

Inherited from​

OptionSetBlock.type


widgetSource?​

optional widgetSource?: WidgetSourceType

Source of this block settings. By default is Local Settings

Inherited from​

OptionSetBlock.widgetSource


widgetType​

widgetType: WidgetType

The type of UI widget to use for rendering this block's options. Determines the visual presentation and interaction model for the options.

Inherited from​

OptionSetBlock.widgetType