config
Config options
The config parameter allows you to define the main configuration options of the application
| Name | Required | Type | Description |
|---|---|---|---|
fullSize | No | boolean | true : 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%) |
isUsedOnborne | No | boolean | true for a borne-use only, that will generate QRcodes instead of download links in the cards |
locales | No | see details | Options for languages. Overwrites the options defined in Retorik Studio |
position | No | see details | User's geolocation options |
subtitles | No | boolean | true : subtitles will be displayed by default |
logo | No | see details | URL of the logo to be displayed on the top left corner |
answerpanel | No | boolean | false : prevents the chatbot answers from being displayed |
skipWelcome | No | boolean | true : prevents the welcome message from being displayed / spoken at application's launch |
preventExpectedInputHint | No | boolean | true : prevents the microphone from being automaticaly opened when the incoming activity has the parameter inputHint: expectingInput |
pagination | No | see details | Paging size in all modes when having data displayed in list mode |
remote | No | see details | Position of the remote to the top of the screen (desktop / borne modes only) |
companyName | No | string | Text displayed on the first line of the upper banner in text mode on mobile / widget display |
companyNameLocalized | No | Record<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" }. |
subCompanyMessage | No | string | Text displayed on the second line of the upper banner in text mode on mobile / widget display |
subCompanyMessageLocalized | No | Record<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" }. |
loaderInformationTexts | No | see details | Texts displayed on the first page of the application (choice of the mode) |
hideRetorikLogo | No | boolean | true : hides the Retorik logo at the bottom of the loader page, and at the right bottom of the main page |
hideMenu | No | boolean | true : hides the primary menu (the one with links to the different pages of the application) |
hideControls | No | boolean | true : hides the menu bar (mobile / widget) and the remote (desktop / borne) |
baseMenu | No | see details | (deprecated since v2.0.4. See menuConfig) Items to be displayed in the manu in Retorik Framework (first line) |
customMenu | No | see details | (deprecated since v2.0.4. See menuConfig) Items to be displayed in the manu in Retorik Framework (following line) |
subMenu | No | see details | (deprecated since v2.0.4. See menuConfig) Items to be displayed in the manu in Retorik Framework (last line, smaller items) |
doNotDetectDeviceFromUserAgent | No | boolean | Sets 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. |
enableConversationCookie | No | boolean | true | 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 |
conversationCookieMaxAge | No | number | If using a conversation cookie, states its max-age (lifespan). 10 days max, default is 1 hour |
enableTelemetry | No | boolean | true | undefined : sends telemetry data to a DAVI server on application crash. false to disable this feature |
forceMobileView | No | boolean | true : forces mobile display on all devices |
enableSpeechCaching | No | boolean | true | undefined : audio data caching in IndexedDB. false to disable |
speechRecognitionOptions | No | voir détails | (since v1.0.11) Vocal recognition options |
allowSwitchLayout | No | boolean | (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 |
enableDocumentPrinting | No | boolean | (since v1.0.14) Activates display of the 'print' button on pdf's preview page + adds 'printingCallback' trigger on button click |
disableSpeechMode | No | boolean | (since v1.0.14) true to desactivate vocal mode |
disableSound | No | boolean | (since v1.0.14) true to desactivate the sound in both vocal / text modes |
timerForFilterSelectionListMode | No | number | (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
| Name | Required | Type | Default value | Description |
|---|---|---|---|---|
default | No | string | Defined in Retorik Studio | Language by default |
getDefaultFromBrowser | No | boolean | false | If 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
defaultis set, this one and only language is used and supported - otherwise, if the parameter
getDefaultFromBrowseristrue, 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
| Name | Required | Type | Default value | Description |
|---|---|---|---|---|
searchForLocation | No | boolean | false | Search for device geolocation ? |
latitude | No | number | - | Default latitude |
longitude | No | number | - | Default longitude |
city | No | number | - | Default city |
country | No | number | - | Default country |
The position (latitude + longitude) is mandatory is you want to use weather functionality.
logo
| Name | Required | Type | Default value | Description |
|---|---|---|---|---|
src | No | string | URL of the logo to be displayed in the upper left corner of the application |
pagination
| Name | Required | Type | Default value | Description |
|---|---|---|---|---|
borne | No | number | Number of cards per page in list mode on vertical borne | |
landscape | No | number | Number of cards per page in list mode on horizontal desktop | |
mobile | No | number | Number of cards per page in list mode on mobile / widget |
remote
| Name | Required | Type | Default value | Description |
|---|---|---|---|---|
desktop | No | number | Distance of the remote from the top in pixels, mode horizontal desktop non tactile | |
desktopTactile | No | number | Distance of the remote from the top in pixels, mode horizontal desktop tactile | |
verticalTactile | No | number | Distance of the remote from the top in pixels, mode vertical borne |
loaderinformationtexts
| Name | Required | Type |
|---|---|---|
vocal | Yes | loaderInformationTextsType |
text | Yes | loaderInformationTextsType |
LoaderInformationTextsType
| Name | Required | Type | Default value | Description |
|---|---|---|---|---|
top | Yes | string | Text of the first line of the loader | |
bottom | Yes | string | Text of the second line of the loader |
menus
- 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
- if you want a single line of menu buttons, use an array of
- subMenu : array of objects typed
BaseSubMenu|CustomMenu
basemenu
The field baseMenu is an array of objects of the following type :
| Name | Required | Type | Default value | Description |
|---|---|---|---|---|
view | Yes | number | Index of the desired view. The list of base views is available here | |
indice | Yes | number | Position 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 :
| Name | Required | Type | Default value | Description |
|---|---|---|---|---|
icon | Yes | JSX.Element | Icon displayed in the menu for this view | |
indice | Yes | number | Position at which the view will appear in the menu | |
label | Yes | string | LocalizedStrings | Text displayed in the menu for this view | |
customDisplay | No | string | Name allowing to identify the component linked to this view in the property externalComponents | |
clickHandler | No | () => void | Callback called when trying to open this view | |
closeParametersOnClickInMobileMode | Non | boolean | Sets 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 :
| Name | Required | Type | Default value | Description |
|---|---|---|---|---|
timerBeforeSpeechEnd | No | number | - | Waiting time before microphone shutting at the end of a speech recognition |
enableActivationSound | Non | boolean | - | true to activate the sound indicating that the microphone is opened |
grammars | No | see here | - | Words allowing a better speech recognition |
commontype
| Name | Required | Type | Default value | Description |
|---|---|---|---|---|
common | No | Array<string> | - | Values for every language |
localized | No | { [key: string]: Array<string> } | - | Values per language. Ex: { "fr-FR": ["bonjour", "hello"], "en-US": ["contoso"] } |