/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { EventEmitter } from '../../stencil-public-runtime';
import { X509Certificate } from '../../crypto';
export interface ICertificate {
value: string;
name?: string | ((certificate: X509Certificate) => string);
tests?: {
valid?: string;
revoked?: string;
expired?: string;
};
}
interface ICertificateDecoded {
body: X509Certificate;
tests?: ICertificate['tests'];
name?: ICertificate['name'];
}
export declare class CertificatesViewer {
private isHasRoots;
private mobileMediaQuery;
/**
* List of certificates values for decode and show in the list.
*
* **NOTE**: If you do not provide a `name` value when
* invocing the component it will take the first Subject CN value.
*
* **NOTE**: If you do not provide a `tests` this column will be ommited from the rendered page.
*
* **NOTE**: If the supplied certificates are self-signed the issuer column will be ommited.
*/
certificates: ICertificate[];
/**
* Use filter in the list when search is changed.
*/
filterWithSearch: boolean;
/**
* Use highlight chapters in the list when search is changed.
*/
highlightWithSearch: boolean;
/**
* Mobile media query string to control screen view change.
*
* **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.
* @example
* (max-width: 900px)
*/
mobileMediaQueryString?: string;
/**
* Emitted when the user open certificate details modal.
*/
detailsOpen: EventEmitter;
/**
* Emitted when the user close certificate details modal.
*/
detailsClose: EventEmitter;
mobileScreenView: boolean;
search: string;
certificatesDecoded: ICertificateDecoded[];
expandedRow?: number;
certificateSelectedForDetails?: X509Certificate;
isDecodeInProcess: boolean;
private handleMediaQueryChange;
componentWillLoad(): void;
disconnectedCallback(): void;
watchCertificates(newValue: ICertificate[], oldValue: ICertificate[]): void;
certificatesDecodeAndSet(): Promise;
private getCertificateName;
private handleClickDownloadAsPem;
private handleClickDownloadAsDer;
private handleClickDetails;
private handleModalClose;
private handleClickRow;
private handleSearch;
private getMaxColSpanValue;
private renderCertificateButtonActions;
private renderExpandedRow;
private renderCertificatesRows;
private renderCertificateDetailsModal;
private renderSearch;
private renderEmptyState;
private renderEmptySearchState;
private renderLoadingState;
private renderTableBody;
render(): any;
}
export {};