datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-modal.component.ts
selector | c8y-datapoints-export-selector-modal |
standalone | true |
imports |
CommonModule
DatapointsExportSelectorFileExporterComponent
ModalModule
|
templateUrl | ./datapoints-export-selector-modal.component.html |
Properties |
Methods |
HostListeners |
constructor(bsModalRef: BsModalRef)
|
||||||
Parameters :
|
document:keydown |
Arguments : '$event'
|
document:keydown(event: KeyboardEvent)
|
changeDownloadButtonState | ||||||
changeDownloadButtonState(isEnabled: boolean)
|
||||||
Parameters :
Returns :
void
|
dismiss |
dismiss()
|
Returns :
void
|
Async exportAndDownload |
exportAndDownload()
|
Returns :
Promise<void>
|
handleKeyboardEvent | ||||||
handleKeyboardEvent(event: KeyboardEvent)
|
||||||
Decorators :
@HostListener('document:keydown', ['$event'])
|
||||||
Parameters :
Returns :
void
|
exportConfig |
Type : ExportConfig
|
isDownloadEnabled |
Default value : false
|
labels |
Type : ModalLabels
|
Default value : { ok: gettext('Download'), cancel: gettext('Cancel') }
|
result |
Type : Promise<boolean>
|
Default value : new Promise(resolve => {
this._close = resolve;
})
|
<c8y-modal
[title]="'Generate export' | translate"
[labels]="labels"
[disabled]="!isDownloadEnabled"
[headerClasses]="'dialog-header'"
(onDismiss)="dismiss()"
(onClose)="exportAndDownload()"
>
<ng-container c8y-modal-title>
<span [c8yIcon]="'data-export'"></span>
</ng-container>
<c8y-datapoints-export-selector-file-exporter
[exportConfig]="exportConfig"
(onDownloadButtonStateChange)="changeDownloadButtonState($event)"
></c8y-datapoints-export-selector-file-exporter>
</c8y-modal>