Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eafc716d00 | ||
|
|
88d695cf4f | ||
|
|
44f101d3f2 | ||
|
|
a9d6869198 | ||
|
|
77c102f993 | ||
|
|
75f61f85fe | ||
|
|
9fbdf37f44 | ||
|
|
7ecd2f1628 | ||
|
|
a336992971 | ||
|
|
a2ef2b0fcb | ||
|
|
eb57c2f8bd | ||
|
|
65b49aeb1b |
No files matched your search
@@ -131,7 +131,12 @@ module.exports = (env, argv, { SRC_DIR, ENTRY }) => {
|
||||
extensions: ['.js', '.jsx', '.json', '.ts', '.tsx', '*'],
|
||||
// symlinked resources are resolved to their real path, not their symlinked location
|
||||
symlinks: true,
|
||||
fallback: { fs: false, path: false, zlib: false },
|
||||
fallback: {
|
||||
fs: false,
|
||||
path: false,
|
||||
zlib: false,
|
||||
"buffer": require.resolve("buffer")
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
@@ -155,6 +160,9 @@ module.exports = (env, argv, { SRC_DIR, ENTRY }) => {
|
||||
process.env.REACT_APP_I18N_DEBUG || ''
|
||||
),
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ['buffer', 'Buffer'],
|
||||
}),
|
||||
// Uncomment to generate bundle analyzer
|
||||
// new BundleAnalyzerPlugin(),
|
||||
],
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **PT Metadata:** Allow for PatientWeight to be missing from the metadata ([#3621](https://github.com/OHIF/Viewers/issues/3621)) ([44f101d](https://github.com/OHIF/Viewers/commit/44f101d3f2b3204b67e31f4e4939062e65a246ee))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package ohif-monorepo-root
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **cloud data source config:** GUI and API for configuring a cloud data source with Google cloud healthcare implementation ([#3589](https://github.com/OHIF/Viewers/issues/3589)) ([a336992](https://github.com/OHIF/Viewers/commit/a336992971c07552c9dbb6e1de43169d37762ef1))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **memory leak:** array buffer was sticking around in volume viewports ([#3611](https://github.com/OHIF/Viewers/issues/3611)) ([65b49ae](https://github.com/OHIF/Viewers/commit/65b49aeb1b5f38224e4892bdf32453500ee351f8))
|
||||
+1
-1
@@ -1 +1 @@
|
||||
b117a54aa10ee09e72e7675c6fb83cd8f49c26f7
|
||||
44f101d3f2b3204b67e31f4e4939062e65a246ee
|
||||
@@ -0,0 +1,35 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **cloud data source config:** GUI and API for configuring a cloud data source with Google cloud healthcare implementation ([#3589](https://github.com/OHIF/Viewers/issues/3589)) ([a336992](https://github.com/OHIF/Viewers/commit/a336992971c07552c9dbb6e1de43169d37762ef1))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-cornerstone-dicom-rt",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "DICOM RT read workflow",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -31,10 +31,10 @@
|
||||
"start": "yarn run dev"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.7.0-beta.56",
|
||||
"@ohif/extension-cornerstone": "3.7.0-beta.56",
|
||||
"@ohif/extension-default": "3.7.0-beta.56",
|
||||
"@ohif/i18n": "3.7.0-beta.56",
|
||||
"@ohif/core": "3.7.0-beta.60",
|
||||
"@ohif/extension-cornerstone": "3.7.0-beta.60",
|
||||
"@ohif/extension-default": "3.7.0-beta.60",
|
||||
"@ohif/i18n": "3.7.0-beta.60",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
|
||||
@@ -18,7 +18,9 @@ export default function _getStatusComponent({ isHydrated, onStatusClick }) {
|
||||
);
|
||||
break;
|
||||
case false:
|
||||
StatusIcon = () => <Icon name="status-untracked" />;
|
||||
StatusIcon = () => (
|
||||
<Icon className="text-aqua-pale" name="status-untracked" />
|
||||
);
|
||||
|
||||
ToolTipMessage = () => <div>Click LOAD to load RTSTRUCT.</div>;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **cloud data source config:** GUI and API for configuring a cloud data source with Google cloud healthcare implementation ([#3589](https://github.com/OHIF/Viewers/issues/3589)) ([a336992](https://github.com/OHIF/Viewers/commit/a336992971c07552c9dbb6e1de43169d37762ef1))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-cornerstone-dicom-seg",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "DICOM SEG read workflow",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -31,10 +31,10 @@
|
||||
"start": "yarn run dev"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.7.0-beta.56",
|
||||
"@ohif/extension-cornerstone": "3.7.0-beta.56",
|
||||
"@ohif/extension-default": "3.7.0-beta.56",
|
||||
"@ohif/i18n": "3.7.0-beta.56",
|
||||
"@ohif/core": "3.7.0-beta.60",
|
||||
"@ohif/extension-cornerstone": "3.7.0-beta.60",
|
||||
"@ohif/extension-default": "3.7.0-beta.60",
|
||||
"@ohif/i18n": "3.7.0-beta.60",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
|
||||
@@ -18,7 +18,9 @@ export default function _getStatusComponent({ isHydrated, onStatusClick }) {
|
||||
);
|
||||
break;
|
||||
case false:
|
||||
StatusIcon = () => <Icon name="status-untracked" />;
|
||||
StatusIcon = () => (
|
||||
<Icon className="text-aqua-pale" name="status-untracked" />
|
||||
);
|
||||
|
||||
ToolTipMessage = () => <div>Click LOAD to load segmentation.</div>;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **cloud data source config:** GUI and API for configuring a cloud data source with Google cloud healthcare implementation ([#3589](https://github.com/OHIF/Viewers/issues/3589)) ([a336992](https://github.com/OHIF/Viewers/commit/a336992971c07552c9dbb6e1de43169d37762ef1))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **memory leak:** array buffer was sticking around in volume viewports ([#3611](https://github.com/OHIF/Viewers/issues/3611)) ([65b49ae](https://github.com/OHIF/Viewers/commit/65b49aeb1b5f38224e4892bdf32453500ee351f8))
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-cornerstone-dicom-sr",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "OHIF extension for an SR Cornerstone Viewport",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -32,10 +32,10 @@
|
||||
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.7.0-beta.56",
|
||||
"@ohif/extension-cornerstone": "3.7.0-beta.56",
|
||||
"@ohif/extension-measurement-tracking": "3.7.0-beta.56",
|
||||
"@ohif/ui": "3.7.0-beta.56",
|
||||
"@ohif/core": "3.7.0-beta.60",
|
||||
"@ohif/extension-cornerstone": "3.7.0-beta.60",
|
||||
"@ohif/extension-measurement-tracking": "3.7.0-beta.60",
|
||||
"@ohif/ui": "3.7.0-beta.60",
|
||||
"dcmjs": "^0.29.5",
|
||||
"dicom-parser": "^1.8.9",
|
||||
"hammerjs": "^2.0.8",
|
||||
@@ -44,9 +44,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/adapters": "^1.10.3",
|
||||
"@cornerstonejs/core": "^1.10.3",
|
||||
"@cornerstonejs/tools": "^1.10.3",
|
||||
"@cornerstonejs/adapters": "^1.11.1",
|
||||
"@cornerstonejs/core": "^1.11.1",
|
||||
"@cornerstonejs/tools": "^1.11.1",
|
||||
"classnames": "^2.3.2"
|
||||
}
|
||||
}
|
||||
@@ -511,7 +511,9 @@ function _getStatusComponent({
|
||||
);
|
||||
break;
|
||||
case 3:
|
||||
StatusIcon = () => <Icon name="status-untracked" />;
|
||||
StatusIcon = () => (
|
||||
<Icon className="text-aqua-pale" name="status-untracked" />
|
||||
);
|
||||
|
||||
ToolTipMessage = () => (
|
||||
<div>{`Click ${loadStr} to restore measurements.`}</div>
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **memory leak:** array buffer was sticking around in volume viewports ([#3611](https://github.com/OHIF/Viewers/issues/3611)) ([65b49ae](https://github.com/OHIF/Viewers/commit/65b49aeb1b5f38224e4892bdf32453500ee351f8))
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-cornerstone",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "OHIF extension for Cornerstone",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -36,9 +36,9 @@
|
||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjph": "^2.4.2",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.10.3",
|
||||
"@ohif/core": "3.7.0-beta.56",
|
||||
"@ohif/ui": "3.7.0-beta.56",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.11.1",
|
||||
"@ohif/core": "3.7.0-beta.60",
|
||||
"@ohif/ui": "3.7.0-beta.60",
|
||||
"dcmjs": "^0.29.6",
|
||||
"dicom-parser": "^1.8.21",
|
||||
"hammerjs": "^2.0.8",
|
||||
@@ -52,10 +52,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/adapters": "^1.10.3",
|
||||
"@cornerstonejs/core": "^1.10.3",
|
||||
"@cornerstonejs/streaming-image-volume-loader": "^1.10.3",
|
||||
"@cornerstonejs/tools": "^1.10.3",
|
||||
"@cornerstonejs/adapters": "^1.11.1",
|
||||
"@cornerstonejs/core": "^1.11.1",
|
||||
"@cornerstonejs/streaming-image-volume-loader": "^1.11.1",
|
||||
"@cornerstonejs/tools": "^1.11.1",
|
||||
"@kitware/vtk.js": "27.3.1",
|
||||
"html2canvas": "^1.4.1",
|
||||
"lodash.debounce": "4.0.8",
|
||||
|
||||
@@ -61,7 +61,6 @@ const cornerstoneExtension: Types.Extensions.Extension = {
|
||||
imageRetrievalPoolManager.clearRequestStack(type);
|
||||
});
|
||||
|
||||
csWADOImageLoader.destroy();
|
||||
enabledElementReset();
|
||||
},
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **PT Metadata:** Allow for PatientWeight to be missing from the metadata ([#3621](https://github.com/OHIF/Viewers/issues/3621)) ([44f101d](https://github.com/OHIF/Viewers/commit/44f101d3f2b3204b67e31f4e4939062e65a246ee))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-default
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **cloud data source config:** GUI and API for configuring a cloud data source with Google cloud healthcare implementation ([#3589](https://github.com/OHIF/Viewers/issues/3589)) ([a336992](https://github.com/OHIF/Viewers/commit/a336992971c07552c9dbb6e1de43169d37762ef1))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-default
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-default",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "Common/default features and functionality for basic image viewing",
|
||||
"author": "OHIF Core Team",
|
||||
"license": "MIT",
|
||||
@@ -30,8 +30,8 @@
|
||||
"start": "yarn run dev"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.7.0-beta.56",
|
||||
"@ohif/i18n": "3.7.0-beta.56",
|
||||
"@ohif/core": "3.7.0-beta.60",
|
||||
"@ohif/i18n": "3.7.0-beta.60",
|
||||
"dcmjs": "^0.29.5",
|
||||
"dicomweb-client": "^0.10.2",
|
||||
"prop-types": "^15.6.2",
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
import React, { ReactElement, useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Icon, useModal } from '@ohif/ui';
|
||||
import { ExtensionManager, ServicesManager, Types } from '@ohif/core';
|
||||
import DataSourceConfigurationModalComponent from './DataSourceConfigurationModalComponent';
|
||||
|
||||
type DataSourceConfigurationComponentProps = {
|
||||
servicesManager: ServicesManager;
|
||||
extensionManager: ExtensionManager;
|
||||
};
|
||||
|
||||
function DataSourceConfigurationComponent({
|
||||
servicesManager,
|
||||
extensionManager,
|
||||
}: DataSourceConfigurationComponentProps): ReactElement {
|
||||
const { t } = useTranslation('DataSourceConfiguration');
|
||||
const { show, hide } = useModal();
|
||||
|
||||
const { customizationService } = servicesManager.services;
|
||||
|
||||
const [configurationAPI, setConfigurationAPI] = useState<
|
||||
Types.BaseDataSourceConfigurationAPI
|
||||
>();
|
||||
|
||||
const [configuredItems, setConfiguredItems] = useState<
|
||||
Array<Types.BaseDataSourceConfigurationAPIItem>
|
||||
>();
|
||||
|
||||
useEffect(() => {
|
||||
let shouldUpdate = true;
|
||||
|
||||
const dataSourceChangedCallback = async () => {
|
||||
const activeDataSourceDef = extensionManager.getActiveDataSourceDefinition();
|
||||
|
||||
if (!activeDataSourceDef.configuration.configurationAPI) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { factory: configurationAPIFactory } =
|
||||
customizationService.get(
|
||||
activeDataSourceDef.configuration.configurationAPI
|
||||
) ?? {};
|
||||
|
||||
if (!configurationAPIFactory) {
|
||||
return;
|
||||
}
|
||||
|
||||
const configAPI = configurationAPIFactory(activeDataSourceDef.sourceName);
|
||||
setConfigurationAPI(configAPI);
|
||||
|
||||
configAPI.getConfiguredItems().then(list => {
|
||||
if (shouldUpdate) {
|
||||
setConfiguredItems(list);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const sub = extensionManager.subscribe(
|
||||
extensionManager.EVENTS.ACTIVE_DATA_SOURCE_CHANGED,
|
||||
dataSourceChangedCallback
|
||||
);
|
||||
|
||||
dataSourceChangedCallback();
|
||||
|
||||
return () => {
|
||||
shouldUpdate = false;
|
||||
sub.unsubscribe();
|
||||
};
|
||||
}, []);
|
||||
|
||||
return configuredItems ? (
|
||||
<div className="flex text-aqua-pale overflow-hidden items-center">
|
||||
<Icon
|
||||
name="settings"
|
||||
className="cursor-pointer shrink-0 w-3.5 h-3.5 mr-2.5"
|
||||
onClick={() =>
|
||||
show({
|
||||
content: DataSourceConfigurationModalComponent,
|
||||
title: t('Configure Data Source'),
|
||||
contentProps: {
|
||||
configurationAPI,
|
||||
configuredItems,
|
||||
onHide: hide,
|
||||
},
|
||||
})
|
||||
}
|
||||
></Icon>
|
||||
{configuredItems.map((item, itemIndex) => {
|
||||
return (
|
||||
<div key={itemIndex} className="flex overflow-hidden">
|
||||
<div
|
||||
key={itemIndex}
|
||||
className="text-ellipsis whitespace-nowrap overflow-hidden"
|
||||
>
|
||||
{item.name}
|
||||
</div>
|
||||
{itemIndex !== configuredItems.length - 1 && (
|
||||
<div className="px-2.5">|</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
) : (
|
||||
<></>
|
||||
);
|
||||
}
|
||||
|
||||
export default DataSourceConfigurationComponent;
|
||||
@@ -0,0 +1,209 @@
|
||||
import classNames from 'classnames';
|
||||
import React, { ReactElement, useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Icon } from '@ohif/ui';
|
||||
import { Types } from '@ohif/core';
|
||||
import ItemListComponent from './ItemListComponent';
|
||||
|
||||
const NO_WRAP_ELLIPSIS_CLASS_NAMES =
|
||||
'text-ellipsis whitespace-nowrap overflow-hidden';
|
||||
|
||||
type DataSourceConfigurationModalComponentProps = {
|
||||
configurationAPI: Types.BaseDataSourceConfigurationAPI;
|
||||
configuredItems: Array<Types.BaseDataSourceConfigurationAPIItem>;
|
||||
onHide: () => void;
|
||||
};
|
||||
|
||||
function DataSourceConfigurationModalComponent({
|
||||
configurationAPI,
|
||||
configuredItems,
|
||||
onHide,
|
||||
}: DataSourceConfigurationModalComponentProps) {
|
||||
const { t } = useTranslation('DataSourceConfiguration');
|
||||
|
||||
const [itemList, setItemList] = useState<
|
||||
Array<Types.BaseDataSourceConfigurationAPIItem>
|
||||
>();
|
||||
|
||||
const [selectedItems, setSelectedItems] = useState(configuredItems);
|
||||
|
||||
// Determines whether to show the full configuration for the data source.
|
||||
// This typically occurs when the configuration component is first displayed.
|
||||
const [showFullConfig, setShowFullConfig] = useState(true);
|
||||
|
||||
const [errorMessage, setErrorMessage] = useState<string>();
|
||||
|
||||
const [itemLabels] = useState(configurationAPI.getItemLabels());
|
||||
|
||||
/**
|
||||
* The index of the selected item that is considered current and for which
|
||||
* its sub-items should be displayed in the items list component. When the
|
||||
* full/existing configuration for a data source is to be shown, the current
|
||||
* selected item is the second to last in the `selectedItems` list.
|
||||
*/
|
||||
const currentSelectedItemIndex = showFullConfig
|
||||
? selectedItems.length - 2
|
||||
: selectedItems.length - 1;
|
||||
|
||||
useEffect(() => {
|
||||
let shouldUpdate = true;
|
||||
|
||||
setErrorMessage(null);
|
||||
|
||||
// Clear out the former/old list while we fetch the next sub item list.
|
||||
setItemList(null);
|
||||
|
||||
if (selectedItems.length === 0) {
|
||||
configurationAPI
|
||||
.initialize()
|
||||
.then(items => {
|
||||
if (shouldUpdate) {
|
||||
setItemList(items);
|
||||
}
|
||||
})
|
||||
.catch(error => setErrorMessage(error.message));
|
||||
} else if (!showFullConfig && selectedItems.length === itemLabels.length) {
|
||||
// The last item to configure the data source (path) has been selected.
|
||||
configurationAPI.setCurrentItem(selectedItems[selectedItems.length - 1]);
|
||||
// We can hide the modal dialog now.
|
||||
onHide();
|
||||
} else {
|
||||
configurationAPI
|
||||
.setCurrentItem(selectedItems[currentSelectedItemIndex])
|
||||
.then(items => {
|
||||
if (shouldUpdate) {
|
||||
setItemList(items);
|
||||
}
|
||||
})
|
||||
.catch(error => setErrorMessage(error.message));
|
||||
}
|
||||
|
||||
return () => {
|
||||
shouldUpdate = false;
|
||||
};
|
||||
}, [
|
||||
selectedItems,
|
||||
configurationAPI,
|
||||
onHide,
|
||||
itemLabels,
|
||||
showFullConfig,
|
||||
currentSelectedItemIndex,
|
||||
]);
|
||||
|
||||
const getSelectedItemCursorClasses = itemIndex =>
|
||||
itemIndex !== itemLabels.length - 1 && itemIndex < selectedItems.length
|
||||
? 'cursor-pointer'
|
||||
: 'cursor-auto';
|
||||
|
||||
const getSelectedItemBackgroundClasses = itemIndex =>
|
||||
itemIndex < selectedItems.length
|
||||
? classNames(
|
||||
'bg-black/[.4]',
|
||||
itemIndex !== itemLabels.length - 1
|
||||
? 'hover:bg-transparent active:bg-secondary-dark'
|
||||
: ''
|
||||
)
|
||||
: 'bg-transparent';
|
||||
|
||||
const getSelectedItemBorderClasses = itemIndex =>
|
||||
itemIndex === currentSelectedItemIndex + 1
|
||||
? classNames('border-2', 'border-solid', 'border-primary-light')
|
||||
: itemIndex < selectedItems.length
|
||||
? 'border border-solid border-primary-active hover:border-primary-light active:border-white'
|
||||
: 'border border-dashed border-secondary-light';
|
||||
|
||||
const getSelectedItemTextClasses = itemIndex =>
|
||||
itemIndex <= selectedItems.length
|
||||
? 'text-primary-light'
|
||||
: 'text-primary-active';
|
||||
|
||||
const getErrorComponent = (): ReactElement => {
|
||||
return (
|
||||
<div className="flex flex-col gap-4 min-h-[1px] grow">
|
||||
<div className="text-primary-light text-[20px]">
|
||||
{t(`Error fetching ${itemLabels[selectedItems.length]} list`)}
|
||||
</div>
|
||||
<div className="bg-black text-[14px] grow p-4">{errorMessage}</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const getSelectedItemsComponent = (): ReactElement => {
|
||||
return (
|
||||
<div className="flex gap-4">
|
||||
{itemLabels.map((itemLabel, itemLabelIndex) => {
|
||||
return (
|
||||
<div
|
||||
key={itemLabel}
|
||||
className={classNames(
|
||||
'rounded-md p-3.5 flex flex-col gap-1 shrink min-w-[1px] basis-[200px]',
|
||||
getSelectedItemCursorClasses(itemLabelIndex),
|
||||
getSelectedItemBackgroundClasses(itemLabelIndex),
|
||||
getSelectedItemBorderClasses(itemLabelIndex),
|
||||
getSelectedItemTextClasses(itemLabelIndex)
|
||||
)}
|
||||
onClick={
|
||||
(showFullConfig && itemLabelIndex < currentSelectedItemIndex) ||
|
||||
itemLabelIndex <= currentSelectedItemIndex
|
||||
? () => {
|
||||
setShowFullConfig(false);
|
||||
setSelectedItems(theList =>
|
||||
theList.slice(0, itemLabelIndex)
|
||||
);
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<div className="flex gap-2 items-center text-">
|
||||
{itemLabelIndex < selectedItems.length ? (
|
||||
<Icon name="status-tracked" />
|
||||
) : (
|
||||
<Icon name="status-untracked" />
|
||||
)}
|
||||
<div className={classNames(NO_WRAP_ELLIPSIS_CLASS_NAMES)}>
|
||||
{t(itemLabel)}
|
||||
</div>
|
||||
</div>
|
||||
{itemLabelIndex < selectedItems.length ? (
|
||||
<div
|
||||
className={classNames(
|
||||
'text-white text-[14px]',
|
||||
NO_WRAP_ELLIPSIS_CLASS_NAMES
|
||||
)}
|
||||
>
|
||||
{selectedItems[itemLabelIndex].name}
|
||||
</div>
|
||||
) : (
|
||||
<br></br>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="h-[calc(100vh-300px)] flex flex-col pt-0.5 gap-4 select-none">
|
||||
{getSelectedItemsComponent()}
|
||||
<div className="w-full h-0.5 shrink-0 bg-black"></div>
|
||||
{errorMessage ? (
|
||||
getErrorComponent()
|
||||
) : (
|
||||
<ItemListComponent
|
||||
itemLabel={itemLabels[currentSelectedItemIndex + 1]}
|
||||
itemList={itemList}
|
||||
onItemClicked={item => {
|
||||
setShowFullConfig(false);
|
||||
setSelectedItems(theList => [
|
||||
...theList.slice(0, currentSelectedItemIndex + 1),
|
||||
item,
|
||||
]);
|
||||
}}
|
||||
></ItemListComponent>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default DataSourceConfigurationModalComponent;
|
||||
@@ -0,0 +1,93 @@
|
||||
import classNames from 'classnames';
|
||||
import React, { ReactElement, useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
Button,
|
||||
Icon,
|
||||
InputFilterText,
|
||||
LoadingIndicatorProgress,
|
||||
} from '@ohif/ui';
|
||||
import { Types } from '@ohif/core';
|
||||
|
||||
type ItemListComponentProps = {
|
||||
itemLabel: string;
|
||||
itemList: Array<Types.BaseDataSourceConfigurationAPIItem>;
|
||||
onItemClicked: (item: Types.BaseDataSourceConfigurationAPIItem) => void;
|
||||
};
|
||||
|
||||
function ItemListComponent({
|
||||
itemLabel,
|
||||
itemList,
|
||||
onItemClicked,
|
||||
}: ItemListComponentProps): ReactElement {
|
||||
const { t } = useTranslation('DataSourceConfiguration');
|
||||
const [filterValue, setFilterValue] = useState('');
|
||||
|
||||
useEffect(() => {
|
||||
setFilterValue('');
|
||||
}, [itemList]);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-4 min-h-[1px] grow">
|
||||
<div className="flex justify-between items-center">
|
||||
<div className="text-primary-light text-[20px]">
|
||||
{t(`Select ${itemLabel}`)}
|
||||
</div>
|
||||
<InputFilterText
|
||||
className="grow max-w-[40%]"
|
||||
value={filterValue}
|
||||
onDebounceChange={setFilterValue}
|
||||
placeholder={t(`Search ${itemLabel} list`)}
|
||||
></InputFilterText>
|
||||
</div>
|
||||
<div className="flex flex-col relative min-h-[1px] grow text-[14px] bg-black">
|
||||
{itemList == null ? (
|
||||
<LoadingIndicatorProgress className={'w-full h-full'} />
|
||||
) : itemList.length === 0 ? (
|
||||
<div className="flex flex-col h-full px-6 py-4 items-center justify-center text-primary-light">
|
||||
<Icon name="magnifier" className="mb-4" />
|
||||
<span>{t(`No ${itemLabel} available`)}</span>
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
<div className="bg-secondary-dark text-white px-3 py-1.5">
|
||||
{t(itemLabel)}
|
||||
</div>
|
||||
<div className="overflow-auto ohif-scrollbar">
|
||||
{itemList
|
||||
.filter(
|
||||
item =>
|
||||
!filterValue ||
|
||||
item.name.toLowerCase().includes(filterValue.toLowerCase())
|
||||
)
|
||||
.map(item => {
|
||||
const border =
|
||||
'rounded border-transparent border-b-secondary-light border-[1px] hover:border-primary-light';
|
||||
return (
|
||||
<div
|
||||
className={classNames(
|
||||
'group mx-2 px-6 py-2 flex justify-between items-center hover:text-primary-light hover:bg-primary-dark',
|
||||
border
|
||||
)}
|
||||
key={item.id}
|
||||
>
|
||||
<div>{item.name}</div>
|
||||
<Button
|
||||
onClick={() => onItemClicked(item)}
|
||||
className="invisible group-hover:visible"
|
||||
endIcon={<Icon name="arrow-left" />}
|
||||
>
|
||||
{t('Select')}
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default ItemListComponent;
|
||||
+234
@@ -0,0 +1,234 @@
|
||||
import { ExtensionManager, Types } from '@ohif/core';
|
||||
|
||||
/**
|
||||
* This file contains the implementations of BaseDataSourceConfigurationAPIItem
|
||||
* and BaseDataSourceConfigurationAPI for the Google cloud healthcare API. To
|
||||
* better understand this implementation and/or to implement custom implementations,
|
||||
* see the platform\core\src\types\DataSourceConfigurationAPI.ts and its JS doc
|
||||
* comments as a guide.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The various Google Cloud Healthcare path item types.
|
||||
*/
|
||||
enum ItemType {
|
||||
projects = 0,
|
||||
locations = 1,
|
||||
datasets = 2,
|
||||
dicomStores = 3,
|
||||
}
|
||||
|
||||
interface NamedItem {
|
||||
name: string;
|
||||
}
|
||||
interface Project extends NamedItem {
|
||||
projectId: string;
|
||||
}
|
||||
|
||||
const initialUrl = 'https://cloudresourcemanager.googleapis.com/v1';
|
||||
const baseHealthcareUrl = 'https://healthcare.googleapis.com/v1';
|
||||
|
||||
class GoogleCloudDataSourceConfigurationAPIItem
|
||||
implements Types.BaseDataSourceConfigurationAPIItem {
|
||||
id: string;
|
||||
name: string;
|
||||
url: string;
|
||||
itemType: ItemType;
|
||||
}
|
||||
|
||||
class GoogleCloudDataSourceConfigurationAPI
|
||||
implements Types.BaseDataSourceConfigurationAPI {
|
||||
private _extensionManager: ExtensionManager;
|
||||
private _fetchOptions: { method: string; headers: unknown };
|
||||
private _dataSourceName: string;
|
||||
|
||||
constructor(dataSourceName, servicesManager, extensionManager) {
|
||||
this._dataSourceName = dataSourceName;
|
||||
this._extensionManager = extensionManager;
|
||||
const userAuthenticationService =
|
||||
servicesManager.services.userAuthenticationService;
|
||||
this._fetchOptions = {
|
||||
method: 'GET',
|
||||
headers: userAuthenticationService.getAuthorizationHeader(),
|
||||
};
|
||||
}
|
||||
|
||||
getItemLabels = () => ['Project', 'Location', 'Data set', 'DICOM store'];
|
||||
|
||||
async initialize(): Promise<Types.BaseDataSourceConfigurationAPIItem[]> {
|
||||
const url = `${initialUrl}/projects`;
|
||||
|
||||
const projects = (await GoogleCloudDataSourceConfigurationAPI._doFetch(
|
||||
url,
|
||||
ItemType.projects,
|
||||
this._fetchOptions
|
||||
)) as Array<Project>;
|
||||
|
||||
if (!projects?.length) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const projectItems = projects.map(project => {
|
||||
return {
|
||||
id: project.projectId,
|
||||
name: project.name,
|
||||
itemType: ItemType.projects,
|
||||
url: `${baseHealthcareUrl}/projects/${project.projectId}`,
|
||||
};
|
||||
});
|
||||
|
||||
return projectItems;
|
||||
}
|
||||
|
||||
async setCurrentItem(
|
||||
anItem: Types.BaseDataSourceConfigurationAPIItem
|
||||
): Promise<Types.BaseDataSourceConfigurationAPIItem[]> {
|
||||
const googleCloudItem = anItem as GoogleCloudDataSourceConfigurationAPIItem;
|
||||
|
||||
if (googleCloudItem.itemType === ItemType.dicomStores) {
|
||||
// Last configurable item, so update the data source configuration.
|
||||
const url = `${googleCloudItem.url}/dicomWeb`;
|
||||
const dataSourceDefCopy = JSON.parse(
|
||||
JSON.stringify(
|
||||
this._extensionManager.getDataSourceDefinition(this._dataSourceName)
|
||||
)
|
||||
);
|
||||
dataSourceDefCopy.configuration = {
|
||||
...dataSourceDefCopy.configuration,
|
||||
wadoUriRoot: url,
|
||||
qidoRoot: url,
|
||||
wadoRoot: url,
|
||||
};
|
||||
|
||||
this._extensionManager.updateDataSourceConfiguration(
|
||||
dataSourceDefCopy.sourceName,
|
||||
dataSourceDefCopy.configuration
|
||||
);
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
const subItemType = googleCloudItem.itemType + 1;
|
||||
const subItemField = `${ItemType[subItemType]}`;
|
||||
|
||||
const url = `${googleCloudItem.url}/${subItemField}`;
|
||||
|
||||
const fetchedSubItems = await GoogleCloudDataSourceConfigurationAPI._doFetch(
|
||||
url,
|
||||
subItemType,
|
||||
this._fetchOptions
|
||||
);
|
||||
|
||||
if (!fetchedSubItems?.length) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const subItems = fetchedSubItems.map(subItem => {
|
||||
const nameSplit = subItem.name.split('/');
|
||||
return {
|
||||
id: subItem.name,
|
||||
name: nameSplit[nameSplit.length - 1],
|
||||
itemType: subItemType,
|
||||
url: `${baseHealthcareUrl}/${subItem.name}`,
|
||||
};
|
||||
});
|
||||
|
||||
return subItems;
|
||||
}
|
||||
|
||||
async getConfiguredItems(): Promise<
|
||||
Array<GoogleCloudDataSourceConfigurationAPIItem>
|
||||
> {
|
||||
const dataSourceDefinition = this._extensionManager.getDataSourceDefinition(
|
||||
this._dataSourceName
|
||||
);
|
||||
|
||||
const url = dataSourceDefinition.configuration.wadoUriRoot;
|
||||
const projectsIndex = url.indexOf('projects');
|
||||
const urlSplit = url.substring(projectsIndex).split('/');
|
||||
|
||||
const configuredItems = [];
|
||||
for (let itemType = 0; itemType < 4; itemType += 1) {
|
||||
if (itemType === ItemType.projects) {
|
||||
const projectId = urlSplit[1];
|
||||
const projectUrl = `${initialUrl}/projects/${projectId}`;
|
||||
const data = await GoogleCloudDataSourceConfigurationAPI._doFetch(
|
||||
projectUrl,
|
||||
ItemType.projects,
|
||||
this._fetchOptions
|
||||
);
|
||||
const project = data[0] as Project;
|
||||
configuredItems.push({
|
||||
id: project.projectId,
|
||||
name: project.name,
|
||||
itemType: itemType,
|
||||
url: `${baseHealthcareUrl}/projects/${project.projectId}`,
|
||||
});
|
||||
} else {
|
||||
const relativePath = urlSplit.slice(0, itemType * 2 + 2).join('/');
|
||||
configuredItems.push({
|
||||
id: relativePath,
|
||||
name: urlSplit[itemType * 2 + 1],
|
||||
itemType: itemType,
|
||||
url: `${baseHealthcareUrl}/${relativePath}`,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return configuredItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches an array of items the specified item type.
|
||||
* @param urlStr the fetch url
|
||||
* @param fetchItemType the type to fetch
|
||||
* @param fetchOptions the header options for the fetch (e.g. authorization header)
|
||||
* @param fetchSearchParams any search query params; currently only used for paging results
|
||||
* @returns an array of items of the specified type
|
||||
*/
|
||||
private static async _doFetch(
|
||||
urlStr: string,
|
||||
fetchItemType: ItemType,
|
||||
fetchOptions = {},
|
||||
fetchSearchParams: Record<string, string> = {}
|
||||
): Promise<Array<Project> | Array<NamedItem>> {
|
||||
try {
|
||||
const url = new URL(urlStr);
|
||||
url.search = new URLSearchParams(fetchSearchParams).toString();
|
||||
|
||||
const response = await fetch(url, fetchOptions);
|
||||
const data = await response.json();
|
||||
if (response.status >= 200 && response.status < 300 && data != null) {
|
||||
if (data.nextPageToken != null) {
|
||||
fetchSearchParams.pageToken = data.nextPageToken;
|
||||
const subPageData = await this._doFetch(
|
||||
urlStr,
|
||||
fetchItemType,
|
||||
fetchOptions,
|
||||
fetchSearchParams
|
||||
);
|
||||
data[ItemType[fetchItemType]] = data[ItemType[fetchItemType]].concat(
|
||||
subPageData
|
||||
);
|
||||
}
|
||||
if (data[ItemType[fetchItemType]]) {
|
||||
return data[ItemType[fetchItemType]];
|
||||
} else if (data.name) {
|
||||
return [data];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
} else {
|
||||
const message =
|
||||
data?.error?.message ||
|
||||
`Error returned from Google Cloud Healthcare: ${response.status} - ${response.statusText}`;
|
||||
throw new Error(message);
|
||||
}
|
||||
} catch (err) {
|
||||
const message = err?.message || 'Error occurred during fetch request.';
|
||||
throw new Error(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export { GoogleCloudDataSourceConfigurationAPI };
|
||||
@@ -1,10 +1,9 @@
|
||||
import dcmjs from 'dcmjs';
|
||||
import moment from 'moment';
|
||||
import React, { useState, useMemo, useEffect, useRef } from 'react';
|
||||
import React, { useState, useMemo, useEffect } from 'react';
|
||||
import { classes } from '@ohif/core';
|
||||
import { Icon, InputRange, Select, Typography } from '@ohif/ui';
|
||||
import { InputRange, Select, Typography, InputFilterText } from '@ohif/ui';
|
||||
import debounce from 'lodash.debounce';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import DicomTagTable from './DicomTagTable';
|
||||
import './DicomTagBrowser.css';
|
||||
@@ -34,8 +33,6 @@ const DicomTagBrowser = ({ displaySets, displaySetInstanceUID }) => {
|
||||
setInstanceNumber(1);
|
||||
};
|
||||
|
||||
const searchInputRef = useRef(null);
|
||||
|
||||
const activeDisplaySet = displaySets.find(
|
||||
ds => ds.displaySetInstanceUID === selectedDisplaySetInstanceUID
|
||||
);
|
||||
@@ -158,33 +155,11 @@ const DicomTagBrowser = ({ displaySets, displaySetInstanceUID }) => {
|
||||
</div>
|
||||
<div className="w-full h-1 bg-black"></div>
|
||||
<div className="flex flex-row my-3 w-1/2">
|
||||
{/* TODO - refactor the following into its own reusable component */}
|
||||
<label className="relative block w-full mr-8">
|
||||
<span className="absolute inset-y-0 left-0 flex items-center pl-2">
|
||||
<Icon name="icon-search"></Icon>
|
||||
</span>
|
||||
<input
|
||||
ref={searchInputRef}
|
||||
type="text"
|
||||
className="block bg-black w-full shadow transition duration-300 appearance-none border border-inputfield-main focus:border-inputfield-focus focus:outline-none disabled:border-inputfield-disabled rounded w-full py-2 px-9 text-base leading-tight placeholder:text-inputfield-placeholder"
|
||||
placeholder="Search metadata..."
|
||||
onChange={event => debouncedSetFilterValue(event.target.value)}
|
||||
autoComplete="off"
|
||||
></input>
|
||||
<span className="absolute inset-y-0 right-0 flex items-center pr-2">
|
||||
<Icon
|
||||
name="icon-clear-field"
|
||||
className={classNames(
|
||||
'cursor-pointer',
|
||||
filterValue ? '' : 'hidden'
|
||||
)}
|
||||
onClick={() => {
|
||||
searchInputRef.current.value = '';
|
||||
debouncedSetFilterValue('');
|
||||
}}
|
||||
></Icon>
|
||||
</span>
|
||||
</label>
|
||||
<InputFilterText
|
||||
className="block w-full mr-8"
|
||||
placeholder="Search metadata..."
|
||||
onDebounceChange={setFilterValue}
|
||||
></InputFilterText>
|
||||
</div>
|
||||
<DicomTagTable rows={filteredRows} />
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { CustomizationService } from '@ohif/core';
|
||||
import React from 'react';
|
||||
import DataSourceSelector from './Panels/DataSourceSelector';
|
||||
import DataSourceConfigurationComponent from './Components/DataSourceConfigurationComponent';
|
||||
import { GoogleCloudDataSourceConfigurationAPI } from './DataSourceConfigurationAPI/GoogleCloudDataSourceConfigurationAPI';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -11,7 +13,10 @@ import DataSourceSelector from './Panels/DataSourceSelector';
|
||||
* custom page for the user to view their profile, or to add a custom
|
||||
* page for login etc.
|
||||
*/
|
||||
export default function getCustomizationModule() {
|
||||
export default function getCustomizationModule({
|
||||
servicesManager,
|
||||
extensionManager,
|
||||
}) {
|
||||
return [
|
||||
{
|
||||
name: 'helloPage',
|
||||
@@ -136,6 +141,26 @@ export default function getCustomizationModule() {
|
||||
return clonedObject;
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
// the generic GUI component to configure a data source using an instance of a BaseDataSourceConfigurationAPI
|
||||
id: 'ohif.dataSourceConfigurationComponent',
|
||||
component: DataSourceConfigurationComponent.bind(null, {
|
||||
servicesManager,
|
||||
extensionManager,
|
||||
}),
|
||||
},
|
||||
|
||||
{
|
||||
// The factory for creating an instance of a BaseDataSourceConfigurationAPI for Google Cloud Healthcare
|
||||
id: 'ohif.dataSourceConfigurationAPI.google',
|
||||
factory: (dataSourceName: string) =>
|
||||
new GoogleCloudDataSourceConfigurationAPI(
|
||||
dataSourceName,
|
||||
servicesManager,
|
||||
extensionManager
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -19,7 +19,6 @@ export default function getPTImageIdInstanceMetadata(
|
||||
if (
|
||||
dicomMetaData.SeriesDate === undefined ||
|
||||
dicomMetaData.SeriesTime === undefined ||
|
||||
dicomMetaData.PatientWeight === undefined ||
|
||||
dicomMetaData.CorrectedImage === undefined ||
|
||||
dicomMetaData.Units === undefined ||
|
||||
!dicomMetaData.RadiopharmaceuticalInformationSequence ||
|
||||
@@ -38,6 +37,10 @@ export default function getPTImageIdInstanceMetadata(
|
||||
throw new Error('required metadata are missing');
|
||||
}
|
||||
|
||||
if (dicomMetaData.PatientWeight === undefined) {
|
||||
console.warn('PatientWeight missing from PT instance metadata');
|
||||
}
|
||||
|
||||
const instanceMetadata: InstanceMetadata = {
|
||||
CorrectedImage: dicomMetaData.CorrectedImage,
|
||||
Units: dicomMetaData.Units,
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-dicom-microscopy",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "OHIF extension for DICOM microscopy",
|
||||
"author": "Bill Wallace, md-prog",
|
||||
"license": "MIT",
|
||||
@@ -28,10 +28,10 @@
|
||||
"start": "yarn run dev"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.7.0-beta.56",
|
||||
"@ohif/extension-default": "3.7.0-beta.56",
|
||||
"@ohif/i18n": "3.7.0-beta.56",
|
||||
"@ohif/ui": "3.7.0-beta.56",
|
||||
"@ohif/core": "3.7.0-beta.60",
|
||||
"@ohif/extension-default": "3.7.0-beta.60",
|
||||
"@ohif/i18n": "3.7.0-beta.60",
|
||||
"@ohif/ui": "3.7.0-beta.60",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-pdf
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-pdf
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-pdf
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-pdf
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-dicom-pdf",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "OHIF extension for PDF display",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -28,8 +28,8 @@
|
||||
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.7.0-beta.56",
|
||||
"@ohif/ui": "3.7.0-beta.56",
|
||||
"@ohif/core": "3.7.0-beta.60",
|
||||
"@ohif/ui": "3.7.0-beta.60",
|
||||
"dcmjs": "^0.29.5",
|
||||
"dicom-parser": "^1.8.9",
|
||||
"hammerjs": "^2.0.8",
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-video
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-video
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-video
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-video
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-dicom-video",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "OHIF extension for video display",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -28,8 +28,8 @@
|
||||
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.7.0-beta.56",
|
||||
"@ohif/ui": "3.7.0-beta.56",
|
||||
"@ohif/core": "3.7.0-beta.60",
|
||||
"@ohif/ui": "3.7.0-beta.60",
|
||||
"dcmjs": "^0.29.5",
|
||||
"dicom-parser": "^1.8.9",
|
||||
"hammerjs": "^2.0.8",
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-measurement-tracking
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-measurement-tracking
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **cloud data source config:** GUI and API for configuring a cloud data source with Google cloud healthcare implementation ([#3589](https://github.com/OHIF/Viewers/issues/3589)) ([a336992](https://github.com/OHIF/Viewers/commit/a336992971c07552c9dbb6e1de43169d37762ef1))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **memory leak:** array buffer was sticking around in volume viewports ([#3611](https://github.com/OHIF/Viewers/issues/3611)) ([65b49ae](https://github.com/OHIF/Viewers/commit/65b49aeb1b5f38224e4892bdf32453500ee351f8))
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-measurement-tracking",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "Tracking features and functionality for basic image viewing",
|
||||
"author": "OHIF Core Team",
|
||||
"license": "MIT",
|
||||
@@ -30,11 +30,11 @@
|
||||
"start": "yarn run dev"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@cornerstonejs/core": "^1.10.3",
|
||||
"@cornerstonejs/tools": "^1.10.3",
|
||||
"@ohif/core": "3.7.0-beta.56",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.56",
|
||||
"@ohif/ui": "3.7.0-beta.56",
|
||||
"@cornerstonejs/core": "^1.11.1",
|
||||
"@cornerstonejs/tools": "^1.11.1",
|
||||
"@ohif/core": "3.7.0-beta.60",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.60",
|
||||
"@ohif/ui": "3.7.0-beta.60",
|
||||
"classnames": "^2.3.2",
|
||||
"dcmjs": "^0.29.5",
|
||||
"lodash.debounce": "^4.17.21",
|
||||
@@ -46,7 +46,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@ohif/ui": "3.7.0-beta.56",
|
||||
"@ohif/ui": "3.7.0-beta.60",
|
||||
"@xstate/react": "^3.2.2",
|
||||
"xstate": "^4.10.0"
|
||||
}
|
||||
|
||||
@@ -384,7 +384,7 @@ function _getStatusComponent(isTracked) {
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<Icon name={trackedIcon} className="text-primary-light" />
|
||||
<Icon name={trackedIcon} className="text-aqua-pale" />
|
||||
</Tooltip>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-test
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-test
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-test
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-test
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-test",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "OHIF extension used inside e2e testing",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -28,8 +28,8 @@
|
||||
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.7.0-beta.56",
|
||||
"@ohif/ui": "3.7.0-beta.56",
|
||||
"@ohif/core": "3.7.0-beta.60",
|
||||
"@ohif/ui": "3.7.0-beta.60",
|
||||
"dcmjs": "0.29.4",
|
||||
"dicom-parser": "^1.8.9",
|
||||
"hammerjs": "^2.0.8",
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-tmtv
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-tmtv
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-tmtv
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-tmtv
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-tmtv",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "OHIF extension for Total Metabolic Tumor Volume",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -28,8 +28,8 @@
|
||||
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.7.0-beta.56",
|
||||
"@ohif/ui": "3.7.0-beta.56",
|
||||
"@ohif/core": "3.7.0-beta.60",
|
||||
"@ohif/ui": "3.7.0-beta.60",
|
||||
"dcmjs": "^0.29.5",
|
||||
"dicom-parser": "^1.8.9",
|
||||
"hammerjs": "^2.0.8",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"packages": ["extensions/*", "platform/*", "modes/*"],
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/mode-basic-dev-mode",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "Basic OHIF Viewer Using Cornerstone",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -29,12 +29,12 @@
|
||||
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.7.0-beta.56",
|
||||
"@ohif/extension-cornerstone": "3.7.0-beta.56",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.56",
|
||||
"@ohif/extension-default": "3.7.0-beta.56",
|
||||
"@ohif/extension-dicom-pdf": "3.7.0-beta.56",
|
||||
"@ohif/extension-dicom-video": "3.7.0-beta.56"
|
||||
"@ohif/core": "3.7.0-beta.60",
|
||||
"@ohif/extension-cornerstone": "3.7.0-beta.60",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.60",
|
||||
"@ohif/extension-default": "3.7.0-beta.60",
|
||||
"@ohif/extension-dicom-pdf": "3.7.0-beta.60",
|
||||
"@ohif/extension-dicom-video": "3.7.0-beta.60"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13"
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-test
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-test
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-test
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-test
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/mode-test",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "Basic mode for testing",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -32,14 +32,14 @@
|
||||
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.7.0-beta.56",
|
||||
"@ohif/extension-cornerstone": "3.7.0-beta.56",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.56",
|
||||
"@ohif/extension-default": "3.7.0-beta.56",
|
||||
"@ohif/extension-dicom-pdf": "3.7.0-beta.56",
|
||||
"@ohif/extension-dicom-video": "3.7.0-beta.56",
|
||||
"@ohif/extension-measurement-tracking": "3.7.0-beta.56",
|
||||
"@ohif/extension-test": "3.7.0-beta.56"
|
||||
"@ohif/core": "3.7.0-beta.60",
|
||||
"@ohif/extension-cornerstone": "3.7.0-beta.60",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.60",
|
||||
"@ohif/extension-default": "3.7.0-beta.60",
|
||||
"@ohif/extension-dicom-pdf": "3.7.0-beta.60",
|
||||
"@ohif/extension-dicom-video": "3.7.0-beta.60",
|
||||
"@ohif/extension-measurement-tracking": "3.7.0-beta.60",
|
||||
"@ohif/extension-test": "3.7.0-beta.60"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13"
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-longitudinal
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-longitudinal
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-longitudinal
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-longitudinal
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/mode-longitudinal",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "Longitudinal Workflow",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -32,15 +32,15 @@
|
||||
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.7.0-beta.56",
|
||||
"@ohif/extension-cornerstone": "3.7.0-beta.56",
|
||||
"@ohif/extension-cornerstone-dicom-rt": "3.7.0-beta.56",
|
||||
"@ohif/extension-cornerstone-dicom-seg": "3.7.0-beta.56",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.56",
|
||||
"@ohif/extension-default": "3.7.0-beta.56",
|
||||
"@ohif/extension-dicom-pdf": "3.7.0-beta.56",
|
||||
"@ohif/extension-dicom-video": "3.7.0-beta.56",
|
||||
"@ohif/extension-measurement-tracking": "3.7.0-beta.56"
|
||||
"@ohif/core": "3.7.0-beta.60",
|
||||
"@ohif/extension-cornerstone": "3.7.0-beta.60",
|
||||
"@ohif/extension-cornerstone-dicom-rt": "3.7.0-beta.60",
|
||||
"@ohif/extension-cornerstone-dicom-seg": "3.7.0-beta.60",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.60",
|
||||
"@ohif/extension-default": "3.7.0-beta.60",
|
||||
"@ohif/extension-dicom-pdf": "3.7.0-beta.60",
|
||||
"@ohif/extension-dicom-video": "3.7.0-beta.60",
|
||||
"@ohif/extension-measurement-tracking": "3.7.0-beta.60"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13"
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-microscopy
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-microscopy
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-microscopy
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-microscopy
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/mode-microscopy",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "OHIF mode for DICOM microscopy",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -33,8 +33,8 @@
|
||||
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.7.0-beta.56",
|
||||
"@ohif/extension-dicom-microscopy": "3.7.0-beta.56"
|
||||
"@ohif/core": "3.7.0-beta.60",
|
||||
"@ohif/extension-dicom-microscopy": "3.7.0-beta.60"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13"
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-tmtv
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-tmtv
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-tmtv
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-tmtv
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/mode-tmtv",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "Total Metabolic Tumor Volume Workflow",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -32,13 +32,13 @@
|
||||
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.7.0-beta.56",
|
||||
"@ohif/extension-cornerstone": "3.7.0-beta.56",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.56",
|
||||
"@ohif/extension-default": "3.7.0-beta.56",
|
||||
"@ohif/extension-dicom-pdf": "3.7.0-beta.56",
|
||||
"@ohif/extension-dicom-video": "3.7.0-beta.56",
|
||||
"@ohif/extension-measurement-tracking": "3.7.0-beta.56"
|
||||
"@ohif/core": "3.7.0-beta.60",
|
||||
"@ohif/extension-cornerstone": "3.7.0-beta.60",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.60",
|
||||
"@ohif/extension-default": "3.7.0-beta.60",
|
||||
"@ohif/extension-dicom-pdf": "3.7.0-beta.60",
|
||||
"@ohif/extension-dicom-video": "3.7.0-beta.60",
|
||||
"@ohif/extension-measurement-tracking": "3.7.0-beta.60"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13"
|
||||
|
||||
@@ -3,6 +3,44 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/app
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/app
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **cloud data source config:** GUI and API for configuring a cloud data source with Google cloud healthcare implementation ([#3589](https://github.com/OHIF/Viewers/issues/3589)) ([a336992](https://github.com/OHIF/Viewers/commit/a336992971c07552c9dbb6e1de43169d37762ef1))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **memory leak:** array buffer was sticking around in volume viewports ([#3611](https://github.com/OHIF/Viewers/issues/3611)) ([65b49ae](https://github.com/OHIF/Viewers/commit/65b49aeb1b5f38224e4892bdf32453500ee351f8))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [4.0.0](https://github.com/OHIF/Viewers/compare/@ohif/viewer@3.11.11...@ohif/viewer@4.0.0) (2020-05-14)
|
||||
|
||||
|
||||
|
||||
+18
-18
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/app",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"productVersion": "3.4.0",
|
||||
"description": "OHIF Viewer",
|
||||
"author": "OHIF Contributors",
|
||||
@@ -50,23 +50,23 @@
|
||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjph": "^2.4.2",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.10.3",
|
||||
"@ohif/core": "3.7.0-beta.56",
|
||||
"@ohif/extension-cornerstone": "3.7.0-beta.56",
|
||||
"@ohif/extension-cornerstone-dicom-rt": "3.7.0-beta.56",
|
||||
"@ohif/extension-cornerstone-dicom-seg": "3.7.0-beta.56",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.56",
|
||||
"@ohif/extension-default": "3.7.0-beta.56",
|
||||
"@ohif/extension-dicom-microscopy": "3.7.0-beta.56",
|
||||
"@ohif/extension-dicom-pdf": "3.7.0-beta.56",
|
||||
"@ohif/extension-dicom-video": "3.7.0-beta.56",
|
||||
"@ohif/extension-test": "3.7.0-beta.56",
|
||||
"@ohif/i18n": "3.7.0-beta.56",
|
||||
"@ohif/mode-basic-dev-mode": "3.7.0-beta.56",
|
||||
"@ohif/mode-longitudinal": "3.7.0-beta.56",
|
||||
"@ohif/mode-microscopy": "3.7.0-beta.56",
|
||||
"@ohif/mode-test": "3.7.0-beta.56",
|
||||
"@ohif/ui": "3.7.0-beta.56",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.11.1",
|
||||
"@ohif/core": "3.7.0-beta.60",
|
||||
"@ohif/extension-cornerstone": "3.7.0-beta.60",
|
||||
"@ohif/extension-cornerstone-dicom-rt": "3.7.0-beta.60",
|
||||
"@ohif/extension-cornerstone-dicom-seg": "3.7.0-beta.60",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.60",
|
||||
"@ohif/extension-default": "3.7.0-beta.60",
|
||||
"@ohif/extension-dicom-microscopy": "3.7.0-beta.60",
|
||||
"@ohif/extension-dicom-pdf": "3.7.0-beta.60",
|
||||
"@ohif/extension-dicom-video": "3.7.0-beta.60",
|
||||
"@ohif/extension-test": "3.7.0-beta.60",
|
||||
"@ohif/i18n": "3.7.0-beta.60",
|
||||
"@ohif/mode-basic-dev-mode": "3.7.0-beta.60",
|
||||
"@ohif/mode-longitudinal": "3.7.0-beta.60",
|
||||
"@ohif/mode-microscopy": "3.7.0-beta.60",
|
||||
"@ohif/mode-test": "3.7.0-beta.60",
|
||||
"@ohif/ui": "3.7.0-beta.60",
|
||||
"@types/react": "^17.0.38",
|
||||
"classnames": "^2.3.2",
|
||||
"core-js": "^3.16.1",
|
||||
|
||||
@@ -55,6 +55,7 @@ window.config = {
|
||||
supportsWildcard: false,
|
||||
dicomUploadEnabled: true,
|
||||
omitQuotationForMultipartRequest: true,
|
||||
configurationAPI: 'ohif.dataSourceConfigurationAPI.google',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -485,6 +485,9 @@ function WorkList({
|
||||
}
|
||||
: undefined;
|
||||
|
||||
const { component: dataSourceConfigurationComponent } =
|
||||
customizationService.get('ohif.dataSourceConfigurationComponent') ?? {};
|
||||
|
||||
return (
|
||||
<div className="bg-black h-screen flex flex-col ">
|
||||
<Header
|
||||
@@ -502,6 +505,11 @@ function WorkList({
|
||||
clearFilters={() => setFilterValues(defaultFilterValues)}
|
||||
isFiltering={isFiltering(filterValues, defaultFilterValues)}
|
||||
onUploadClick={uploadProps ? () => show(uploadProps) : undefined}
|
||||
getDataSourceConfigurationComponent={
|
||||
dataSourceConfigurationComponent
|
||||
? () => dataSourceConfigurationComponent()
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
{hasStudies ? (
|
||||
<div className="grow flex flex-col">
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/cli
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/cli
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/cli
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
**Note:** Version bump only for package @ohif/cli
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/cli",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "A CLI to bootstrap new OHIF extension or mode",
|
||||
"type": "module",
|
||||
"main": "src/index.js",
|
||||
|
||||
@@ -3,6 +3,44 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **cloud data source config:** GUI and API for configuring a cloud data source with Google cloud healthcare implementation ([#3589](https://github.com/OHIF/Viewers/issues/3589)) ([a336992](https://github.com/OHIF/Viewers/commit/a336992971c07552c9dbb6e1de43169d37762ef1))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **memory leak:** array buffer was sticking around in volume viewports ([#3611](https://github.com/OHIF/Viewers/issues/3611)) ([65b49ae](https://github.com/OHIF/Viewers/commit/65b49aeb1b5f38224e4892bdf32453500ee351f8))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.9.6](https://github.com/OHIF/Viewers/compare/@ohif/core@2.9.5...@ohif/core@2.9.6) (2020-05-14)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/core",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "Generic business logic for web-based medical imaging applications",
|
||||
"author": "OHIF Core Team",
|
||||
"license": "MIT",
|
||||
@@ -35,8 +35,8 @@
|
||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjph": "^2.4.2",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.10.3",
|
||||
"@ohif/ui": "3.7.0-beta.56",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.11.1",
|
||||
"@ohif/ui": "3.7.0-beta.60",
|
||||
"cornerstone-math": "0.1.9",
|
||||
"dicom-parser": "^1.8.21"
|
||||
},
|
||||
|
||||
@@ -354,7 +354,7 @@ export default class ExtensionManager extends PubSubService {
|
||||
* @param dataSourceName the data source name
|
||||
* @returns the data source definition
|
||||
*/
|
||||
getDataSourceDef = dataSourceName => {
|
||||
getDataSourceDefinition = dataSourceName => {
|
||||
if (dataSourceName === undefined) {
|
||||
// Default to the activeDataSource
|
||||
dataSourceName = this.activeDataSource;
|
||||
@@ -363,6 +363,13 @@ export default class ExtensionManager extends PubSubService {
|
||||
return this.dataSourceDefs[dataSourceName];
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the data source definition for the active data source.
|
||||
*/
|
||||
getActiveDataSourceDefinition = () => {
|
||||
return this.getDataSourceDefinition(this.activeDataSource);
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {string} moduleType
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
export interface BaseDataSourceConfigurationAPIItem {
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* The interface to use to configure an associated data source. Typically an
|
||||
* instance of this interface is associated with a data source that the instance
|
||||
* understands and can alter the data source's configuration.
|
||||
*/
|
||||
export interface BaseDataSourceConfigurationAPI {
|
||||
/**
|
||||
* Gets the i18n labels (i.e. the i18n lookup keys) for each of the configurable items
|
||||
* of the data source configuration API.
|
||||
* For example, for the Google Cloud Healthcare API, this would be
|
||||
* ['Project', 'Location', 'Data set', 'DICOM store'].
|
||||
* Besides the configurable item labels themselves, several other string look ups
|
||||
* are used base on EACH of the labels returned by this method.
|
||||
* For instance, for the label {itemLabel}, the following strings are fetched for
|
||||
* translation...
|
||||
* 1. `No {itemLabel} available`
|
||||
* - used to indicate no such items are available
|
||||
* - for example, for Google, `No Project available` would be 'No projects available'
|
||||
* 2. `Select {itemLabel}`
|
||||
* - used to direct selection of the item
|
||||
* - for example, for Google, `Select Project` would be 'Select a project'
|
||||
* 3. `Error fetching {itemLabel} list`
|
||||
* - used to indicate an error occurred fetching the list of items
|
||||
* - usually accompanied by the error itself
|
||||
* - for example, for Google, `Error fetching Project list` would be 'Error fetching projects'
|
||||
* 4. `Search {itemLabel} list`
|
||||
* - used as the placeholder text for filtering a list of items
|
||||
* - for example, for Google, `Search Project list` would be 'Search projects'
|
||||
*/
|
||||
getItemLabels(): Array<string>;
|
||||
|
||||
/**
|
||||
* Initializes the data source configuration API and returns the top-level sub-items
|
||||
* that can be chosen to begin the process of configuring the data source.
|
||||
* For example, for the Google Cloud Healthcare API, this would perform the initial request
|
||||
* to fetch the top level projects for the logged in user account.
|
||||
*/
|
||||
initialize(): Promise<Array<BaseDataSourceConfigurationAPIItem>>;
|
||||
|
||||
/**
|
||||
* Sets the current path item and returns the sub-items of that item
|
||||
* that can be further chosen to configure a data source.
|
||||
* When setting the last configurable item of the data source (path), this method
|
||||
* returns an empty list AND configures the active data source with the selected
|
||||
* items path.
|
||||
* For example, for the Google Cloud Healthcare API, this would take the current item
|
||||
* (say a data set) and queries and returns its sub-items (i.e. all of the DICOM stores
|
||||
* contained in that data set). Furthermore, whenever the item to set is a DICOM store,
|
||||
* the Google Cloud Healthcare API implementation would update the OHIF data source
|
||||
* associated with this instance to point to that DICOM store.
|
||||
* @param item the item to set as current
|
||||
*/
|
||||
setCurrentItem(
|
||||
item: BaseDataSourceConfigurationAPIItem
|
||||
): Promise<Array<BaseDataSourceConfigurationAPIItem>>;
|
||||
|
||||
/**
|
||||
* Gets the list of items currently configured for the data source associated with
|
||||
* this API instance. The resultant array must be the same length as the result of
|
||||
* `getItemLabels`.
|
||||
*/
|
||||
getConfiguredItems(): Promise<Array<BaseDataSourceConfigurationAPIItem>>;
|
||||
}
|
||||
@@ -3,6 +3,10 @@ import * as HangingProtocol from './HangingProtocol';
|
||||
import Services from './Services';
|
||||
import Hotkey from '../classes/Hotkey';
|
||||
import { DataSourceDefinition } from './DataSource';
|
||||
import {
|
||||
BaseDataSourceConfigurationAPI,
|
||||
BaseDataSourceConfigurationAPIItem,
|
||||
} from './DataSourceConfigurationAPI';
|
||||
|
||||
export * from '../services/CustomizationService/types';
|
||||
// Separate out some generic types
|
||||
@@ -19,4 +23,12 @@ export * from './Color';
|
||||
* Export the types used within the various services and managers, but
|
||||
* not the services/managers themselves, which are exported at the top level.
|
||||
*/
|
||||
export { Extensions, HangingProtocol, Services, Hotkey, DataSourceDefinition };
|
||||
export {
|
||||
Extensions,
|
||||
HangingProtocol,
|
||||
Services,
|
||||
Hotkey,
|
||||
DataSourceDefinition,
|
||||
BaseDataSourceConfigurationAPI,
|
||||
BaseDataSourceConfigurationAPIItem,
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package ohif-docs
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package ohif-docs
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **cloud data source config:** GUI and API for configuring a cloud data source with Google cloud healthcare implementation ([#3589](https://github.com/OHIF/Viewers/issues/3589)) ([a336992](https://github.com/OHIF/Viewers/commit/a336992971c07552c9dbb6e1de43169d37762ef1))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
**Note:** Version bump only for package ohif-docs
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
@@ -0,0 +1,172 @@
|
||||
---
|
||||
sidebar_position: 6
|
||||
sidebar_label: Configuration UI
|
||||
---
|
||||
|
||||
# Configuration UI
|
||||
|
||||
OHIF provides for a generic mechanism for configuring a data source. This is
|
||||
most useful for those organizations with several data sources
|
||||
that share common (path) hierarchies. For example, an organization may have several DICOM stores
|
||||
in the Google Cloud Healthcare realm where each is organized into various projects,
|
||||
location, data sets and DICOM stores.
|
||||
|
||||
By implementing the `BaseDataSourceConfigurationAPI` and
|
||||
`BaseDataSourceConfigurationAPIItem` in an [OHIF extension](../../platform/extensions/index.md), a data source can
|
||||
be made configurable via the generic UI as is depicted below for a
|
||||
Google Cloud Healthcare data source.
|
||||
|
||||

|
||||
|
||||
## `BaseDataSourceConfigurationAPIItem` interface
|
||||
|
||||
Each (path) item of a data source is represented by an instance of this interface.
|
||||
At the very least each of these items must expose two properties:
|
||||
|
||||
|Property |Description|
|
||||
|---------|-----------|
|
||||
|id|a string that uniquely identifies the item|
|
||||
|name|a human readable name for the item|
|
||||
|
||||
Note that information such as where in the path hierarchy the item exists
|
||||
has been omitted, but can be added in any concrete class that might implement this
|
||||
interface. For example, the the Google Cloud Healthcare implementation of this
|
||||
interface (`GoogleCloudDataSourceConfigurationAPIItem`) adds an `itemType`
|
||||
(i.e. projects, locations, datasets, or dicomStores) and `url`.
|
||||
|
||||
## `BaseDataSourceConfigurationAPI` interface
|
||||
|
||||
The implementation of this interface is at the heart of the configuration process.
|
||||
It possesses several methods for building up a data source path based on various
|
||||
`BaseDataSourceConfigurationAPIItem` objects that are set via calls to the `setCurrentItem`
|
||||
method.
|
||||
|
||||
The constructor for the concrete class implementation should accept whatever
|
||||
parameters are necessary for configuring the data source. One argument
|
||||
to the constructor must be the string identifying the name of the data source
|
||||
to be configured. Furthermore, considering that the `ExtensionManager` possesses
|
||||
API to configure and update data sources, it too will likely be an argument to
|
||||
the constructor. See [Creation via Customization Module](#creation-via-customization-module)
|
||||
for more information on how the constructor is invoked via a factory method.
|
||||
|
||||
For an example implementation of this interface see `GoogleCloudDataSourceConfigurationAPI`.
|
||||
|
||||
### Interface Methods
|
||||
|
||||
Each of the following subsections lists a method of the interface with a description
|
||||
detailing what the method should do.
|
||||
|
||||
#### `getItemLabels`
|
||||
|
||||
Gets the i18n labels (i.e. the i18n lookup keys) for each of the configurable items
|
||||
of the data source configuration API. For example, for the Google Cloud Healthcare
|
||||
API, this would be `['Project', 'Location', 'Data set', 'DICOM store']`.
|
||||
|
||||
Besides the configurable item labels themselves, several other string look ups
|
||||
are used base on EACH of the labels returned by this method.
|
||||
For instance, for the label `{itemLabel}``, the following strings are fetched for
|
||||
translation...
|
||||
1. `No {itemLabel} available`
|
||||
- used to indicate no such items are available
|
||||
- for example, for Google, `No Project available` would be 'No projects available'
|
||||
2. `Select {itemLabel}`
|
||||
- used to direct selection of the item
|
||||
- for example, for Google, `Select Project` would be 'Select a project'
|
||||
3. `Error fetching {itemLabel} list`
|
||||
- used to indicate an error occurred fetching the list of items
|
||||
- usually accompanied by the error itself
|
||||
- for example, for Google, `Error fetching Project list` would be 'Error fetching projects'
|
||||
4. `Search {itemLabel} list`
|
||||
- used as the placeholder text for filtering a list of items
|
||||
- for example, for Google, `Search Project list` would be 'Search projects'
|
||||
|
||||
#### `initialize`
|
||||
|
||||
Initializes the cloud server API and returns the top-level sub-items
|
||||
that can be chosen to begin the process of configuring a data source.
|
||||
For example, for the Google Cloud Healthcare API, this would perform the initial request
|
||||
to fetch the top level projects for the logged in user account.
|
||||
|
||||
#### `setCurrentItem`
|
||||
|
||||
Sets the current path item that is passed as an argument to the method and
|
||||
returns the sub-items of that item
|
||||
that can be further chosen to configure a data source.
|
||||
When setting the last configurable item of the data source (path), this method
|
||||
returns an empty list AND configures the active data source with the selected
|
||||
items path.
|
||||
|
||||
For example, for the Google Cloud Healthcare API, this would take the current item
|
||||
(say a data set) and queries and returns its sub-items (i.e. all of the DICOM stores
|
||||
contained in that data set). Furthermore, whenever the item to set is a DICOM store,
|
||||
the Google Cloud Healthcare API implementation would update the OHIF data source
|
||||
associated with this instance to point to that DICOM store.
|
||||
|
||||
#### `getConfiguredItems`
|
||||
|
||||
Gets the list of items currently configured for the data source associated with
|
||||
this API instance. The resultant array must be the same length as the result of
|
||||
`getItemLabels`. Furthermore the items returned should correspond (index-wise)
|
||||
with the labels returned from `getItemLabels`.
|
||||
|
||||
## Creation via Customization Module
|
||||
|
||||
The generic UI (i.e. `DataSourceConfigurationComponent`) uses the
|
||||
[OHIF UI customization service](../../platform/services/ui/customization-service.md) to
|
||||
instantiate the `BaseDataSourceConfigurationAPI` instance to configure a data source.
|
||||
|
||||
A UI configurable data source should have a `configurationAPI` field as part of
|
||||
its `configuration` in the OHIF config file. The `configurationAPI` value is the
|
||||
customization id of the customization module that provides the factory method
|
||||
to instantiate the `BaseDataSourceConfigurationAPI` instance.
|
||||
|
||||
For example, the following is a snippet of a Google Cloud Healthcare data source configuration.
|
||||
|
||||
```js
|
||||
dataSources: [
|
||||
{
|
||||
namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
|
||||
sourceName: 'google-dicomweb',
|
||||
configuration: {
|
||||
name: 'GCP',
|
||||
wadoUriRoot: 'https://healthcare.googleapis.com/v1/projects/ohif-cloud-healthcare/locations/us-east4/...',
|
||||
...
|
||||
configurationAPI: 'ohif.dataSourceConfigurationAPI.google',
|
||||
...
|
||||
},
|
||||
},
|
||||
]
|
||||
```
|
||||
|
||||
This suggests that the factory method is provided by the `'ohif.dataSourceConfigurationAPI.google'`
|
||||
customization module. That customization module is provided by the `default` extension's
|
||||
`getCustomizationModule` and looks something like the following snippet of code. Notice that
|
||||
the factory method's name MUST be `factory` and accept one argument - the data source name.
|
||||
Furthermore note how the constructor is invoked with anything required by the concrete configuration
|
||||
API class.
|
||||
|
||||
```js
|
||||
export default function getCustomizationModule({
|
||||
servicesManager,
|
||||
extensionManager,
|
||||
}) {
|
||||
return [
|
||||
{
|
||||
name: 'default',
|
||||
value: [
|
||||
{
|
||||
// The factory for creating an instance of a BaseDataSourceConfigurationAPI for Google Cloud Healthcare
|
||||
id: 'ohif.dataSourceConfigurationAPI.google',
|
||||
factory: (dataSourceName: string) =>
|
||||
new GoogleCloudDataSourceConfigurationAPI(
|
||||
dataSourceName,
|
||||
servicesManager,
|
||||
extensionManager
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
```
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
sidebar_position: 5
|
||||
sidebar_label: Static Files
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ohif-docs",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"private": true,
|
||||
"workspaces": {
|
||||
"nohoist": [
|
||||
|
||||
@@ -3,6 +3,41 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/i18n
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/i18n
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **cloud data source config:** GUI and API for configuring a cloud data source with Google cloud healthcare implementation ([#3589](https://github.com/OHIF/Viewers/issues/3589)) ([a336992](https://github.com/OHIF/Viewers/commit/a336992971c07552c9dbb6e1de43169d37762ef1))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
**Note:** Version bump only for package @ohif/i18n
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.52.8](https://github.com/OHIF/Viewers/compare/@ohif/i18n@0.52.7...@ohif/i18n@0.52.8) (2020-04-07)
|
||||
|
||||
**Note:** Version bump only for package @ohif/i18n
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/i18n",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "Internationalization library for The OHIF Viewer",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"Configure Data Source":"Configure Data Source",
|
||||
"Data set": "Data set",
|
||||
"DICOM store": "DICOM store",
|
||||
"Location": "Location",
|
||||
"Project": "Project",
|
||||
"Error fetching Data set list": "Error fetching data sets",
|
||||
"Error fetching DICOM store list": "Error fetching DICOM stores",
|
||||
"Error fetching Location list": "Error fetching locations",
|
||||
"Error fetching Project list": "Error fetching projects",
|
||||
"No Project available": "No projects available",
|
||||
"No Location available": "No locations available",
|
||||
"No Data set available": "No data sets available",
|
||||
"No DICOM store available": "No DICOM stores available",
|
||||
"Select": "Select",
|
||||
"Search Data set list": "Search data sets",
|
||||
"Search DICOM store list": "Search DICOM stores",
|
||||
"Search Location list": "Search locations",
|
||||
"Search Project list": "Search projects",
|
||||
"Select Data set": "Select a data Set",
|
||||
"Select DICOM store": "Select a DICOM store",
|
||||
"Select Location": "Select a location",
|
||||
"Select Project": "Select a project"
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import AboutModal from './AboutModal.json';
|
||||
import Buttons from './Buttons.json';
|
||||
import CineDialog from './CineDialog.json';
|
||||
import Common from './Common.json';
|
||||
import DataSourceConfiguration from './DataSourceConfiguration.json';
|
||||
import DatePicker from './DatePicker.json';
|
||||
import Header from './Header.json';
|
||||
import MeasurementTable from './MeasurementTable.json';
|
||||
@@ -18,6 +19,7 @@ export default {
|
||||
Buttons,
|
||||
CineDialog,
|
||||
Common,
|
||||
DataSourceConfiguration,
|
||||
DatePicker,
|
||||
Header,
|
||||
MeasurementTable,
|
||||
|
||||
@@ -3,6 +3,41 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.7.0-beta.60](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.59...v3.7.0-beta.60) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/ui
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.59](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.58...v3.7.0-beta.59) (2023-08-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/ui
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.58](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.57...v3.7.0-beta.58) (2023-08-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **cloud data source config:** GUI and API for configuring a cloud data source with Google cloud healthcare implementation ([#3589](https://github.com/OHIF/Viewers/issues/3589)) ([a336992](https://github.com/OHIF/Viewers/commit/a336992971c07552c9dbb6e1de43169d37762ef1))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.7.0-beta.57](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.56...v3.7.0-beta.57) (2023-08-23)
|
||||
|
||||
**Note:** Version bump only for package @ohif/ui
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.4.4](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.4.3...@ohif/ui@1.4.4) (2020-05-04)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/ui",
|
||||
"version": "3.7.0-beta.56",
|
||||
"version": "3.7.0-beta.60",
|
||||
"description": "A set of React components for Medical Imaging Viewers",
|
||||
"author": "OHIF Contributors",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<path d="M0 0h16v16H0z"/>
|
||||
<rect stroke="#7BB2CE" fill="#0D0E24" x=".5" y=".5" width="15" height="15" rx="7.5"/>
|
||||
<rect stroke="currentColor" fill="#0D0E24" x=".5" y=".5" width="15" height="15" rx="7.5"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 268 B After Width: | Height: | Size: 273 B |
@@ -1,4 +1,4 @@
|
||||
import Button, {ButtonType, ButtonSize} from '../Button';
|
||||
import {Button, ButtonEnums} from '../../../components';
|
||||
import { ArgsTable, Story, Canvas, Meta } from '@storybook/addon-docs';
|
||||
import {
|
||||
createComponentTemplate,
|
||||
@@ -45,8 +45,8 @@ There can be different types of buttons: `primary`, and `secondary`.
|
||||
<Canvas>
|
||||
<Story name="Types">
|
||||
<div className="flex space-x-2">
|
||||
<Button type={ButtonType.primary}>Primary Button</Button>
|
||||
<Button type={ButtonType.secondary}>Secondary Button</Button>
|
||||
<Button type={ButtonEnums.type.primary}>Primary Button</Button>
|
||||
<Button type={ButtonEnums.type.secondary}>Secondary Button</Button>
|
||||
</div>
|
||||
</Story>
|
||||
</Canvas>
|
||||
@@ -59,8 +59,8 @@ to the button's height.
|
||||
<Canvas>
|
||||
<Story name="Colors">
|
||||
<div className="flex items-center space-x-2">
|
||||
<Button size={ButtonSize.small}>Small Button</Button>
|
||||
<Button size={ButtonSize.medium}>Medium Button</Button>
|
||||
<Button size={ButtonEnums.size.small}>Small Button</Button>
|
||||
<Button size={ButtonEnums.size.medium}>Medium Button</Button>
|
||||
</div>
|
||||
</Story>
|
||||
</Canvas>
|
||||
@@ -71,7 +71,7 @@ You can mix different props together to create a button.
|
||||
|
||||
<Canvas>
|
||||
<Story name="Custom">
|
||||
<Button type={ButtonType.secondary} size={ButtonSize.small}>
|
||||
<Button type={ButtonEnums.type.secondary} size={ButtonEnums.size.small}>
|
||||
Small, Secondary Button
|
||||
</Button>
|
||||
</Story>
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
import classNames from 'classnames';
|
||||
import debounce from 'lodash.debounce';
|
||||
import React, {
|
||||
ReactElement,
|
||||
useCallback,
|
||||
useEffect,
|
||||
useMemo,
|
||||
useRef,
|
||||
useState,
|
||||
} from 'react';
|
||||
|
||||
import Icon from '../Icon';
|
||||
|
||||
type InputFilterTextProps = {
|
||||
className?: string;
|
||||
value?: string;
|
||||
placeholder: string;
|
||||
onDebounceChange?: (val: string) => void;
|
||||
onChange?: (val: string) => void;
|
||||
debounceTime?: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* A component to use as the input for text to filter by/on. A debounced callback is automatically provided
|
||||
* so that the filtering in-turn will be debounced. There is also a straight onChange callback when the filter value is
|
||||
* required immediately and NOT debounced. The debounce time is also configurable.
|
||||
*/
|
||||
const InputFilterText = ({
|
||||
className,
|
||||
value = '',
|
||||
placeholder,
|
||||
onDebounceChange,
|
||||
onChange,
|
||||
debounceTime = 200,
|
||||
}: InputFilterTextProps): ReactElement => {
|
||||
const [filterValue, setFilterValue] = useState<string>(value);
|
||||
|
||||
const searchInputRef = useRef(null);
|
||||
|
||||
const debouncedOnChange = useMemo(() => {
|
||||
return debounce(onDebounceChange || (() => {}), debounceTime);
|
||||
}, []);
|
||||
|
||||
// This allows for the filter value to be updated via the props.
|
||||
useEffect(() => setFilterValue(value), [value]);
|
||||
|
||||
useEffect(() => {
|
||||
return debouncedOnChange?.cancel();
|
||||
}, []);
|
||||
|
||||
const handleFilterTextChanged = useCallback(value => {
|
||||
setFilterValue(value);
|
||||
|
||||
if (onChange) {
|
||||
onChange(value);
|
||||
}
|
||||
|
||||
if (onDebounceChange) {
|
||||
debouncedOnChange(value);
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<label className={classNames('relative', className)}>
|
||||
<span className="absolute inset-y-0 left-0 flex items-center pl-2">
|
||||
<Icon name="icon-search"></Icon>
|
||||
</span>
|
||||
<input
|
||||
ref={searchInputRef}
|
||||
type="text"
|
||||
className="block bg-black w-full shadow transition duration-300 appearance-none border border-inputfield-main focus:border-inputfield-focus focus:outline-none disabled:border-inputfield-disabled rounded-md w-full py-2 px-9 text-base leading-tight placeholder:text-inputfield-placeholder"
|
||||
placeholder={placeholder}
|
||||
onChange={event => handleFilterTextChanged(event.target.value)}
|
||||
autoComplete="off"
|
||||
value={filterValue}
|
||||
></input>
|
||||
<span className="absolute inset-y-0 right-0 flex items-center pr-2">
|
||||
<Icon
|
||||
name="icon-clear-field"
|
||||
className={classNames('cursor-pointer', filterValue ? '' : 'hidden')}
|
||||
onClick={() => {
|
||||
searchInputRef.current.value = '';
|
||||
handleFilterTextChanged('');
|
||||
}}
|
||||
></Icon>
|
||||
</span>
|
||||
</label>
|
||||
);
|
||||
};
|
||||
|
||||
export default InputFilterText;
|
||||
@@ -0,0 +1,54 @@
|
||||
import InputFilterText from '../InputFilterText';
|
||||
import { ArgsTable, Story, Canvas, Meta } from '@storybook/addon-docs';
|
||||
|
||||
export const argTypes = {
|
||||
component: InputFilterText,
|
||||
title: 'Components/InputFilterText',
|
||||
};
|
||||
|
||||
<Meta title="Components/InputFilterText" component={InputFilterText} />
|
||||
|
||||
export const InputFilterTextTemplate = args => (
|
||||
<div className="w-80">
|
||||
<InputFilterText {...args} />
|
||||
</div>
|
||||
)
|
||||
|
||||
<Heading title="InputFilterText" componentRelativePath="InputFilterText/InputFilterText.tsx" />
|
||||
|
||||
- [Overview](#overview)
|
||||
- [Props](#props)
|
||||
- [Contribute](#contribute)
|
||||
|
||||
## Overview
|
||||
|
||||
InputFilterText is a component that is styled such that it can be used as a text input to
|
||||
filter a list of textual items. It allows you to enter any text. There are two (optional)
|
||||
callbacks that can be invoked as the characters of the text are entered: one
|
||||
callback is invoked as each character is typed and another is debounced so that
|
||||
any filtering can occur once the user has entered a significant amount of info and
|
||||
pausing by a configurable amount of time in milliseconds. The component also
|
||||
provides a button on the far right of the component that when clicked will clear the input
|
||||
text. The button only appears when there is text in the component.
|
||||
|
||||
<Canvas>
|
||||
<Story
|
||||
name="Overview"
|
||||
args={{
|
||||
className: "w-full text-white",
|
||||
placeholder: "Search for...",
|
||||
onChange: () => console.log('input text changed'),
|
||||
onDebounceChange: () => console.log('debounce text changed'),
|
||||
}}
|
||||
>
|
||||
{InputFilterTextTemplate.bind({})}
|
||||
</Story>
|
||||
</Canvas>
|
||||
|
||||
## Props
|
||||
|
||||
<ArgsTable of={InputFilterText} />
|
||||
|
||||
## Contribute
|
||||
|
||||
<Footer componentRelativePath="InputFilterText/__stories__/InputFilterText.stories.mdx" />
|
||||
@@ -0,0 +1,2 @@
|
||||
import InputFilterText from './InputFilterText';
|
||||
export default InputFilterText;
|
||||
@@ -15,6 +15,7 @@ const StudyListFilter = ({
|
||||
isFiltering,
|
||||
numOfStudies,
|
||||
onUploadClick,
|
||||
getDataSourceConfigurationComponent,
|
||||
}) => {
|
||||
const { t } = useTranslation('StudyList');
|
||||
const { sortBy, sortDirection } = filterValues;
|
||||
@@ -30,13 +31,15 @@ const StudyListFilter = ({
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div>
|
||||
<div className="bg-primary-dark">
|
||||
<div className="container relative flex flex-col pt-5 m-auto">
|
||||
<div className="flex flex-row justify-between px-12 mb-5">
|
||||
<div className="flex flex-row">
|
||||
<Typography variant="h4" className="mr-6 text-primary-light">
|
||||
<div className="bg-black">
|
||||
<div className="container relative flex flex-col pt-5 mx-auto">
|
||||
<div className="flex flex-row justify-between mb-5">
|
||||
<div className="flex flex-row items-center gap-6 shrink min-w-[1px]">
|
||||
<Typography variant="h6" className="text-white">
|
||||
{t('StudyList')}
|
||||
</Typography>
|
||||
{getDataSourceConfigurationComponent &&
|
||||
getDataSourceConfigurationComponent()}
|
||||
{onUploadClick && (
|
||||
<div
|
||||
className="flex items-center gap-2 cursor-pointer text-primary-active text-lg self-center font-semibold"
|
||||
@@ -63,7 +66,7 @@ const StudyListFilter = ({
|
||||
</LegacyButton>
|
||||
)}
|
||||
<Typography
|
||||
variant="h4"
|
||||
variant="h6"
|
||||
className="mr-2"
|
||||
data-cy={'num-studies'}
|
||||
>
|
||||
@@ -71,7 +74,7 @@ const StudyListFilter = ({
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="h6"
|
||||
className="self-end pb-1 text-common-light"
|
||||
className="self-end pb-1 text-primary-light"
|
||||
>
|
||||
{t('Studies')}
|
||||
</Typography>
|
||||
@@ -80,8 +83,8 @@ const StudyListFilter = ({
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="sticky z-10 border-b-4 border-black -top-1">
|
||||
<div className="pt-3 pb-3 bg-primary-dark ">
|
||||
<div className="sticky z-10 border-b-4 border-black -top-1 mx-auto">
|
||||
<div className="pt-3 pb-3 bg-primary-dark">
|
||||
<InputGroup
|
||||
inputMeta={filtersMeta}
|
||||
values={filterValues}
|
||||
@@ -134,6 +137,7 @@ StudyListFilter.propTypes = {
|
||||
clearFilters: PropTypes.func.isRequired,
|
||||
isFiltering: PropTypes.bool.isRequired,
|
||||
onUploadClick: PropTypes.func,
|
||||
getDataSourceConfigurationComponent: PropTypes.func,
|
||||
};
|
||||
|
||||
export default StudyListFilter;
|
||||
@@ -13,6 +13,7 @@ import Icon from './Icon';
|
||||
import IconButton from './IconButton';
|
||||
import Input from './Input';
|
||||
import InputDateRange from './InputDateRange';
|
||||
import InputFilterText from './InputFilterText';
|
||||
import InputGroup from './InputGroup';
|
||||
import InputLabelWrapper from './InputLabelWrapper';
|
||||
import InputMultiSelect from './InputMultiSelect';
|
||||
@@ -97,6 +98,7 @@ export {
|
||||
IconButton,
|
||||
Input,
|
||||
InputDateRange,
|
||||
InputFilterText,
|
||||
InputGroup,
|
||||
InputRange,
|
||||
InputNumber,
|
||||
|
||||
@@ -58,6 +58,7 @@ export {
|
||||
InputRange,
|
||||
InputNumber,
|
||||
InputDateRange,
|
||||
InputFilterText,
|
||||
InputGroup,
|
||||
InputLabelWrapper,
|
||||
InputMultiSelect,
|
||||
|
||||
@@ -99,6 +99,9 @@ async function run() {
|
||||
'--force-publish',
|
||||
'--message',
|
||||
'chore(version): Update package versions [skip ci]',
|
||||
'--conventional-commits',
|
||||
'--create-release',
|
||||
'github',
|
||||
]);
|
||||
|
||||
console.log('Version set using lerna');
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"version": "3.7.0-beta.56",
|
||||
"commit": "b117a54aa10ee09e72e7675c6fb83cd8f49c26f7"
|
||||
"version": "3.7.0-beta.60",
|
||||
"commit": "44f101d3f2b3204b67e31f4e4939062e65a246ee"
|
||||
}
|
||||
+1
-1
@@ -1 +1 @@
|
||||
3.7.0-beta.56
|
||||
3.7.0-beta.60
|
||||
@@ -1376,10 +1376,10 @@
|
||||
resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9"
|
||||
integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==
|
||||
|
||||
"@cornerstonejs/adapters@^1.10.3":
|
||||
version "1.10.3"
|
||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/adapters/-/adapters-1.10.3.tgz#20e8babb35028b04a4579646c565e8e4523ad4fe"
|
||||
integrity sha512-cZO7V2hO8Al+KKhfCk5Y/+7zilFmz/Cv0I5PegsNS1YFfiMII9xCkLIKD/MO9ytAlBI6rDcB+lvkLvUM7gYUeg==
|
||||
"@cornerstonejs/adapters@^1.11.1":
|
||||
version "1.11.1"
|
||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/adapters/-/adapters-1.11.1.tgz#d6c2b0dc0742a0ffd76e9ed86f911bbd8bc94c05"
|
||||
integrity sha512-ggSToAWv6fn7J4mq412P6xGV5IdbtHqRR4ZGap12ytus9HCCZLZ3a+lWx21+Rc9zILj8H/58WWb/pYvN0Itp5g==
|
||||
dependencies:
|
||||
"@babel/runtime-corejs2" "^7.17.8"
|
||||
buffer "^6.0.3"
|
||||
@@ -1428,43 +1428,43 @@
|
||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/codec-openjph/-/codec-openjph-2.4.2.tgz#e96721d56f6ec96f7f95c16321d88cc8467d8d81"
|
||||
integrity sha512-lgdvBvvNezleY+4pIe2ceUsJzlZe/0PipdeubQ3vZZOz3xxtHHMR1XFCl4fgd8gosR8COHuD7h6q+MwgrwBsng==
|
||||
|
||||
"@cornerstonejs/core@^1.10.3":
|
||||
version "1.10.3"
|
||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/core/-/core-1.10.3.tgz#3bf26136d1335f72fbf4a6b8ba4d953db9255a76"
|
||||
integrity sha512-JPhY+ANSl3wWjGKbh9efVYwRRu7FvXbulKwAkwYfm5KO23sVoxkN6EIuWu+VgrfjQQN9lQoCUSLH39a6PulSug==
|
||||
"@cornerstonejs/core@^1.11.1":
|
||||
version "1.11.1"
|
||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/core/-/core-1.11.1.tgz#308904eabcd54bf8529ba174ff714a2aa7cd0be7"
|
||||
integrity sha512-QgGVRiS2ceDSC0kZlYyYw6owqh6rn7FaYuyJAYis1JCk1yG6xIUfcb6GMuubuEgEammc26i8EfU1H5FLxpHm2g==
|
||||
dependencies:
|
||||
"@kitware/vtk.js" "27.3.1"
|
||||
detect-gpu "^5.0.22"
|
||||
gl-matrix "^3.4.3"
|
||||
lodash.clonedeep "4.5.0"
|
||||
|
||||
"@cornerstonejs/dicom-image-loader@^1.10.3":
|
||||
version "1.10.3"
|
||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/dicom-image-loader/-/dicom-image-loader-1.10.3.tgz#e8f9d9188c2ef8a1920b4b3a29864470adc5a307"
|
||||
integrity sha512-ES2D2YRMX18ws9Udqbkj3rt5f2akt9UoL8N8hlrcAX59MBUGkrY5Feo/898Eav1Mx5mnwOZn0DMETeE3MSkwcQ==
|
||||
"@cornerstonejs/dicom-image-loader@^1.11.1":
|
||||
version "1.11.1"
|
||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/dicom-image-loader/-/dicom-image-loader-1.11.1.tgz#0a7786b97828038f6faca088b40cc2b96c7db362"
|
||||
integrity sha512-5/ocRRoYiwKKcKR01oGwWQp3imPEEYJcHull7MuwMWS1mZgYvok0QGs5Wz51rY8qJZCuM7nvkKxI21YzQkxISw==
|
||||
dependencies:
|
||||
"@cornerstonejs/codec-charls" "^1.2.3"
|
||||
"@cornerstonejs/codec-libjpeg-turbo-8bit" "^1.2.2"
|
||||
"@cornerstonejs/codec-openjpeg" "^1.2.2"
|
||||
"@cornerstonejs/codec-openjph" "^2.4.2"
|
||||
"@cornerstonejs/core" "^1.10.3"
|
||||
"@cornerstonejs/core" "^1.11.1"
|
||||
dicom-parser "^1.8.9"
|
||||
pako "^2.0.4"
|
||||
uuid "^9.0.0"
|
||||
|
||||
"@cornerstonejs/streaming-image-volume-loader@^1.10.3":
|
||||
version "1.10.3"
|
||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/streaming-image-volume-loader/-/streaming-image-volume-loader-1.10.3.tgz#44d5d0777b6a0aff26785d6fd695069476f797ce"
|
||||
integrity sha512-cZB//zkWsjRwaUYo3GZrx96FsycF41031Hb4UdFkmXHUVCUE8SYpiVZg7VD3cjtEiGCeDSReHVAzSVavUXqUYg==
|
||||
"@cornerstonejs/streaming-image-volume-loader@^1.11.1":
|
||||
version "1.11.1"
|
||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/streaming-image-volume-loader/-/streaming-image-volume-loader-1.11.1.tgz#4f48b9af36da090f51e91b9736d892c4450244cd"
|
||||
integrity sha512-S++wH3u037Gw5I51DWNwvqYaJl9W8vNhebTSzQIgZO3TVShzJo+0zQWdrsXrqOSzn9+0d4H6yEdxjKvsDRYBMw==
|
||||
dependencies:
|
||||
"@cornerstonejs/core" "^1.10.3"
|
||||
"@cornerstonejs/core" "^1.11.1"
|
||||
|
||||
"@cornerstonejs/tools@^1.10.3":
|
||||
version "1.10.3"
|
||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/tools/-/tools-1.10.3.tgz#d3ba9db77489560828baccd239ebea647cb8d220"
|
||||
integrity sha512-Z8PzL26cvDQP8PUQpNk48oSbNqoQ64bWJT96hUd2xZ+X92shiDkiMoI4v20jylSaorw7uMUPCMAooFdHG5Dp0w==
|
||||
"@cornerstonejs/tools@^1.11.1":
|
||||
version "1.11.1"
|
||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/tools/-/tools-1.11.1.tgz#537caff00b53b7d37ea31d5aa67ec09298ce8057"
|
||||
integrity sha512-kt6UTHT24PffiEDuHSTOiRTSfYHaluWTY27bigr0wdnrMYMlO0oignFXiSJAJ0FzLZUhuRZeN7qs1fLXhOlcrA==
|
||||
dependencies:
|
||||
"@cornerstonejs/core" "^1.10.3"
|
||||
"@cornerstonejs/core" "^1.11.1"
|
||||
lodash.clonedeep "4.5.0"
|
||||
lodash.get "^4.4.2"
|
||||
|
||||
|
||||
Reference in new issue
Block a user