Other / Uncategorized

Every iPrintessApi method or property in printess-editor.d.ts that has no #ai-api:<category> JSDoc tag - grouped here so the reference stays complete rather than silently omitting them. Custom types referenced below (parameter and return shapes) are documented on the Types reference.

acceptDefaultTextIfMandatory

acceptDefaultTextIfMandatory(): boolean

Returns all default english translations or if language property is set / browser language is detected (if set to auto) the respective translation if available

Returns: boolean

addTableRow

addTableRow(fieldNameOrId: string, type: string): number | null

Adds a new row to a table form field. Returns row-index of added row.

Parameter Type Description
fieldNameOrId string The property-id or a form-field-name or form-field-id
type string each form field table should have a type column which can be set on insert.

Returns: number | null

addTableRowExt

addTableRowExt(fieldNameOrId: string, type: string, insertPosition?: number): { index: number | null; row: Record<string, any> | null }

Adds a new row to a table form field. Returns row-index of added row and the added row itself.

Parameter Type Description
fieldNameOrId string The property-id or a form-field-name or form-field-id
type string each form field table should have a type column which can be set on insert.
insertPosition? number

Returns: { index: number | null; row: Record<string, any> | null }

addTableRows

addTableRows(fieldNameOrId: string, type: string, ffLibName: string, libIndizies: Array<number>): number | null

Adds multiple table rows at once from another table from field

Parameter Type Description
fieldNameOrId string The property-id or a form-field-name or form-field-id
type string each form field table should have a type column which can be set on insert.
ffLibName string Name of form-field which contains row-library
libIndizies Array<number> list if row-indizies of row-library

Returns: number | null

addTableRowsExt

addTableRowsExt(fieldNameOrId: string, type: string, ffLibName: string, libIndizies: Array<number>, insertPosition?: number): { index: number | null, table: Array<Record<string, any>> | null }

Adds multiple table rows at once from another table from field

Parameter Type Description
fieldNameOrId string The property-id or a form-field-name or form-field-id
type string each form field table should have a type column which can be set on insert.
ffLibName string Name of form-field which contains row-library
libIndizies Array<number> list if row-indizies of row-library
insertPosition? number

Returns: { index: number | null, table: Array<Record<string, any>> | null }

aiDesignKeywords

aiDesignKeywords(): Array<string>

Returns: Array<string>

aiDesignMode

aiDesignMode(): "none" | "printess-make" | "claude-design"

Returns: “none” | “printess-make” | “claude-design”

aiTextEditOptionAllows

aiTextEditOptionAllows(): Array<AiTextEditOptionAllow>

returns an array of AI Text Edit Options the customer can choose from (in a dropdown) when enabling the showAiTextEditOptions.

Returns: Array<AiTextEditOptionAllow>

allowImageBackgroundRemove

allowImageBackgroundRemove(propertyId: string): boolean

Tells UI to always show image background remove button.

Parameter Type Description
propertyId string The selected property-id

Returns: boolean

allowImageUpscale

allowImageUpscale(propertyId: string): boolean

Tells UI to always show image background remove button.

Parameter Type Description
propertyId string The selected property-id

Returns: boolean

applyImageFilterSnippet

applyImageFilterSnippet(filterSnippetUrl: string): Promise<void>

Applies image-filter-snippet to selected image

Parameter Type Description
filterSnippetUrl string

Returns: Promise<void>

applyNumOfColsToLayoutsDialogMobile

applyNumOfColsToLayoutsDialogMobile(): boolean

Apply number of columns for layouts also to mobile Layout Selection Overlay

Returns: boolean

bcuiLoaded

bcuiLoaded(): Promise<void>

Called by BCUI when fully loaded and executes center spread in view first center

Returns: Promise<void>

bringErrorIntoView

bringErrorIntoView(err: iExternalError): Promise<void>

Select and zoom to the frame(s) mentioned in the error object.

Parameter Type Description
err iExternalError

Returns: Promise<void>

bringErrorIntoViewV2

bringErrorIntoViewV2(err: iErrorType): Promise<void>
Parameter Type Description
err iErrorType

Returns: Promise<void>

canChangeTableRowIndex

canChangeTableRowIndex(propertyId: string): boolean

Tells if a change position input should be displayed for the table row that is being edited changing the position (index) value in the table edit row moves the row accordingly to the new position

Parameter Type Description
propertyId string

Returns: boolean

canHaveDesktopFramePropertiesBar

canHaveDesktopFramePropertiesBar(): boolean

Returns if desktop ui should display a frame properties bar

Returns: boolean

canIgnoreLowImageResolution

canIgnoreLowImageResolution(): boolean

Tells if user is allowed to ignore low image resoution warnings

Returns: boolean

canPasteTableRowsJSON

