import * as Constants from "../../Common/Constants"; import * as React from "react"; import { IconButton } from "office-ui-fabric-react/lib/Button"; import { UploadDetailsRecord } from "../../workers/upload/definitions"; import InfoBubbleIcon from "../../../images/info-bubble.svg"; export interface UploadItemsPaneProps { selectedFilesTitle: string; updateSelectedFiles: (event: React.ChangeEvent) => void; uploadFileData: UploadDetailsRecord[]; } export class UploadItemsPaneComponent extends React.Component { public render(): JSX.Element { return (
Select JSON Files More information Select one or more JSON files to upload. Each file can contain a single JSON document or an array of JSON documents. The combined size of all files in an individual upload operation must be less than 2 MB. You can perform multiple upload operations for larger data sets.
); } private fileUploadSummaryText = (numSucceeded: number, numFailed: number): string => { return `${numSucceeded} items created, ${numFailed} errors`; }; private onImportButtonClick = (): void => { document.getElementById("importDocsInput").click(); }; private onImportButtonKeyPress = (event: React.KeyboardEvent): void => { if (event.charCode === Constants.KeyCodes.Enter || event.charCode === Constants.KeyCodes.Space) { this.onImportButtonClick(); event.stopPropagation(); } }; }