-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update va-report-components v2.4.0 doc and changelog (#57)
- Loading branch information
Showing
3 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94
...mponents/documentation/website/versioned_docs/version-2.4.0/api/ObjectHandle.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
--- | ||
id: version-2.4.0-ObjectHandle | ||
title: ObjectHandle | ||
original_id: ObjectHandle | ||
--- | ||
|
||
An `ObjectHandle` is used to perform actions on a single object in an open | ||
report. An object's handle can be obtained using the `getObjectHandle` method | ||
on a [`ReportHandle`](ReportHandle.md). | ||
|
||
When a report element is assigned new attribute values or removed from the DOM, | ||
any `ObjectHandles` obtained from that element are invalidated and should be | ||
discarded. | ||
|
||
## Methods | ||
|
||
### exportData(format: string, options?: ExportDataOptions): Promise\<string> | ||
Exports a file that contains the object's data, and returns a URL to the file. | ||
|
||
`format` defines the format of the data output file. | ||
Supported formats: | ||
- `"XLSX"` | ||
- `"CSV"` | ||
- `"TSV"` | ||
|
||
`options` is an [`ExportDataOptions`](ExportDataOptions.md) bundle that modifies properties of the exported data file. | ||
|
||
If no `options` parameter is supplied, the data will be exported using the default option values. | ||
|
||
### exportPDF(options?: ExportPDFOptions): Promise\<string> | ||
|
||
Exports a PDF of the report object and returns a URL to the PDF document. | ||
|
||
`options` is an [`ExportPDFOptions`](ExportPDFOptions.md) that controls the format of the exported PDF document. The option `includedReportObjects` does not apply when exporting a report object. | ||
|
||
If no `options` parameter is supplied, the report is exported using the default options values. | ||
|
||
### refreshData(): void | ||
|
||
Refreshes the data for the report object that is controlled by the | ||
`ObjectHandle`. | ||
|
||
### getData(options?: Object): ReportObjectResultData[] | ||
|
||
Returns all of the data from the report object. This data matches what appears in the report object, including any filters that have been applied. | ||
|
||
#### Arguments | ||
|
||
`options` is an optional options bundle for customizing the returned data. The following options are supported: | ||
|
||
- `formatData` specifies the format of the returned data. | ||
- `true` returns all formatted data. | ||
- `false` returns all unformatted data. | ||
- `"datesOnly"` `default` returns SAS date values as formatted data and returns all other values as unformatted data. | ||
|
||
#### Return value | ||
|
||
Returns an array of [`ReportObjectResultData`](ReportObjectResultData.md) objects, where each object is associated with one data set. | ||
|
||
### getSelectedData(options?: Object): ReportObjectResultData[] | ||
|
||
Returns a user's selection data from the report object. Returns an empty array if the object has no selections. | ||
|
||
#### Arguments | ||
|
||
`options` is an optional options bundle for customizing the returned data. The following options are supported: | ||
|
||
- `formatData` specifies the format of the returned data. | ||
- `true` returns all formatted data. | ||
- `false` returns all unformatted data. | ||
- `"datesOnly"` `default` returns SAS date values as formatted data and returns all other values as unformatted data. | ||
|
||
#### Return value | ||
|
||
Returns an array of [`ReportObjectResultData`](ReportObjectResultData.md) objects, where each object is associated with one data set. | ||
|
||
For user selection data, the ReportObjectResultData property `columns` will never include values for `usage`, `aggregation`, or `format`. | ||
|
||
### addEventListener(eventType: string, listener: (event: Object) => void) | ||
|
||
Adds an event listener to the `ObjectHandle` to call the supplied listener when the specified event occurs. | ||
|
||
#### Arguments | ||
|
||
`eventType` is a string that represents the event type to listen for. These event types are supported: | ||
- `"selectionChanged"` for listening for selection changes in the object. | ||
|
||
`listener` is an event listener callback function. When the event occurs, `listener` is called and passed an event object containing the following properties: | ||
- `type` is a string that matches the event type. | ||
- `target` refers to the ObjectHandle that the event occurred on. | ||
|
||
### removeEventListener(eventType: string, listener: (event: Object) => void) | ||
|
||
Removes the previously registered event listener from the `ObjectHandle`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
[ | ||
"2.4.0", | ||
"2.3.0", | ||
"2.2.0", | ||
"2.1.0", | ||
|