canPasteTableRowsJSON(propertyId: string): boolean

Tells if user is allowed to paste JSON data to a table form field.

Parameter Type Description
propertyId string

Returns: boolean

canUseClaudeDesign

canUseClaudeDesign(): boolean

If claude design is available

Returns: boolean

canUseClaudeDevStuff

canUseClaudeDevStuff(): boolean

If claude design internal testing stuff is available

Returns: boolean

closePropertiesOverlay

closePropertiesOverlay(): Promise<void>

for example: in bcui you can close the the overlay if a form field changes

Returns: Promise<void>

colorIntensity

colorIntensity(color: string): "super-light" | "super-dark" | "light" | "dark" | "normal" | "no-color"

Calculates the brightness of a color, return no-color if color can’t be parsed

Parameter Type Description
color string hex or rgb() color

Returns: “super-light” | “super-dark” | “light” | “dark” | “normal” | “no-color”

createCropUi

createCropUi(propertyId: string, forDesktopDialog: boolean): null | { container: HTMLDivElement, setScale: (s: number) => void, getCropBox(): { top: number, left: number, width: number, height: number } }

Returns a simple ui to change the postion of an image

Parameter Type Description
propertyId string
forDesktopDialog boolean give more space if for desktop dialog

Returns: null | { container: HTMLDivElement, setScale: (s: number) => void, getCropBox(): { top: number, left: number, width: number, height: number } }

createCutContour

createCutContour(propertyId: string, outline?: number): Promise<boolean>

Creates a cut contour around the image

Parameter Type Description
propertyId string The selected property-id
outline? number

Returns: Promise<boolean>

createImageEdit

createImageEdit(propertyId: string, prompt: string, quality?: "low" | "medium" | "high", images?: string[], imageInfo?: { boxId: string | undefined, aspect: number, parentBoxId?: string }, model?: string,): Promise<boolean>

Modifies an existing image based on a prompt and uploads & assigns it to current frame.

Parameter Type Description
propertyId string
prompt string
quality? “low” | “medium” | “high”
images? string[]
imageInfo? { boxId: string | undefined, aspect: number, parentBoxId?: string }
model? string

Returns: Promise<boolean>

createText2Image

createText2Image(prompt: string, style: SdxlStyle, negativePrompt?: string, model?: string, imageInfo?: { boxId: string | undefined, aspect: number, parentBoxId?: string }): Promise<void>

Creates an image based on a prompt and style and uploads & assigns it to current frame.

Parameter Type Description
prompt string
style SdxlStyle
negativePrompt? string
model? string
imageInfo? { boxId: string | undefined, aspect: number, parentBoxId?: string }

Returns: Promise<void>

debug

debug(): boolean

Returns global debug flag

Returns: boolean

editTableFullscreen

editTableFullscreen(): boolean

Indicates if a table can be edited in fullscreen mode

Returns: boolean

enableA11yForTableControl

enableA11yForTableControl(): boolean

Returns wether UI should show up/down buttons in table-control

Returns: boolean

enableCustomColors

enableCustomColors(): boolean

Returns if buyer ui should display option for custom colors in color dropdown

Returns: boolean

executeFormFieldScript

executeFormFieldScript(propertyId: string): Promise<string>

Runs a form field script, property-id must point to form field.

Parameter Type Description
propertyId string

Returns: Promise<string>

executeScript

executeScript(scriptName: string, args: string[]): string | Promise<string>
Parameter Type Description
scriptName string name of script in current template
args string[] all arguments as an array of string

Returns: string | Promise<string>

Used in these examples:

focusActiveTextEditor

focusActiveTextEditor(): boolean

Focus single or multi line editor when active

Returns: boolean

generateLiveTextFromAI

generateLiveTextFromAI(pid: string, promptForAI: string, usePreviousText: boolean): Promise<void>

Streams AI-generated text based on the given prompt and current editor content. Updates the editor live as the response is received in chunks.

Parameter Type Description
pid string
promptForAI string - Instructional prompt to guide the AI generation.
usePreviousText boolean

Returns: Promise<void>

getAddToBasketCallback

getAddToBasketCallback(): null | ((saveToken: string, url: string) => void)

Returns the add to basket callback you have set in attachPrintess()

Returns: null | ((saveToken: string, url: string) => void)

getAiDesignMakeData

getAiDesignMakeData(): iMakeData | null

returns make-data received on attach printess

Returns: iMakeData | null

getAiDesignProperties

getAiDesignProperties(): { name: string, p: iExternalProperty }[]

Returns: { name: string, p: iExternalProperty }[]

getAiImageEffects

getAiImageEffects(): Promise<ImageAIFilterCategory[]>

loads all available Image AI Filters

Returns: Promise<ImageAIFilterCategory[]>

