API Reference
Namespaces
Classes
Events
Global
Externals

Namespace: cq-data-dialog

WebComponents. cq-data-dialog

Dialog form that allows users to upload CSV files to be loaded into the chart.

Members


mimeTypes :array

Valid MIME types that the DataDialog will recognize. By default the file input only accepts the extensions listed here.

For more information about extension and MIME types see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types

Type:
  • array

Methods


DataDialog#abortImport(e)

Aborts the import of a file. If that is the only file loaded then the form will reset to its default state.

Parameters:
Name Type Description
e Event

Submit event


DataDialog#close()

Closes dialog and resets it to the default state.


DataDialog#getFormData()

Gets FormData from fields and appends that data to the CIQ.CSVReader


DataDialog#hide()

Hides the dialog without clearing data.


DataDialog#importData(e)

Imports the data if the dialog is in a valid state. Closes dialog after successfully importing data.

Parameters:
Name Type Description
e Event

Submit event. Default is prevented.


<async, static> DataDialog#loadData()

Parses files uploaded by the user.


DataDialog#setContext(context)

Sets UIContext for the component

Parameters:
Name Type Description
context CIQ.UI.UIContext

UIContext for the given chart


DataDialog#showData()

Constructs and displays form for loaded files.


DataDialog#validateFileInput()

Validation function for File Input. NOTE Not the same as the validation for the form

Returns:

function Funtion that runs on file input change event


DataDialog#warn(title, text, display)

Displays or clears warning messages based on the validity of the form.

Parameters:
Name Type Description
title string

Title text of warning to display.

text string

Body text of warning to display.

display boolean

Should be valid property from validiity