Skip to main content

Built-in CSS classes

DataWollet's base stylesheet provides a number of utility classes that can be used to easily hide or show elements conditionally, based on the current state of DataWollet and the activities being performed.

Example usage
<span class="dw-visible-when--sources--some">
<span data-dw-data="fill.expected">0</span>
questions answered using uploaded
document<span class="dw-visible-when--sources--multiple">s</span>.
</span>

Number of data sources added

Class nameDescription
dw-visible-when--sources--noneNo data sources have been added.
dw-visible-when--sources--oneExactly one data source has been added. Can be useful for pluralisation differences in copy.
dw-visible-when--sources--someOne or more data sources have been added.
dw-visible-when--sources--multipleTwo or more data sources have been added. Can be useful for pluralisation differences in copy.

Drag and drop behaviour

Class nameDescription
dw-visible-when--drop--activeA file is being dragged over the drop zone.
dw-visible-when--drop--permittedThe file being dragged is a permitted file type.
dw-visible-when--drop--invalidThe file being dragged is not a permitted file type and would be discarded if dropped.

Pluralisation

Class nameDescription
dw-visible-when--sources--not--oneUsed when the number of sources is either zero or greater than one. Normally used to show an 's' to pluralise copy (e.g. document vs documents added).
dw-visible-when--fills--not--oneUsed when the number of expected fills is either zero or greater than one. Normally used to show an 's' to pluralise copy (e.g. question vs questions answered).

Activity

Class nameDescription
dw-visible-when--activity--idleNo activity is taking place in the background.
dw-visible-when--activity--prefillingInputs are being auto-filled after a new source was added.
dw-visible-when--activity--fillingInputs are being auto-filled with previously added source data.
dw-visible-when--activity--uploadingInput is being uploaded or waiting for response from server.

Interactive processes

Class nameDescription
dw-visible-when--interaction--noneNo activity requiring user action is pending.
dw-visible-when--interaction--confirmingUser confirmation is required to proceed (e.g. removing a source).

Errors

Class nameDescription
dw-visible-when--errorAny error or warning is active, from the specific types listed below.
dw-visible-when--error--file-typeSource is not of the correct type (e.g. PDF). This error is uncommon as the file picker and drop zone both check file types before accepting input.
dw-visible-when--error--file-parseSource could not be read (e.g. corrupt).
dw-visible-when--error--file-sizeSource is too large to upload.
dw-visible-when--error--source-unexpectedSource was classified as a data source that isn't listed as an expected type (e.g. bill provided when identity document expected).
dw-visible-when--error--source-expectationsSource was added but failed the graph node test specified, and so likely contains incomplete data or relationships.
dw-visible-when--error--source-unmatchedSource document type could not be determined (not in library).
dw-visible-when--error--source-lackingSource was processed successfully but no data was extracted.
dw-visible-when--error--server-errorServer returned an error not otherwise described. Retrying could be recommended.
dw-visible-when--error--server-timeoutServer did not respond within the configured timeout. Document could be too large or the internet connection poor.
dw-visible-when--error--server-forbiddenServer submission was blocked or rejected. Could be a result of network restrictions or browser restrictions.
dw-visible-when--error--scan-capabilityScanning capability is not an option with the browser or hardware available.
dw-visible-when--error--scan-permissionPermissions required were not granted by the user, such as access to the camera.
dw-visible-when--error--scan-qualityScan seems to be of poor quality and might not be able to be used. Retrying could be recommended with further guidance.