getAllRequiredPropertiesBySpreadIdSync

getAllRequiredPropertiesBySpreadIdSync(spreadId: string): Array<Array<iExternalProperty>>

Returns a list of all required properties on a specific spread (sync)

Parameter Type Description
spreadId string

Returns: Array<Array<iExternalProperty>>

getAllRequiredPropertiesSync

getAllRequiredPropertiesSync(): Array<Array<iExternalProperty>>

Returns a list of all required properties (sync)

Returns: Array<Array<iExternalProperty>>

getAspectControl

getAspectControl(): HTMLElement | ""

Returns the Designer Side Aspect Control

Returns: HTMLElement | “”

getAvailableFontSizes

getAvailableFontSizes(size: string): { sizes: Array<number>, unit: string }

Returns list of available Font Sizes based on “size” unit.

Parameter Type Description
size string

Returns: { sizes: Array<number>, unit: string }

getBackButtonCallback

getBackButtonCallback(): null | ((saveToken: string, thumbnailUrl: string) => void)

Returns the back button callback you have set in attachPrintess()

Returns: null | ((saveToken: string, thumbnailUrl: string) => void)

getButtonCircleModel

getButtonCircleModel(m: iMobileUIButton, isSelected: boolean, customHandwriting?: boolean, customSplitterButton?: boolean, customTableRecordButton?: boolean): iButtonCircle

Mobile UI helper method to get model to draw a circle button including icons, gauge, etc. uiHelper contains a method to create an SVG from this circle model

Parameter Type Description
m iMobileUIButton The mobile button to create a circle for
isSelected boolean If the button is selected
customHandwriting? boolean
customSplitterButton? boolean
customTableRecordButton? boolean

Returns: iButtonCircle

getClaudeDesignSettings

getClaudeDesignSettings(): iClaudeDesignSettings | undefined

Returns last persisted Claude design dialog inputs from template properties.

Returns: iClaudeDesignSettings | undefined

getColorInfo

getColorInfo(p: iExternalProperty): iExternalColor | null
Parameter Type Description
p iExternalProperty

Returns: iExternalColor | null

getContentEditables

This method is deprecated.

getContentEditables(): TemplateEditables

Returns: TemplateEditables

getErrorCallback

getErrorCallback(): null | ((errorName: ErrorName, data?: Record<string, string>) => void)

Returns the error callback you have set in attachPrintess()

Returns: null | ((errorName: ErrorName, data?: Record<string, string>) => void)

getFirstLevelImageButtons

getFirstLevelImageButtons(p: iExternalProperty, addImageTools: boolean): Array<iMobileUIButton>

Used in BCUI, gets new basic image categorie buttons

Parameter Type Description
p iExternalProperty
addImageTools boolean

Returns: Array<iMobileUIButton>

getFrameUiHintPosition

getFrameUiHintPosition(): Promise<iExternalFrame>

Get frames available on spread. Return first editable frame.

Returns: Promise<iExternalFrame>

getFreestylePhotobookWizardHeadline

getFreestylePhotobookWizardHeadline(): string

Returns headline to display in wizard for freestyle photobooks.

Returns: string

getImageBoxesForColorPalette

getImageBoxesForColorPalette(): string[]

Returns maximum two image IDs with biggest boxes on a spread (to define colors from it)

Returns: string[]

getImageFilterSnippets

getImageFilterSnippets(tags: Array<string> | ReadonlyArray<string>): Promise<Array<iExternalSnippet>>

Get a list of all image-filter-snippets having any of the provided tags

Parameter Type Description
tags Array<string> | ReadonlyArray<string>

Returns: Promise<Array<iExternalSnippet>>

getInitialTabId

getInitialTabId(): string

Get the id if the tab to display on start-up default is #PHOTOS

Returns: string

getLetterGeneratorJson

getLetterGeneratorJson(): Promise<string | undefined>

Returns the JSON required to generate an AI Letter

Returns: Promise<string | undefined>

getLetterGeneratorMenuTitle

getLetterGeneratorMenuTitle(): string

Get the menu title displayed when opening the AI Text Generator dropdown in the Buyer Side

Returns: string

getLoadTemplateButtonCallback

getLoadTemplateButtonCallback(): null | (() => void)

Returns the loadTemplateButtonCallback you have set in attachPrintess()

Returns: null | (() => void)

getMagicPhotobookSettingsTab

getMagicPhotobookSettingsTab(): "NONE" | "#FORMFIELDS" | "#FORMFIELDS1" | "#FORMFIELDS2"

Returns tab displayed in magic photobook settings

Returns: “NONE” | “#FORMFIELDS” | “#FORMFIELDS1” | “#FORMFIELDS2”

getMagicPhotobookWizardHeadline

