Merge branch 'master' into customizable-TS

This commit is contained in:
Salim Kanoun authored and GitHub committed 2023-06-07 13:08:49 +02:00
commit 18c6a47dca
336 files changed
+2204 -1160

No files matched your search

+7 -2
View File
@@ -3,6 +3,11 @@ const webpackCommon = require('./../../../.webpack/webpack.base.js');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
return webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
const ENTRY = {
app: `${SRC_DIR}/index.tsx`,
};
module.exports = (env, argv) => {
return webpackCommon(env, argv, { SRC_DIR, DIST_DIR, ENTRY });
};
+18 -6
View File
@@ -5,12 +5,18 @@ const webpackCommon = require('./../../../.webpack/webpack.base.js');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const pkg = require('./../package.json');
const ROOT_DIR = path.join(__dirname, './../');
const ROOT_DIR = path.join(__dirname, '../');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
const ENTRY = {
app: `${SRC_DIR}/index.ts`,
};
const outputName = `ohif-${pkg.name.split('/').pop()}`;
module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR, ENTRY });
return merge(commonConfig, {
stats: {
@@ -30,18 +36,24 @@ module.exports = (env, argv) => {
},
output: {
path: ROOT_DIR,
library: 'OHIFExtCornerstone',
library: 'ohif-extension-default',
libraryTarget: 'umd',
libraryExport: 'default',
filename: pkg.main,
},
externals: [
/\b(vtk.js)/,
/\b(dcmjs)/,
/\b(gl-matrix)/,
/^@ohif/,
/^@cornerstonejs/,
],
plugins: [
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1,
}),
new MiniCssExtractPlugin({
filename: './dist/[name].css',
chunkFilename: './dist/[id].css',
filename: `./dist/${outputName}.css`,
chunkFilename: `./dist/${outputName}.css`,
}),
],
});
+6 -6
View File
@@ -1,11 +1,11 @@
{
"name": "@ohif/extension-default",
"version": "3.0.0",
"version": "3.6.0-beta.0",
"description": "Common/default features and functionality for basic image viewing",
"author": "OHIF Core Team",
"license": "MIT",
"repository": "OHIF/Viewers",
"main": "dist/index.umd.js",
"main": "dist/ohif-extension-default.umd.js",
"module": "src/index.ts",
"publishConfig": {
"access": "public"
@@ -23,15 +23,15 @@
"ohif-extension"
],
"scripts": {
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --debug --output-pathinfo",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --output-pathinfo",
"dev:dicom-pdf": "yarn run dev",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"build:package-1": "yarn run build",
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "^3.0.0",
"@ohif/i18n": "^1.0.0",
"@ohif/core": "3.6.0-beta.0",
"@ohif/i18n": "3.6.0-beta.0",
"dcmjs": "^0.29.5",
"dicomweb-client": "^0.10.2",
"prop-types": "^15.6.2",
@@ -81,7 +81,7 @@ function ViewerLayout({
const { hotkeyDefinitions, hotkeyDefaults } = hotkeysManager;
const versionNumber = process.env.VERSION_NUMBER;
const buildNumber = process.env.BUILD_NUM;
const commitHash = process.env.COMMIT_HASH;
const menuOptions = [
{
@@ -91,7 +91,7 @@ function ViewerLayout({
show({
content: AboutModal,
title: 'About OHIF Viewer',
contentProps: { versionNumber, buildNumber },
contentProps: { versionNumber, commitHash },
}),
},
{
+1 -1
View File
@@ -12,7 +12,7 @@ import findViewportsByPosition, {
import { ContextMenuProps } from './CustomizableContextMenu/types';
import { NavigateHistory } from './types/commandModuleTypes';
import { history } from '@ohif/viewer';
import { history } from '@ohif/app';
const { subscribeToNextViewportGridChange } = utils;