Skip to main content

config

Config options

The config parameter allows you to define the main configuration options of the application

NameRequiredTypeDescription
fullSizeNobooleantrue : the main container will be sized to window's size (width = 100vw / height = 100vh)
false/undefined : the main container will have the size of the parent container (width = 100% / height = 100%)
isUsedOnborneNobooleantrue for a borne-use only, that will generate QRcodes instead of download links in the cards
localesNosee detailsOptions for languages. Overwrites the options defined in Retorik Studio
positionNosee detailsUser's geolocation options
subtitlesNobooleantrue : subtitles will be displayed by default
logoNosee detailsURL of the logo to be displayed on the top left corner
answerpanelNobooleanfalse : prevents the chatbot answers from being displayed
skipWelcomeNobooleantrue : prevents the welcome message from being displayed / spoken at application's launch
preventExpectedInputHintNobooleantrue : prevents the microphone from being automaticaly opened when the incoming activity has the parameter inputHint: expectingInput
paginationNosee detailsPaging size in all modes when having data displayed in list mode
remoteNosee detailsPosition of the remote to the top of the screen (desktop / borne modes only)
companyNameNostringText displayed on the first line of the upper banner in text mode on mobile / widget display
companyNameLocalizedNoRecord<string, string>(since v1.0.16) Localized text displayed on the first line of the upper banner in text mode on mobile / widget display. Example { "en-US": "Text in English", "fr-FR": "Texte en Français" }.
subCompanyMessageNostringText displayed on the second line of the upper banner in text mode on mobile / widget display
subCompanyMessageLocalizedNoRecord<string, string>(since v1.0.16) Localized text displayed on the second line of the upper banner in text mode on mobile / widget display. Forme { "en-US": "Text in English", "fr-FR": "Texte en Français" }.
loaderInformationTextsNosee detailsTexts displayed on the first page of the application (choice of the mode)
hideRetorikLogoNobooleantrue : hides the Retorik logo at the bottom of the loader page, and at the right bottom of the main page
hideMenuNobooleantrue : hides the primary menu (the one with links to the different pages of the application)
hideControlsNobooleantrue : hides the menu bar (mobile / widget) and the remote (desktop / borne)
baseMenuNosee details(deprecated since v2.0.4. See menuConfig) Items to be displayed in the manu in Retorik Framework (first line)
customMenuNosee details(deprecated since v2.0.4. See menuConfig) Items to be displayed in the manu in Retorik Framework (following line)
subMenuNosee details(deprecated since v2.0.4. See menuConfig) Items to be displayed in the manu in Retorik Framework (last line, smaller items)
doNotDetectDeviceFromUserAgentNobooleanSets how to detect the device used : by default, using userAgent to get wanted data. If false, we calculate based on a fixed width (600px) to determinate if this is a mobile or not.
enableConversationCookieNobooleantrue | undefined sets a cookie on the device to store the current conversation id and retrieve it when coming back to the application after closing. Use false to prevent using this feature
conversationCookieMaxAgeNonumberIf using a conversation cookie, states its max-age (lifespan). 10 days max, default is 1 hour
enableTelemetryNobooleantrue | undefined : sends telemetry data to a DAVI server on application crash. false to disable this feature
forceMobileViewNobooleantrue : forces mobile display on all devices
enableSpeechCachingNobooleantrue | undefined : audio data caching in IndexedDB. false to disable
speechRecognitionOptionsNovoir détails(since v1.0.11) Vocal recognition options
allowSwitchLayoutNoboolean(since v1.0.11) true allows switching from one main container's size to another in wodget mode. The sizes are given in widget mode configuration
enableDocumentPrintingNoboolean(since v1.0.14) Activates display of the 'print' button on pdf's preview page + adds 'printingCallback' trigger on button click
disableSpeechModeNoboolean(since v1.0.14) true to desactivate vocal mode
disableSoundNoboolean(since v1.0.14) true to desactivate the sound in both vocal / text modes
timerForFilterSelectionListModeNonumber(since v1.0.15) waiting time before a request is sent to get new content in list mode when a filter is selected / unselected (allows to choose several filters before requesting, this prevents multiple requests from being sent)