getMagicPhotobookWizardHeadline(): string

Returns headline to display in wizard for magic photobooks.

Returns: string

getMobileImageCropModeEnabled

getMobileImageCropModeEnabled(): boolean

get if mobile image crop mode is enabled and should show the circular image pan-icon

Returns: boolean

getMobileUiBackgroundButton

getMobileUiBackgroundButton(): Array<iMobileUIButton>

Returns change background button if available

Returns: Array<iMobileUIButton>

getMobileUiButtons

getMobileUiButtons(properties: Array<iExternalProperty>, propertyIdFilter: "all" | "root" | string, customHandwriting?: boolean): Array<iMobileUIButton>

Mobile UI helper method to convert a list of properties to a list of mobile buttons to show to the buyer

Parameter Type Description
properties Array<iExternalProperty> list of properties to get buttons from
propertyIdFilter “all” | “root” | string can be the id of a specific property to get only property related buttons (for images and multi-line text)
customHandwriting? boolean

Returns: Array<iMobileUIButton>

getMobileUiRecordNavigationArrows

getMobileUiRecordNavigationArrows(): Array<iMobileUIButton>

Mobile UI helper method to go through a table form-field which is set as data-source in the template

Returns: Array<iMobileUIButton>

getMobileUiScissorsButtons

getMobileUiScissorsButtons(): Array<iMobileUIButton>

Returns horizontal and vertical scissor buttons if available

Returns: Array<iMobileUIButton>

getMobileUiSplitterGapButton

getMobileUiSplitterGapButton(): Array<iMobileUIButton>

Returns grid gap button for splitter frames

Returns: Array<iMobileUIButton>

getMobileUiSplitterLayoutsButton

getMobileUiSplitterLayoutsButton(): Array<iMobileUIButton>

Returns change layouts button for splitter text frames

Returns: Array<iMobileUIButton>

getMobileUiSplitterToImageButton

getMobileUiSplitterToImageButton(): Array<iMobileUIButton>

Returns text to image convert button if available

Returns: Array<iMobileUIButton>

getMobileUiSplitterToTextButton

getMobileUiSplitterToTextButton(): Array<iMobileUIButton>

Returns image to text convert button if available

Returns: Array<iMobileUIButton>

getPanelUiHintVisibility

getPanelUiHintVisibility(pos: PanelUiHintPos, view: "mobile" | "desktop"): boolean

Returns view dependend visibility of a certain panel-ui-hint

Parameter Type Description
pos PanelUiHintPos
view “mobile” | “desktop”

Returns: boolean

getPasteboardColor

getPasteboardColor(): string

Returns current pasteboard color

Returns: string

getRegExp

getRegExp(key: string | "europe-letters"): string | null
Parameter Type Description
key string | “europe-letters” retrieves a regexp expression from dictonary

Returns: string | null

getSaveTemplateCallback

getSaveTemplateCallback(): null | ((saveToken: string, type: "save" | "close", thumbnailUrl: string) => void)

Returns the save button callback you have set in attachPrintess()

Returns: null | ((saveToken: string, type: “save” | “close”, thumbnailUrl: string) => void)

getScaledFontSize

getScaledFontSize(direction: "up" | "down", propertyId: string | "ED_selection", overrideSize?: string): string | null

Gets the current font-size either in text-editor or form mode as Length (string like 12% or 14pt)

Parameter Type Description
direction “up” | “down”
propertyId string | “ED_selection”
overrideSize? string

Returns: string | null

getScriptButtons

getScriptButtons(): Array<iExternalButton>

Returns all PanelUi button objects defined in global scripts

Returns: Array<iExternalButton>

getShopDataCallback

getShopDataCallback(): null | (() => Promise<IShopData>)

Returns the shop data callback you have set in attachPrintess()

Returns: null | (() => Promise<IShopData>)

getShopDataLoadedCallback

getShopDataLoadedCallback(): null | ((data: ISavedShopData) => void),

Returns the shop callback that needs to be called if the user clicks on load and selects a saved design

Returns: null | ((data: ISavedShopData) => void)

getShopLoginCallback

getShopLoginCallback(): null | ((type: "register" | "login", saveToken: string, thumbnailUrl: string, displayName: string) => void)

Returns the shop login callback you have set in attachPrintess()

Returns: null | ((type: “register” | “login”, saveToken: string, thumbnailUrl: string, displayName: string) => void)

getShopProjectDisplayNameCallback

getShopProjectDisplayNameCallback(): null | (() => Promise<string>)

Returns the display name callback you have set in attachPrintess()

Returns: null | (() => Promise<string>)

getShopSavedDataCallback

getShopSavedDataCallback(): null | ((shopData: IShopDataProjectName) => void)

Returns the shop saved data callback you have set in attachPrintess()

