Download Manager
The Download Manager widget allows users to access and manage exported files in one place.
To display exports for a specific user in the Download Manager, ensure that the same userId
and clientId
values are set across all widgets used for exports. If these values are not set, the exports will not appear in the Download Manager.
Embeddable Script
<!-- Tag -->
<qrvey-download-manager settings="config"></qrvey-download-manager>
<!-- Config -->
<script>
var config = {
apiKey: "<YOUR_PRIVATE_API_KEY>",
domain: "<DOMAIN>",
userId: "<USER_ID>",
showModalButton: "true"
};
</script>
<!-- Launcher -->
<script src="https://<WIDGETS_URL>/qrvey_download_manager/qrvey-download-manager/qrvey-download-manager.js"></script>
<script type="module" src="https://<WIDGETS_URL>/qrvey_download_manager/qrvey-download-manager/qrvey-download-manager.esm.js"></script>
<script> window.config = config;</script>
Configuration Object
Property | Description | Required |
---|---|---|
apiKey | String . Your organization’s unique API key required to access the Qrvey platform. | Required, if qvToken is not provided. |
qvToken | String . Encrypted token used for secure authentication. | Required, if apiKey is not provided. |
domain | String . The base URL of your Qrvey instance. | Required |
userId | String . The ID of the Qrvey Composer user account accessing this feature. Alternatively, you can specify the user ID in a Qrvey session cookie. To save the exports for a specific end user and then list them in your Download Manager instance, set the same values for the userId and clientId properties in all widgets used for exports. | Optional |
String . Defines the email associated with the clientId . | Optional | |
clientId | String . The clientId , or unique identifier, of the tenant end user working with the Download Manager. If authenticating with a qvToken , pass this into the token for authentication. | Required |
orgId | String . Organization ID for the end user. Required for subscriptions in embedded scenarios. Filters the list of users to display on the orgs object. | Optional |
orgs | Object Array . Required in embedded scenarios to subscribe other users to exports. For details, see Orgs below. | Optional |
roles | String Array . Names of role(s) assigned to the user. Used for Column Level Security. Also used to access a dashboard to verify access to it, in case the asset was shared with a specific role (only supported in qvToken ). | Optional |
i18n | Object . Defines the language to be displayed in the static text of the widget as well as the dataset columns. See The i18n Object for details. | Optional |
showModalButton | Boolean . If set to true , displays the Download Manager as a download button, which opens the Download Manager as a modal on click. Defaults to false . | Optional |
widgetView | String . Determines how the component is displayed. The default setting is modal , in which the component is displayed as a popup window. If set to table , the component is displayed as a page. | Optional |
timezone | Object . Configures the timezone in the widget. | Optional |
customization | Object . Allows customization of the widget sections. Details in the Customization section. | Optional |
Orgs
The orgs
property defines a list of users and roles grouped by organization. This list is used in the Subscribe option for scheduled exports and is filtered based on the current user's organization ID. This feature is only supported when using qvToken
.
Property | Description |
---|---|
orgId | String . Organization ID for the end user. Required for subscriptions in embedded scenarios. Filters the list of users to display on the orgs . |
users | Object Array . List of users available to subscribe to scheduled exports under this organization. |
users.clientId | String . The user's clientId . |
users.email | String . Email address of the user. |
"orgs": [
{
"orgId": "1",
"users": [
{
"clientId": "john_smith",
"email": "john_smith@qrvey.com"
}
]
}
]
Timezone
Property | Value | Required |
---|---|---|
offset | String . An attribute inside timezone that specifies the timezone offset. Accepted formats include +03:00 , -03 , etc. | Optional |
i18n
For more information, see Internationalization, Step by Step.
Property | Value | Required |
---|---|---|
lang | String . The language to use for the UI. Example: "es" . | Required |
locale | String . The locale code to use for date and number formatting. Example: "es-ES" . | Optional |
Customization
The customization options for the Download Manager allow you to change the default values for the filter dropdowns and the search input. This feature is particularly useful when you want to display the Download Manager with pre-configured default filters.
const widgetConfig = {
domain: "my-domain.qrvey.com",
qvToken: "mySecureToken",
...
customization: {
defaults: {
filters: {
fileType: ["PDF", "CSV"],
execution: ["OTHERS"],
sourceWidget: ["ANALYZE"],
searchByName: "Bar chart1.jpg",
asset: ["assetId1", "assetId2"]
}
}
}
};
Property | Description |
---|---|
defaults.filters | Object . An object that allows changing the default values of the filters section. |
└ fileType | Array . List of file types to filter by. Values not in the accepted list will be ignored. Options: "PDF" , "JPG" , "CSV" , "XLS" , "ZIP" . |
└ execution | Array . List of execution types to filter by. Values not in the accepted list will be ignored. Options: "SCHEDULED" , "OTHERS" . |
└ sourceWidget | Array . List of source widget types to filter by. Values not in the accepted list will be ignored. Options: "ANALYZE" , "AUTOMATION" , "DASHBOARD" , "LEGACY_DASHBOARD" , "PIXEL_PERFECT" , "SUBSCRIPTION" . |
└ asset | Array . Asset IDs to filter by. sourceWidget must be set and contain a single value for this to take effect—matches behavior in the UI. |
└ searchByName | String . Used to filter files by name. Example: "Bar chart1.jpg" . |
defaults.schedule | Object . Configures the default values of the schedule section. |
└ subscribeOption | Boolean . Enables the ability to subscribe other users to scheduled exports. |
└ subscribeExternalUsers | Boolean . Allows subscribing external users (users outside the organization) to scheduled exports. |
Events
openDownloadManager()
Opens the Download Manager modal programmatically.
<qrvey-download-manager settings="downloadManagerConfig"></qrvey-download-manager>
<button onclick="openModal()">Open Modal</button>
function openModal() {
const el = document.querySelector('qrvey-download-manager');
el.openDownloadManager();
}
qvDMOpen
Opens the modal by dispatching the qvDMOpen
event.
function openDownloadManager() {
const myEvent = new CustomEvent('qvDMOpen');
window.dispatchEvent(myEvent);
}
qvDMOpened
Triggered when the modal is opened.
window.addEventListener('qvDMOpened', () => {
// Actions when modal opens
});
qvDMClosed
Triggered when the modal is closed.
window.addEventListener('qvDMClosed', () => {
// Actions when modal closes
});
qvDMSetFilters
Sets filters in the widget programmatically.
window.dispatchEvent(new CustomEvent('qvDMSetFilters', {
detail: {
fileType: ["PDF", "CSV"],
execution: ["OTHERS"],
sourceWidget: ["ANALYZE"],
searchByName: "Bar chart1.jpg",
asset: ["assetId1", "assetId2"]
}
}));