locales

NameRequiredTypeDefault valueDescription
defaultNostringDefined in Retorik StudioLanguage by default
getDefaultFromBrowserNobooleanfalseIf true, the default language will be the one retrieved from the navigator, if present in the supported languages

The behavior of the language is :

  • if the languages are defined in Retorik Studio, they are retrieved and used (default + supported languages)
  • otherwise, if a default is set, this one and only language is used and supported
  • otherwise, if the parameter getDefaultFromBrowser is true, the navigator's default language is used as default and supported language
  • otherwise, the language fr-FRis used

About the texts inside Retorik Framework, if no translation exists for the current language, the fallback translation will be in fr-FR.

position

NameRequiredTypeDefault valueDescription
searchForLocationNobooleanfalseSearch for device geolocation ?
latitudeNonumber-Default latitude
longitudeNonumber-Default longitude
cityNonumber-Default city
countryNonumber-Default country

The position (latitude + longitude) is mandatory is you want to use weather functionality.

NameRequiredTypeDefault valueDescription
srcNostringURL of the logo to be displayed in the upper left corner of the application

pagination

NameRequiredTypeDefault valueDescription
borneNonumberNumber of cards per page in list mode on vertical borne
landscapeNonumberNumber of cards per page in list mode on horizontal desktop
mobileNonumberNumber of cards per page in list mode on mobile / widget

remote

NameRequiredTypeDefault valueDescription
desktopNonumberDistance of the remote from the top in pixels, mode horizontal desktop non tactile
desktopTactileNonumberDistance of the remote from the top in pixels, mode horizontal desktop tactile
verticalTactileNonumberDistance of the remote from the top in pixels, mode vertical borne

loaderinformationtexts

NameRequiredType
vocalYesloaderInformationTextsType
textYesloaderInformationTextsType

LoaderInformationTextsType

NameRequiredTypeDefault valueDescription
topYesstringText of the first line of the loader
bottomYesstringText of the second line of the loader
  • baseMenu : array of objects typed BaseMenu | CustomMenu
  • customMenu : two choices :
    • if you want a single line of menu buttons, use an array of CustomMenu
    • if you want a single line of menu buttons, use an array of array of CustomMenu, each sub-array corresponding to a line in the menu
  • subMenu : array of objects typed BaseSubMenu | CustomMenu

basemenu

The field baseMenu is an array of objects of the following type :

NameRequiredTypeDefault valueDescription
viewYesnumberIndex of the desired view. The list of base views is available here
indiceYesnumberPosition at which the view will be displayed in the menu

base views

The base views are pages integrated in Retorik Framework, available for any implementation. The indexes of this views are available with typescript by importing the enum AvailableViews. Without typescript, here is the list of the indexes :

  • 1 : news => news channel
  • 2 : weather => daily and weekly weather
  • 3 : emergency => emergency numbers

custommenu

The field customMenu is an array of objects of the following type :

NameRequiredTypeDefault valueDescription
iconYesJSX.ElementIcon displayed in the menu for this view
indiceYesnumberPosition at which the view will appear in the menu
labelYesstring | LocalizedStringsText displayed in the menu for this view
customDisplayNostringName allowing to identify the component linked to this view in the property externalComponents
clickHandlerNo() => voidCallback called when trying to open this view
closeParametersOnClickInMobileModeNonbooleanSets whether the parameters panel should be closed or not when opening this view in mobile mode

LocalizedStrings

An array of objets of type [key: string]: string where the keys are usable locales. For example :

{
'fr-FR': 'Menu personnalisé',
'en-US': 'Custom menu'
}

speechrecognition

The options available for speech recognition are :

NameRequiredTypeDefault valueDescription
timerBeforeSpeechEndNonumber-Waiting time before microphone shutting at the end of a speech recognition
enableActivationSoundNonboolean-true to activate the sound indicating that the microphone is opened
grammarsNosee here-Words allowing a better speech recognition

commontype

NameRequiredTypeDefault valueDescription
commonNoArray<string>-Values for every language
localizedNo{ [key: string]: Array<string> }-Values per language. Ex: { "fr-FR": ["bonjour", "hello"], "en-US": ["contoso"] }