Returns: null | ((shopData: IShopDataProjectName) => void)

getStyleValue

getStyleValue(className: string, propertyName: string): string

Retrieves a style value from a particular class

Parameter Type Description
className string
propertyName string

Returns: string

getTableGroupType

getTableGroupType(): string

Returns group type as string for table form fields

Returns: string

getTableRowIndex

getTableRowIndex(propertyId: string): number

Retrieves the current row index for a table-property if table is set to be data-source of template the call returns current data-index

Parameter Type Description
propertyId string id of a table property

Returns: number

getTableRowsToAdd

getTableRowsToAdd(ffName: string): Array<{ index: number, label: string }>

Returns the row-indizies of a table form field to add to another table form field. An array of those indizies can be passed to ‘addTableRows()’

Parameter Type Description
ffName string Form Field Name

Returns: Array<{ index: number, label: string }>

getTableSelectListByFormFieldName

getTableSelectListByFormFieldName(ffName: string): Array<{ value: string, label: string }> | null

Returns name/value-list only from table form field

Parameter Type Description
ffName string Name of FormField

Returns: Array<{ value: string, label: string }> | null

getText2ImageStyles

getText2ImageStyles(): Array<string>

Returns list of available SDXL Styles

Returns: Array<string>

getThemeDocId

getThemeDocId(): string

Retrieve doc-id of current theme

Returns: string

getThemeName

getThemeName(): string

Retrieve panel-theme of current document

Returns: string

hasImageLayoutSelection

hasImageLayoutSelection(): boolean

Returns if auto image layout selection is enabled

Returns: boolean

hasImageSwap

hasImageSwap(): boolean

Indicates if curent selected image can swap

Returns: boolean

hasMetaProperties

hasMetaProperties(p: iExternalProperty): boolean

Returns if an externalProperty resolves to multiple mobile-ui-buttons

Parameter Type Description
p iExternalProperty

Returns: boolean

hasOverlayTextEditing

hasOverlayTextEditing(): boolean

Returns if text-editing should be displayed as overlay on desktop

Returns: boolean

hasTextOverflow

hasTextOverflow(propertyId: string): boolean

Returns true if the associated mutli-line text-frame has text which does not fit into the frame

Parameter Type Description
propertyId string

Returns: boolean

hideDoneButtonInUiHelper

This method is deprecated.

hideDoneButtonInUiHelper(): boolean

Hides Done Button in UI-Helper

Returns: boolean

hideOverlay

hideOverlay(): void

Hides printess editor overlay (see showOverlay())

Returns: void

imageSwapActive

imageSwapActive(): boolean

Indicates if editor is in image swap mode

Returns: boolean

isDataSource

isDataSource(propertyId: string): boolean

tells if the propertyId refers to a table form-field which is set as data-source in the template

Parameter Type Description
propertyId string

Returns: boolean

isOffCanvasProperty

isOffCanvasProperty(p: iExternalProperty): boolean

For off-canvas displays of to many frame properties. Determines if the property is suitable to be displayed off canvas.

Parameter Type Description
p iExternalProperty the property to look for

Returns: boolean

isPrintessSystem

isPrintessSystem(): boolean

Returns true if the system is the Printess SaaS system.

Returns: boolean

isScrolledToBottom

isScrolledToBottom(): boolean

indicates if printess view scrolling has reached the bottom

Returns: boolean

Used in these examples:

isScrolledToTop

isScrolledToTop(): boolean

indicates if printess view scrolling has reached the top

Returns: boolean

isShopUserLoggedInCallback

isShopUserLoggedInCallback(): null | (() => Promise<boolean>)

Returns the login state callback you have set in attachPrintess()

Returns: null | (() => Promise<boolean>)

isTextButton

isTextButton(m: iMobileUIButton): boolean

Returns if a iMobileUIButton should display text instead of an icon

Parameter Type Description
m iMobileUIButton

Returns: boolean

isTextEditorOpen

isTextEditorOpen(): boolean

Returns true if either rich- or simple-text-editor is currently active

Returns: boolean

jumpToFormFieldsAfterLayoutApply

jumpToFormFieldsAfterLayoutApply(): boolean

Wether UI should jump to FormFields Tab after Layout Selection

Returns: boolean

languageLong

languageLong(): string

Returns long language code if available. Otherwise returns short code like languageShort(). Format: lower case main language + sub language in upper case, like “en-GB” or “de-DE”

Returns: string

languageShort

languageShort(): string

Returns short language code in lower case, like “en” or “de”

Returns: string

logout

logout(): void

Logs the current printess user out Not available for buyer-side users! Only if userInBuyerSide() === true

Returns: void

neverHideMobileToolbar

neverHideMobileToolbar(): boolean

