UNPKG

@amsterdam/bmi-component-library

Version:

A React component library based on ASC and Material-UI aimed at repurposing and sharing components across BMI projects

2 lines 2.12 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:true});function _export(target,all){for(var name in all)Object.defineProperty(target,name,{enumerable:true,get:all[name]})}_export(exports,{ImageContentTypes:function(){return ImageContentTypes},PDFContentTypes:function(){return PDFContentTypes},default:function(){return _default}});var _jsxruntime=require("react/jsx-runtime");var _ImageRenderer=_interop_require_default(require("./ImageRenderer"));var _PDFRenderer=_interop_require_default(require("./PDFRenderer"));var _DownloadRenderer=_interop_require_default(require("./DownloadRenderer"));function _interop_require_default(obj){return obj&&obj.__esModule?obj:{default:obj}}var ImageContentTypes;(function(ImageContentTypes){ImageContentTypes[ImageContentTypes["jpg"]=0]="jpg";ImageContentTypes[ImageContentTypes["jpeg"]=1]="jpeg";ImageContentTypes[ImageContentTypes["image/jpg"]=2]="image/jpg";ImageContentTypes[ImageContentTypes["image/jpeg"]=3]="image/jpeg";ImageContentTypes[ImageContentTypes["png"]=4]="png";ImageContentTypes[ImageContentTypes["image/png"]=5]="image/png";ImageContentTypes[ImageContentTypes["bmp"]=6]="bmp";ImageContentTypes[ImageContentTypes["image/bmp"]=7]="image/bmp";ImageContentTypes[ImageContentTypes["tif"]=8]="tif";ImageContentTypes[ImageContentTypes["tiff"]=9]="tiff";ImageContentTypes[ImageContentTypes["image/tif"]=10]="image/tif";ImageContentTypes[ImageContentTypes["image/tiff"]=11]="image/tiff"})(ImageContentTypes||(ImageContentTypes={}));var PDFContentTypes;(function(PDFContentTypes){PDFContentTypes[PDFContentTypes["application/pdf"]=0]="application/pdf";PDFContentTypes[PDFContentTypes["pdf"]=1]="pdf"})(PDFContentTypes||(PDFContentTypes={}));var DocumentRenderer=function(param){var uri=param.uri,contentType=param.contentType;if(contentType in ImageContentTypes)return(0,_jsxruntime.jsx)(_ImageRenderer.default,{uri:uri});if(contentType in PDFContentTypes)return(0,_jsxruntime.jsx)(_PDFRenderer.default,{uri:uri});return(0,_jsxruntime.jsx)(_DownloadRenderer.default,{uri:uri})};var _default=DocumentRenderer; //# sourceMappingURL=DocumentRenderer.js.map