chore(prettier): full repo linting and code reformatting once and for all (#3627)
This commit is contained in:
1 parent
01500a2d4c
commit
9045ddaedc
656 files changed
+21737
-20628
No files matched your search
@@ -3,8 +3,7 @@ const { merge } = require('webpack-merge');
|
||||
const path = require('path');
|
||||
const webpackCommon = require('./../../../.webpack/webpack.base.js');
|
||||
const pkg = require('./../package.json');
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
|
||||
.BundleAnalyzerPlugin;
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||
|
||||
const ROOT_DIR = path.join(__dirname, './..');
|
||||
const SRC_DIR = path.join(__dirname, '../src');
|
||||
@@ -38,13 +37,7 @@ module.exports = (env, argv) => {
|
||||
libraryTarget: 'umd',
|
||||
filename: `${pkg.main}`,
|
||||
},
|
||||
externals: [
|
||||
/\b(vtk.js)/,
|
||||
/\b(dcmjs)/,
|
||||
/\b(gl-matrix)/,
|
||||
/^@ohif/,
|
||||
/^@cornerstonejs/,
|
||||
],
|
||||
externals: [/\b(vtk.js)/, /\b(dcmjs)/, /\b(gl-matrix)/, /^@ohif/, /^@cornerstonejs/],
|
||||
plugins: [
|
||||
new webpack.optimize.LimitChunkCountPlugin({
|
||||
maxChunks: 1,
|
||||
|
||||
@@ -9,25 +9,12 @@ const SOP_CLASS_UIDS = {
|
||||
|
||||
const sopClassUids = Object.values(SOP_CLASS_UIDS);
|
||||
|
||||
const _getDisplaySetsFromSeries = (
|
||||
instances,
|
||||
servicesManager,
|
||||
extensionManager
|
||||
) => {
|
||||
const _getDisplaySetsFromSeries = (instances, servicesManager, extensionManager) => {
|
||||
const dataSource = extensionManager.getActiveDataSource()[0];
|
||||
return instances.map(instance => {
|
||||
const { Modality, SOPInstanceUID, EncapsulatedDocument } = instance;
|
||||
const {
|
||||
SeriesDescription = 'PDF',
|
||||
MIMETypeOfEncapsulatedDocument,
|
||||
} = instance;
|
||||
const {
|
||||
SeriesNumber,
|
||||
SeriesDate,
|
||||
SeriesInstanceUID,
|
||||
StudyInstanceUID,
|
||||
SOPClassUID,
|
||||
} = instance;
|
||||
const { SeriesDescription = 'PDF', MIMETypeOfEncapsulatedDocument } = instance;
|
||||
const { SeriesNumber, SeriesDate, SeriesInstanceUID, StudyInstanceUID, SOPClassUID } = instance;
|
||||
const pdfUrl = dataSource.retrieve.directURL({
|
||||
instance,
|
||||
tag: 'EncapsulatedDocument',
|
||||
@@ -68,16 +55,9 @@ const _getDisplaySetsFromSeries = (
|
||||
});
|
||||
};
|
||||
|
||||
export default function getSopClassHandlerModule({
|
||||
servicesManager,
|
||||
extensionManager,
|
||||
}) {
|
||||
export default function getSopClassHandlerModule({ servicesManager, extensionManager }) {
|
||||
const getDisplaySetsFromSeries = instances => {
|
||||
return _getDisplaySetsFromSeries(
|
||||
instances,
|
||||
servicesManager,
|
||||
extensionManager
|
||||
);
|
||||
return _getDisplaySetsFromSeries(instances, servicesManager, extensionManager);
|
||||
};
|
||||
|
||||
return [
|
||||
|
||||
@@ -3,9 +3,7 @@ import getSopClassHandlerModule from './getSopClassHandlerModule';
|
||||
import { id } from './id.js';
|
||||
|
||||
const Component = React.lazy(() => {
|
||||
return import(
|
||||
/* webpackPrefetch: true */ './viewports/OHIFCornerstonePdfViewport'
|
||||
);
|
||||
return import(/* webpackPrefetch: true */ './viewports/OHIFCornerstonePdfViewport');
|
||||
});
|
||||
|
||||
const OHIFCornerstonePdfViewport = props => {
|
||||
@@ -41,9 +39,7 @@ const dicomPDFExtension = {
|
||||
);
|
||||
};
|
||||
|
||||
return [
|
||||
{ name: 'dicom-pdf', component: ExtendedOHIFCornerstonePdfViewport },
|
||||
];
|
||||
return [{ name: 'dicom-pdf', component: ExtendedOHIFCornerstonePdfViewport }];
|
||||
},
|
||||
// getCommandsModule({ servicesManager }) {
|
||||
// return {
|
||||
|
||||
@@ -21,8 +21,12 @@ function OHIFCornerstonePdfViewport({ displaySets }) {
|
||||
}, [pdfUrl]);
|
||||
|
||||
return (
|
||||
<div className="bg-primary-black w-full h-full text-white">
|
||||
<object data={url} type="application/pdf" className="w-full h-full">
|
||||
<div className="bg-primary-black h-full w-full text-white">
|
||||
<object
|
||||
data={url}
|
||||
type="application/pdf"
|
||||
className="h-full w-full"
|
||||
>
|
||||
<div>No online PDF viewer installed</div>
|
||||
</object>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user