Returns status of config-flag neverHideMobileToolbar, default is false.

Returns: boolean

numberOfColumns

numberOfColumns(): number

Returns how many columns a Change Layout overview should have to display layout snippets more properly

Returns: number

populateDesign

populateDesign(autoSelectLayout: boolean, callback: (percent: number, textPreview: string) => void, errorCallback: (error: any) => void): Promise<void>
Parameter Type Description
autoSelectLayout boolean
callback (percent: number, textPreview: string) => void
errorCallback (error: any) => void

Returns: Promise<void>

raiseTabChangeEvent

raiseTabChangeEvent(tabId: string): void

Used by panel-ui to call an existing onTabChanged script (event)

Parameter Type Description
tabId string

Returns: void

removeAiImageFramesFromPrimaryDocument

removeAiImageFramesFromPrimaryDocument(): Promise<void>

Returns: Promise<void>

removeBackgroundFace

removeBackgroundFace(propertyId: string): Promise<boolean>

Cut out face of currently selected images

Parameter Type Description
propertyId string The selected property-id

Returns: Promise<boolean>

removeHandwritingImage

removeHandwritingImage(): Promise<boolean>

removes image for rich-text-frames which have a handwriting image set Sets back to text

Returns: Promise<boolean>

removeImageBackground

removeImageBackground(propertyId: string): Promise<boolean>

Removes Background of currently selected images

Parameter Type Description
propertyId string The selected property-id

Returns: Promise<boolean>

resetUndoBufferAfterInitialLayoutSelection

resetUndoBufferAfterInitialLayoutSelection(spreadId: string): void

Lets printess know that the layout has been applied

Parameter Type Description
spreadId string

Returns: void

runClaudeDesign

runClaudeDesign(prompt: string, skill?: "printess-layout-skill", settings?: iClaudeDesignSettings): Promise<ConversionTask>

Render Design via Claude. Persists settings to template properties when provided.

Parameter Type Description
prompt string
skill? “printess-layout-skill”
settings? iClaudeDesignSettings

Returns: Promise<ConversionTask>

selectedFrameBarFeature

selectedFrameBarFeature(): { images: number, texts: number, shapes: number, storys: number, total: number }

Tells the ui if it can rely that only one of the returned frame-types is selected

Returns: { images: number, texts: number, shapes: number, storys: number, total: number }

selectLayoutDialogHasBeenShownForCurrentSpread

selectLayoutDialogHasBeenShownForCurrentSpread(spreadId: string): void

Register Select Layout Dialog shown for specific Spread

Parameter Type Description
spreadId string

Returns: void

selectLayoutsTabOneTime

selectLayoutsTabOneTime(): boolean

Indicates if a Layouts Tab should be auto selected;

Returns: boolean

selectTab

selectTab(tab: "#NONE" | "#LAYOUTS" | "#PHOTOS" | "#THEME" | "#PAGES" | "#ADD-TEXT" | "#ADD-IMAGE" |
    "#FORMFIELDS" | "#FORMFIELDS1" | "#FORMFIELDS2" | string): Promise<void>

Selects Tab in Panel-Ui

Parameter Type Description
tab “#NONE” | “#LAYOUTS” | “#PHOTOS” | “#THEME” | “#PAGES” | “#ADD-TEXT” | “#ADD-IMAGE” | “#FORMFIELDS” | “#FORMFIELDS1” | “#FORMFIELDS2” | string

Returns: Promise<void>

setBcuiMobile

setBcuiMobile(v: boolean): void
Parameter Type Description
v boolean

Returns: void

setCustomIcons

setCustomIcons(icons: Partial<Record<iconName, string>>, addToExisting: boolean): void

Sets attach-parameter icons later in the game

Parameter Type Description
icons Partial<Record<iconName, string>>
addToExisting boolean

Returns: void

setCustomScripts

setCustomScripts(scripts: Partial<Record<string, string>>, addToExisting: boolean): void

Sets attach-parameter scripts later in the game

Parameter Type Description
scripts Partial<Record<string, string>>
addToExisting boolean

Returns: void

setDefaultHyphenationLanguage

setDefaultHyphenationLanguage(lang: iExternalHyphenationLanguage): Promise<boolean>

Sets global hyphenation language which overrides local language set on story/text-frame level.

Parameter Type Description
lang iExternalHyphenationLanguage language

Returns: Promise<boolean>

setEditorText

setEditorText(text: string): boolean

Replaces multi-line text only works with a current active multi-line-text-editor

Parameter Type Description
text string The text to insert into the active multi-line editor

Returns: boolean

setIFrameViewPort

setIFrameViewPort(v: { offsetTop: number, height: number }): void

only for internal use, to transfer visual-viewport to iOs in iframe-mode

