Specifies a callback function that will be invoked when working with a dashboard and might return the formatting to be used for the given field.
Specifies a callback function that will be invoked when working with a dashboard and might return a replacement text -usually a localized value- to be used instead of the original.
Configures if the AJAX requests sent by Reveal to the backend should include authentication cookies or not. You might need to set this flag to true when your backend uses cookies for authentication and session handling and the frontend is in a different domain (CORS rules applies), for example if you're using Angular or React.
Configures if the AJAX requests sent by Reveal to the backend should include authentication cookies or not. You might need to set this flag to true when your backend uses cookies for authentication and session handling and the frontend is in a different domain (CORS rules applies), for example if you're using Angular or React.
true if the AJAX request sent by Reveal when it sends a request to the backend should have "withCredentials: true" or not.
The URL where the MapData.json could be retrieved from. ShapesMetadataFileUrl + "MapData.json" should be pointing to valid MapData.json.
The URL where the MapData.json could be retrieved from. ShapesMetadataFileUrl + "MapData.json" should be pointing to valid MapData.json.
Get/sets the theme to be used by RevealView when rendering a dashboard. Make sure to set the theme before you have any RevealView rendering a dashboard.
Get/sets the theme to be used by RevealView when rendering a dashboard. Make sure to set the theme before you have any RevealView rendering a dashboard.
Visualization settings
Call and await this before you render a RevealView component to make sure all the needed fonts are loaded in the browser. You might also want to call and await this if you update the RevealSdkSettings.theme with another theme that's using different fonts that might not be loaded. Not awaiting this might result on some texts(like dashboard title) being cropped on initial load.
Returns the current locale to be used to localize Reveal Sdk UI.
Overrides current localization locale, which is picked up by the browser's, by default. Make sure you await the promise before overriding the locale again. Supported locales are "de","es", "fr", "it", "ja", "ko", "ms", "nl", "pt", "ru", "zh-cn" and "zh-tw".
await RevealApi.RevealSdkSettings.overrideLocale(RevealApi.SupportedLocales.De);
Specifies a callback function that will be invoked before a request to the Reveal backend and might return additional headers to be included in the request. The specified function is expected to return an object with the headers, like: { 'Session-Id': sessionId } This is useful to send authentication headers to the backend.
JavaScript:
RevealSdkSettings.setAdditionalHeadersProvider(function (url) {
var headers = {};
headers["x-header-one"] = "single_value";
headers["x-header-two"] = ["value_1", "value_2"];
return headers;
});
TypeScript:
RevealSdkSettings.setAdditionalHeadersProvider((url: string) => {
var headers: Record<string, any> = {};
headers["x-header-one"] = "single_value";
headers["x-header-two"] = ["value_1", "value_2"];
return headers;
});
Set the base url where Reveal SDK Server component is running. You'll need to use this in cases where the backend and the front-end are served from different urls.
address of the reveal server component.
Set the base url that will be used to redirect the final OAuth authentication step, /oauth/authenticated will be added to the provided URL. This is usually just a fake URL that is used only to detect the authentication completed and to get the token ID to be used in the next step of the authentication flow. By default this URL is set to the same value specified with setBaseUrl, you might need to change it if your backend and frontend are running on separate base URLs, as this URL needs to match the frontend URL so some JS scripts can run properly. You might need to put a valid web page under {base}/oauth/authenticated/* so the browser doesn't display an error when redirected to this URL.
The URL to use as the base URL for OAuth authentication complete.
This class is used to specify global settings for the SDK.