Parameter Type Description
v { offsetTop: number, height: number }

Returns: void

setTableCell

setTableCell(fieldNameOrId: string, rowIndex: number, col: iExternalTableColumn, value: string | number | boolean): Promise<iExternalError | null>

updates a specific cell of a form field of type “table” Any then all other updates, this will NOT trigger a selection change event on buyer side

Parameter Type Description
fieldNameOrId string
rowIndex number
col iExternalTableColumn
value string | number | boolean

Returns: Promise<iExternalError | null>

setTableCellV2

setTableCellV2(fieldNameOrId: string, rowIndex: number, col: iExternalTableColumn, value: string | number | boolean): Promise<iErrorType | null>
Parameter Type Description
fieldNameOrId string
rowIndex number
col iExternalTableColumn
value string | number | boolean

Returns: Promise<iErrorType | null>

setTableRowIndex

setTableRowIndex(propertyId: string, index: number): void

Sets the selected index of the primary data-source if the propertyId refers to a table form-field which is set as data-source in the template

Parameter Type Description
propertyId string id of a table property
index number current row-index to select

Returns: void

setTextStyleProperty

setTextStyleProperty(propertyId: string, name: "font" | "lineHeight" | "color" | "size" | "tracking" | "hAlign" | "vAlign" | "pStyle" | "baselineScript", value: string, textStyleMode?: textStyleModeEnum): Promise<string>

Method to set a text style meta-property

Parameter Type Description
propertyId string
name “font” | “lineHeight” | “color” | “size” | “tracking” | “hAlign” | “vAlign” | “pStyle” | “baselineScript”
value string
textStyleMode? textStyleModeEnum

Returns: Promise<string>

setUserHasZoomedFlag

setUserHasZoomedFlag(newValue: boolean): void

Tells printess that a user interaction has changed the zoom, no automatic spread zoom will be executed after this

Parameter Type Description
newValue boolean

Returns: void

showAiImageEffects

showAiImageEffects(): boolean

Returns if buyer should be able to use advanced ai image effects

Returns: boolean

showAiTextEditOptions

showAiTextEditOptions(): boolean

Allow AI Text editing like spell checking, changing writing-style, etc.

Returns: boolean

showColorDialog

showColorDialog(p: iExternalProperty, bcuiCssVariables?: any): Promise<iExternalColor | null>

Shows internal color dialog to select cmyk color

Parameter Type Description
p iExternalProperty
bcuiCssVariables? any

Returns: Promise<iExternalColor | null>

showContextMenu

showContextMenu(e: MouseEvent, items: Array<iExternalContextMenuItem>): void

Displays a dropdown Menu at the target position with the set menu items

Parameter Type Description
e MouseEvent MouseEvent to get the target and mouse position
items Array<iExternalContextMenuItem> Menu items that should be displayed

Returns: void

showDocumentBackButton

showDocumentBackButton(): boolean

Returns: boolean

showEnterTextEditorButton

showEnterTextEditorButton(): boolean

Returns true if either rich- or simple-text-editing is allowed (text-content is turned on)

Returns: boolean

showFormFieldTabsAsSteps

showFormFieldTabsAsSteps(): boolean

Returns true if a previous step is availabel

Returns: boolean

showLayoutsDialog

showLayoutsDialog(): boolean

Indicates if a Layouts Dialog should be displayed when initially opening the Buyer Side to choose a Layout Snippet

Returns: boolean

showLoadButton

showLoadButton(): boolean

Returns true if the ui should show a “load” button.

Returns: boolean

showMobileTabNavigation

showMobileTabNavigation(): boolean

Returns Buyer-Side Flag if ui should show bottom tab bar on mobile

Returns: boolean

showOverlay

showOverlay(message: string): void

Displays a grey overlay on printess editor

Parameter Type Description
message string Message to show on overlay

Returns: void

showPagesOnLoad

showPagesOnLoad(): iShowPagesPreviewMode

Tells UI to show pages-overview after magic-photobook-wizzard has been completeted

Returns: iShowPagesPreviewMode

showPhotoTab

showPhotoTab(): boolean

If Tab-Navigation is enabled, this method tells if a “PHOTO” tab makes sense.

Returns: boolean

showSimplifiedPagesView

showSimplifiedPagesView(): iShowPagesPreviewMode

Tells UI to show simplified pages view as last step of the magic-photobook-wizzard

Returns: iShowPagesPreviewMode

showSnippetPreviewOverlay

showSnippetPreviewOverlay(): boolean

Enables snippet preview overlay on snippet thumbnail hover

Returns: boolean

showTabNavigation

showTabNavigation(): boolean

Returns Buyer-Side Flag if ui should show left tab bar

Returns: boolean

showTabNavigationSetting

showTabNavigationSetting(): boolean

Returns the pure setting from buyer-side dialog

Returns: boolean

showText2Image

showText2Image(): null | { selectStyle: boolean, prompt: string, prefix: string, postfix: string, defaultPrompt: string, style: SdxlStyle | null, negativePrompt: string, model: string, transparency: string, allowUpload: boolean }

Returns not null if buyer should be able to use generative ai image creation

Returns: null | { selectStyle: boolean, prompt: string, prefix: string, postfix: string, defaultPrompt: string, style: SdxlStyle | null, negativePrompt: string, model: string, transparency: string, allowUpload: boolean }

showTextEditor

showTextEditor(): void

Open rich- or simple-text-editor

Returns: void

showTextStyleCaptions

showTextStyleCaptions(): boolean

Returns true if text styles should have a caption

Returns: boolean

startOrStopImageSwap

startOrStopImageSwap(): void

Activates Image Swap Mode

Returns: void

streamAnthropicPrompt

streamAnthropicPrompt(
    request: {
      prompt: string,
      model?: "fable-5.0" | "opus-5.0" | "opus-4.8" | "opus-4.7" | "sonnet-4.6" | "haiku-4.5",
      skill?: string,
      maxTokens?: number,
      imageUrls?: string[],
      sessionId?: string,
      containerId?: string,
      purpose?: "Claude Design" | "Script Creation"
    },
    onMessage: (message: string) => void,
    onFinished: (skillResults?: Array<{ filename: string, mimeType: string, encoding: "utf8" | "base64", data: string }>) => void
  ): Promise<{ sessionId?: string, containerId?: string, aiCreditsUsed?: number }>

Stream a prompt to Anthropic (Claude). Forwards text deltas to onMessage as they arrive and calls onFinished once the stream completes, passing any skill-generated files.

Parameter Type Description
request { prompt: string, model?: “fable-5.0” | “opus-5.0” | “opus-4.8” | “opus-4.7” | “sonnet-4.6” | “haiku-4.5”, skill?: string, maxTokens?: number, imageUrls?: string[], sessionId?: string, containerId?: string, purpose?: “Claude Design” | “Script Creation” }
onMessage (message: string) => void
onFinished (skillResults?: Array<{ filename: string, mimeType: string, encoding: “utf8” | “base64”, data: string }>) => void

Returns: Promise<{ sessionId?: string, containerId?: string, aiCreditsUsed?: number }>

streamPrompt

streamPrompt(prompt: string, onMessage: (message: string) => void, onFinished: () => void): Promise<void>
Parameter Type Description
prompt string
onMessage (message: string) => void
onFinished () => void

Returns: Promise<void>

toggleMobileImageCropModeEnabled

toggleMobileImageCropModeEnabled(): boolean

toggle mobile image crop mode

Returns: boolean

uiHintsDisplay

uiHintsDisplay(): Array<"splitterGuide" | "layoutSnippets" | "groupSnippets" | "editableFrames" | "expertMode">

returns an array of uiHints to be displayed on buyer side.

Returns: Array<“splitterGuide” | “layoutSnippets” | “groupSnippets” | “editableFrames” | “expertMode”>

upscaleImage

upscaleImage(propertyId: string): Promise<boolean>

Upscales Image of currently selected images

Parameter Type Description
propertyId string The selected property-id

Returns: Promise<boolean>

userInBuyerSide

userInBuyerSide(): boolean

Returns if a real user is logged in - in buyer side only mode with only print option

Returns: boolean

validate

This method is deprecated.

validate(mode?: "all" | "until-current-step" | "selection"): Array<iExternalError>
Parameter Type Description
mode? “all” | “until-current-step” | “selection” Specifies when and up to which point the validation should be done.

Returns: Array<iExternalError>

validateAsync

validateAsync(mode?: "all" | "until-current-step" | "selection"): Promise<Array<iExternalError>>

Closes open editors and returns an array of external property errors that can be used to display errors like missing text to the customer

Parameter Type Description
mode? “all” | “until-current-step” | “selection” Specifies when and up to which point the validation should be done.

Returns: Promise<Array<iExternalError>>

validateAsyncV2

validateAsyncV2(mode?: "all" | "until-current-step" | "selection"): Promise<Array<iErrorType>>
Parameter Type Description
mode? “all” | “until-current-step” | “selection”

Returns: Promise<Array<iErrorType>>

validateCurrentTabId

validateCurrentTabId(curTabId: string): string

Returns passed tab-id or initial tab id if current is invalid

Parameter Type Description
curTabId string

Returns: string

WcBc

WcBc: {
    masterStyles: () => string
    getStrokeUi: () => HTMLElement // TemplateResult
  }

Returns: { masterStyles: () => string getStrokeUi: () => HTMLElement // TemplateResult }