@ohif/app 3.9.0-beta.100 → 3.9.0-beta.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{1471.bundle.68b4d7e296a8994404d3.js → 1471.bundle.23ed44fce3b02968fa7b.js} +1 -1
- package/dist/{1920.bundle.99de8331dcd10ede537d.js → 1920.bundle.2e0f60f6b04c5b781064.js} +1 -1
- package/dist/{2327.bundle.a674773cd95aa37b90e6.js → 2327.bundle.c60b7cf05680af5b70c1.js} +20 -47
- package/dist/{3194.bundle.e5328296fe69ff83bd73.js → 3194.bundle.052149a399b3ecec92c8.js} +8 -41
- package/dist/{4129.bundle.f222c5facab0be65bac6.js → 4129.bundle.2d2f56d83cc84af8fb4e.js} +8 -59
- package/dist/{44.bundle.2434ac081ec624827ce7.js → 44.bundle.248223cbd5284282963a.js} +3 -23
- package/dist/{8218.bundle.15d6da2c5f9c8685ae9f.js → 8218.bundle.755f36e5b1663e48f304.js} +1 -1
- package/dist/{8324.bundle.152345761c3b0d428590.js → 8324.bundle.ae1b5a7a34a85d846285.js} +25 -59
- package/dist/{9404.bundle.bcf5540131619fbd939a.js → 9404.bundle.829d1ce23cd52e6dfc89.js} +9 -43
- package/dist/app-config.js +0 -1
- package/dist/app.bundle.css +2 -2
- package/dist/{app.bundle.45f2a3ef78a27f5267c7.js → app.bundle.e5b29f933faa2638176c.js} +1115 -1059
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +18 -18
- /package/dist/{1156.bundle.b35e7bc9ce99d59a6512.js → 1156.bundle.b37b2a8d6dba5d35ef64.js} +0 -0
- /package/dist/{140.bundle.834e192f4fa1182809e3.js → 140.bundle.7a5de4db1e8e78d53244.js} +0 -0
- /package/dist/{1597.bundle.3a5983064adc10301b95.js → 1597.bundle.ad76fdeb3061bcfa1681.js} +0 -0
- /package/dist/{2211.bundle.ec304bdde7a72395b0db.js → 2211.bundle.a3eb113173d861685ea1.js} +0 -0
- /package/dist/{2392.bundle.9ce41d170e7d7d36ca79.js → 2392.bundle.c09eef47c2a8c6674225.js} +0 -0
- /package/dist/{3675.bundle.28226f3c153b08059c5d.js → 3675.bundle.bbe5f470f9c04976b51b.js} +0 -0
- /package/dist/{4012.bundle.454c55e01a595766081f.js → 4012.bundle.e2d71adefdf700d9f3b1.js} +0 -0
- /package/dist/{4202.bundle.1127627b7cdbb7ed1aaa.js → 4202.bundle.c8ddc4d76d963bc3176f.js} +0 -0
- /package/dist/{4444.bundle.6c7e3ba769aa56aba140.js → 4444.bundle.363fa1b70c8c1ef6745e.js} +0 -0
- /package/dist/{5323.bundle.3389b9441d1e1d7d7293.js → 5323.bundle.c1fe781cca10b6ace921.js} +0 -0
- /package/dist/{5350.bundle.c86d16b39e3a82940999.js → 5350.bundle.72ded9946d8ebecbb318.js} +0 -0
- /package/dist/{6552.bundle.0bbd4979f69f6f4d1556.js → 6552.bundle.b595a3327cbdbe9245c8.js} +0 -0
- /package/dist/{7370.bundle.7556283dc08d0c902b54.js → 7370.bundle.f8725a8dc428f9e237b4.js} +0 -0
- /package/dist/{7516.bundle.575cbef44055bfa6f9cf.js → 7516.bundle.4a9c2a92ba1b593defaf.js} +0 -0
- /package/dist/{7853.bundle.973b23f4f25a0821872e.js → 7853.bundle.e56257f620547271b4dd.js} +0 -0
- /package/dist/{8792.bundle.e96d57d1d5854c14ce4c.js → 8792.bundle.6ecd3510022078878c4b.js} +0 -0
- /package/dist/{9014.bundle.9f7d744bdc166a58874a.js → 9014.bundle.ac341275cc94cdceef4b.js} +0 -0
- /package/dist/{9806.bundle.7cf51eda77977eee4ee6.js → 9806.bundle.a7c532f7be2473e93737.js} +0 -0
|
@@ -6263,8 +6263,8 @@ function WorkList({
|
|
|
6263
6263
|
};
|
|
6264
6264
|
});
|
|
6265
6265
|
const hasStudies = numOfStudies > 0;
|
|
6266
|
-
const versionNumber = "3.9.0-beta.
|
|
6267
|
-
const commitHash = "
|
|
6266
|
+
const versionNumber = "3.9.0-beta.102";
|
|
6267
|
+
const commitHash = "06104257402e872d447e59cb166184d9a3548f8b";
|
|
6268
6268
|
const menuOptions = [{
|
|
6269
6269
|
title: t('Header:About'),
|
|
6270
6270
|
icon: 'info',
|
|
@@ -13337,7 +13337,7 @@ const detectionOptions = {
|
|
|
13337
13337
|
}
|
|
13338
13338
|
});
|
|
13339
13339
|
;// CONCATENATED MODULE: ../../i18n/package.json
|
|
13340
|
-
const package_namespaceObject = /*#__PURE__*/JSON.parse('{"rE":"3.9.0-beta.
|
|
13340
|
+
const package_namespaceObject = /*#__PURE__*/JSON.parse('{"rE":"3.9.0-beta.101"}');
|
|
13341
13341
|
;// CONCATENATED MODULE: ../../i18n/src/utils.js
|
|
13342
13342
|
const languagesMap = {
|
|
13343
13343
|
ar: 'Arabic',
|
|
@@ -20534,10 +20534,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
20534
20534
|
QQ: () => (/* reexport */ SegmentationGroupTable_SegmentationGroupTable),
|
|
20535
20535
|
fO: () => (/* reexport */ SegmentationGroupTable_SegmentationGroupTableExpanded),
|
|
20536
20536
|
l6: () => (/* reexport */ components_Select),
|
|
20537
|
-
wv: () => (/* reexport */ components_SidePanel),
|
|
20538
20537
|
n: () => (/* reexport */ contextProviders_SnackbarProvider),
|
|
20539
20538
|
fk: () => (/* reexport */ components_SplitButton),
|
|
20540
|
-
M4: () => (/* reexport */ components_StudyBrowser),
|
|
20541
20539
|
r5: () => (/* reexport */ components_StudyListExpandedRow),
|
|
20542
20540
|
y_: () => (/* reexport */ StudyListFilter_StudyListFilter),
|
|
20543
20541
|
e$: () => (/* reexport */ components_StudyListPagination),
|
|
@@ -20547,7 +20545,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
20547
20545
|
cx: () => (/* reexport */ components_ThemeWrapper),
|
|
20548
20546
|
TM: () => (/* reexport */ AdvancedToolbox_ToolSettings),
|
|
20549
20547
|
IB: () => (/* reexport */ components_ToolbarButton),
|
|
20550
|
-
OO: () => (/* reexport */ Toolbox_Toolbox),
|
|
20551
20548
|
nB: () => (/* reexport */ ToolboxProvider),
|
|
20552
20549
|
m_: () => (/* reexport */ components_Tooltip),
|
|
20553
20550
|
ax: () => (/* reexport */ TooltipClipboard_TooltipClipboard),
|
|
@@ -20570,13 +20567,13 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
20570
20567
|
Bz: () => (/* reexport */ useImageViewer),
|
|
20571
20568
|
hS: () => (/* reexport */ useModal),
|
|
20572
20569
|
Fo: () => (/* reexport */ hooks_useSessionStorage),
|
|
20573
|
-
Z1: () => (/* reexport */
|
|
20570
|
+
Z1: () => (/* reexport */ ToolboxContext_useToolbox),
|
|
20574
20571
|
fY: () => (/* reexport */ useUserAuthentication),
|
|
20575
20572
|
OR: () => (/* reexport */ useViewportDialog),
|
|
20576
20573
|
ih: () => (/* reexport */ useViewportGrid)
|
|
20577
20574
|
});
|
|
20578
20575
|
|
|
20579
|
-
// UNUSED EXPORTS: AdvancedToolbox, BackgroundColor, CheckBox, ContextMenu, DateRange, Dropdown, ExpandableToolbarButton, HeaderPatientInfo, HotkeyField, HotkeysPreferences, ICONS, ImageViewerContext, InputDateRange, InputGroup, InputLabelWrapper, InputMultiSelect, InputText, LegacyCinePlayer, LegacySidePanel, LegacySplitButton, LegacyViewportActionBar, ListMenu, MeasurementItem, ModalComponent, ModalConsumer, NavBar, SegmentationTable, StudyBrowserSort, StudyItem, StudyListTableRow, Svg, SwitchLabelLocation, Table, TableBody, TableCell, TableHead, TableRow, Thumbnail, ThumbnailList, ThumbnailNoImage, ThumbnailTracked, UserAuthenticationContext, Viewport, ViewportActionBar, ViewportGridContext, addIcon, getIcon, useDialog, useSnackbar, withDialog, withModal, withSnackbar
|
|
20576
|
+
// UNUSED EXPORTS: AdvancedToolbox, BackgroundColor, CheckBox, ContextMenu, DateRange, Dropdown, ExpandableToolbarButton, HeaderPatientInfo, HotkeyField, HotkeysPreferences, ICONS, ImageViewerContext, InputDateRange, InputGroup, InputLabelWrapper, InputMultiSelect, InputText, LegacyCinePlayer, LegacySidePanel, LegacySplitButton, LegacyViewportActionBar, ListMenu, MeasurementItem, ModalComponent, ModalConsumer, NavBar, SegmentationTable, SidePanel, StudyBrowser, StudyBrowserSort, StudyItem, StudyListTableRow, Svg, SwitchLabelLocation, Table, TableBody, TableCell, TableHead, TableRow, Thumbnail, ThumbnailList, ThumbnailNoImage, ThumbnailTracked, Toolbox, UserAuthenticationContext, Viewport, ViewportActionBar, ViewportGridContext, addIcon, getIcon, useDialog, useSnackbar, withDialog, withModal, withSnackbar
|
|
20580
20577
|
|
|
20581
20578
|
// NAMESPACE OBJECT: ../../ui/src/types/index.ts
|
|
20582
20579
|
var types_namespaceObject = {};
|
|
@@ -20673,8 +20670,8 @@ var react_namespaceObject = /*#__PURE__*/__webpack_require__.t(react, 2);
|
|
|
20673
20670
|
var cjs = __webpack_require__(43908);
|
|
20674
20671
|
var cjs_default = /*#__PURE__*/__webpack_require__.n(cjs);
|
|
20675
20672
|
// EXTERNAL MODULE: ../../../node_modules/classnames/index.js
|
|
20676
|
-
var
|
|
20677
|
-
var classnames_default = /*#__PURE__*/__webpack_require__.n(
|
|
20673
|
+
var node_modules_classnames = __webpack_require__(61466);
|
|
20674
|
+
var classnames_default = /*#__PURE__*/__webpack_require__.n(node_modules_classnames);
|
|
20678
20675
|
// EXTERNAL MODULE: ../../core/src/utils/guid.js
|
|
20679
20676
|
var guid = __webpack_require__(26933);
|
|
20680
20677
|
;// CONCATENATED MODULE: ../../ui/src/contextProviders/DialogProvider.css
|
|
@@ -23308,7 +23305,7 @@ const ToolboxProvider = ({
|
|
|
23308
23305
|
* defined by the toolbarSectionId) in your custom toolbar components. This hook
|
|
23309
23306
|
* helps to manage the state and actions for the tools and their options in the toolbar.
|
|
23310
23307
|
*/
|
|
23311
|
-
const
|
|
23308
|
+
const ToolboxContext_useToolbox = toolbarSectionId => {
|
|
23312
23309
|
const context = (0,react.useContext)(ToolboxContext);
|
|
23313
23310
|
if (context === undefined) {
|
|
23314
23311
|
throw new Error('useToolbox must be used within a ToolboxProvider');
|
|
@@ -36317,7 +36314,7 @@ const createBaseStyle = expandedWidth => {
|
|
|
36317
36314
|
height: '99.8%'
|
|
36318
36315
|
};
|
|
36319
36316
|
};
|
|
36320
|
-
const
|
|
36317
|
+
const SidePanel_SidePanel = ({
|
|
36321
36318
|
side,
|
|
36322
36319
|
className,
|
|
36323
36320
|
activeTabIndex: activeTabIndexProp = null,
|
|
@@ -36482,7 +36479,7 @@ const SidePanel = ({
|
|
|
36482
36479
|
return null;
|
|
36483
36480
|
})) : /*#__PURE__*/react.createElement(react.Fragment, null, getCloseStateComponent()));
|
|
36484
36481
|
};
|
|
36485
|
-
|
|
36482
|
+
SidePanel_SidePanel.propTypes = {
|
|
36486
36483
|
side: prop_types_default().oneOf(['left', 'right']).isRequired,
|
|
36487
36484
|
className: (prop_types_default()).string,
|
|
36488
36485
|
activeTabIndex: (prop_types_default()).number,
|
|
@@ -36497,10 +36494,10 @@ SidePanel.propTypes = {
|
|
|
36497
36494
|
onActiveTabIndexChange: (prop_types_default()).func,
|
|
36498
36495
|
expandedWidth: (prop_types_default()).number
|
|
36499
36496
|
};
|
|
36500
|
-
/* harmony default export */ const
|
|
36497
|
+
/* harmony default export */ const components_SidePanel_SidePanel = ((/* unused pure expression or super */ null && (SidePanel_SidePanel)));
|
|
36501
36498
|
;// CONCATENATED MODULE: ../../ui/src/components/SidePanel/index.js
|
|
36502
36499
|
|
|
36503
|
-
/* harmony default export */ const components_SidePanel = (
|
|
36500
|
+
/* harmony default export */ const components_SidePanel = ((/* unused pure expression or super */ null && (SidePanel)));
|
|
36504
36501
|
// EXTERNAL MODULE: ../../../node_modules/react-outside-click-handler/index.js
|
|
36505
36502
|
var react_outside_click_handler = __webpack_require__(17076);
|
|
36506
36503
|
;// CONCATENATED MODULE: ../../ui/src/components/ListMenu/ListMenu.tsx
|
|
@@ -37898,7 +37895,7 @@ const getTrackedSeries = displaySets => {
|
|
|
37898
37895
|
return trackedSeries;
|
|
37899
37896
|
};
|
|
37900
37897
|
const StudyBrowser_noop = () => {};
|
|
37901
|
-
const
|
|
37898
|
+
const StudyBrowser_StudyBrowser = ({
|
|
37902
37899
|
tabs,
|
|
37903
37900
|
activeTabName,
|
|
37904
37901
|
expandedStudyInstanceUIDs,
|
|
@@ -37993,7 +37990,7 @@ const StudyBrowser = ({
|
|
|
37993
37990
|
className: "ohif-scrollbar invisible-scrollbar flex flex-1 flex-col overflow-auto"
|
|
37994
37991
|
}, getTabContent()));
|
|
37995
37992
|
};
|
|
37996
|
-
|
|
37993
|
+
StudyBrowser_StudyBrowser.propTypes = {
|
|
37997
37994
|
onClickTab: (prop_types_default()).func.isRequired,
|
|
37998
37995
|
onClickStudy: (prop_types_default()).func,
|
|
37999
37996
|
onClickThumbnail: (prop_types_default()).func,
|
|
@@ -38036,10 +38033,10 @@ StudyBrowser.propTypes = {
|
|
|
38036
38033
|
})).isRequired
|
|
38037
38034
|
}))
|
|
38038
38035
|
};
|
|
38039
|
-
/* harmony default export */ const
|
|
38036
|
+
/* harmony default export */ const components_StudyBrowser_StudyBrowser = ((/* unused pure expression or super */ null && (StudyBrowser_StudyBrowser)));
|
|
38040
38037
|
;// CONCATENATED MODULE: ../../ui/src/components/StudyBrowser/index.js
|
|
38041
38038
|
|
|
38042
|
-
/* harmony default export */ const components_StudyBrowser = (
|
|
38039
|
+
/* harmony default export */ const components_StudyBrowser = ((/* unused pure expression or super */ null && (StudyBrowser)));
|
|
38043
38040
|
;// CONCATENATED MODULE: ../../ui/src/components/Table/Table.tsx
|
|
38044
38041
|
|
|
38045
38042
|
|
|
@@ -61280,7 +61277,7 @@ function _getMoreThanOneTabLayout(swiperRef, setSwiper, prevRef, nextRef, tabs,
|
|
|
61280
61277
|
|
|
61281
61278
|
|
|
61282
61279
|
|
|
61283
|
-
const
|
|
61280
|
+
const PanelSection_PanelSection = ({
|
|
61284
61281
|
title,
|
|
61285
61282
|
children,
|
|
61286
61283
|
actionIcons = [],
|
|
@@ -61317,7 +61314,7 @@ const PanelSection = ({
|
|
|
61317
61314
|
className: `bg-primary-dark flex flex-col overflow-hidden rounded-b-[4px] ${childrenClassName}`
|
|
61318
61315
|
}, children)));
|
|
61319
61316
|
};
|
|
61320
|
-
|
|
61317
|
+
PanelSection_PanelSection.propTypes = {
|
|
61321
61318
|
title: (prop_types_default()).string,
|
|
61322
61319
|
children: (prop_types_default()).node,
|
|
61323
61320
|
childrenClassName: (prop_types_default()).string,
|
|
@@ -61326,10 +61323,10 @@ PanelSection.propTypes = {
|
|
|
61326
61323
|
onClick: (prop_types_default()).func
|
|
61327
61324
|
}))
|
|
61328
61325
|
};
|
|
61329
|
-
/* harmony default export */ const
|
|
61326
|
+
/* harmony default export */ const components_PanelSection_PanelSection = (PanelSection_PanelSection);
|
|
61330
61327
|
;// CONCATENATED MODULE: ../../ui/src/components/PanelSection/index.js
|
|
61331
61328
|
|
|
61332
|
-
/* harmony default export */ const components_PanelSection = (
|
|
61329
|
+
/* harmony default export */ const components_PanelSection = (components_PanelSection_PanelSection);
|
|
61333
61330
|
;// CONCATENATED MODULE: ../../ui/src/components/AdvancedToolbox/ToolSettings.tsx
|
|
61334
61331
|
|
|
61335
61332
|
|
|
@@ -61339,7 +61336,7 @@ const SETTING_TYPES = {
|
|
|
61339
61336
|
CUSTOM: 'custom',
|
|
61340
61337
|
DOUBLE_RANGE: 'double-range'
|
|
61341
61338
|
};
|
|
61342
|
-
function
|
|
61339
|
+
function ToolSettings_ToolSettings({
|
|
61343
61340
|
options
|
|
61344
61341
|
}) {
|
|
61345
61342
|
if (!options) {
|
|
@@ -61434,7 +61431,7 @@ const renderCustomSetting = option => {
|
|
|
61434
61431
|
key: option.id
|
|
61435
61432
|
}, typeof option.children === 'function' ? option.children() : option.children);
|
|
61436
61433
|
};
|
|
61437
|
-
/* harmony default export */ const AdvancedToolbox_ToolSettings = (
|
|
61434
|
+
/* harmony default export */ const AdvancedToolbox_ToolSettings = (ToolSettings_ToolSettings);
|
|
61438
61435
|
;// CONCATENATED MODULE: ../../ui/src/components/AdvancedToolbox/AdvancedToolbox.tsx
|
|
61439
61436
|
|
|
61440
61437
|
|
|
@@ -63871,8 +63868,8 @@ function ToolboxUI_extends() { return ToolboxUI_extends = Object.assign ? Object
|
|
|
63871
63868
|
|
|
63872
63869
|
const ItemsPerRow = 4;
|
|
63873
63870
|
function usePrevious(value) {
|
|
63874
|
-
const ref =
|
|
63875
|
-
|
|
63871
|
+
const ref = useRef();
|
|
63872
|
+
useEffect(() => {
|
|
63876
63873
|
ref.current = value;
|
|
63877
63874
|
});
|
|
63878
63875
|
return ref.current;
|
|
@@ -63881,7 +63878,7 @@ function usePrevious(value) {
|
|
|
63881
63878
|
/**
|
|
63882
63879
|
* Just refactoring from the toolbox component to make it more readable
|
|
63883
63880
|
*/
|
|
63884
|
-
function
|
|
63881
|
+
function ToolboxUI_ToolboxUI(props) {
|
|
63885
63882
|
const {
|
|
63886
63883
|
toolbarButtons,
|
|
63887
63884
|
handleToolSelect,
|
|
@@ -63898,7 +63895,7 @@ function ToolboxUI(props) {
|
|
|
63898
63895
|
} = toolboxState;
|
|
63899
63896
|
const activeToolOptions = toolOptions?.[activeTool];
|
|
63900
63897
|
const prevToolOptions = usePrevious(activeToolOptions);
|
|
63901
|
-
|
|
63898
|
+
useEffect(() => {
|
|
63902
63899
|
if (!activeToolOptions || Array.isArray(activeToolOptions) === false) {
|
|
63903
63900
|
return;
|
|
63904
63901
|
}
|
|
@@ -63918,9 +63915,9 @@ function ToolboxUI(props) {
|
|
|
63918
63915
|
});
|
|
63919
63916
|
}, [activeToolOptions, selectedEvent]);
|
|
63920
63917
|
const render = () => {
|
|
63921
|
-
return /*#__PURE__*/
|
|
63918
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
63922
63919
|
className: "flex flex-col bg-black"
|
|
63923
|
-
}, /*#__PURE__*/
|
|
63920
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
63924
63921
|
className: "bg-primary-dark mt-0.5 flex flex-wrap py-2"
|
|
63925
63922
|
}, toolbarButtons.map((toolDef, index) => {
|
|
63926
63923
|
if (!toolDef) {
|
|
@@ -63945,27 +63942,27 @@ function ToolboxUI(props) {
|
|
|
63945
63942
|
commands
|
|
63946
63943
|
});
|
|
63947
63944
|
};
|
|
63948
|
-
return /*#__PURE__*/
|
|
63945
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
63949
63946
|
key: id,
|
|
63950
|
-
className:
|
|
63947
|
+
className: classnames({
|
|
63951
63948
|
[toolClasses]: true,
|
|
63952
63949
|
'border-secondary-light flex flex-col items-center justify-center rounded-md border': true
|
|
63953
63950
|
})
|
|
63954
|
-
}, /*#__PURE__*/
|
|
63951
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
63955
63952
|
className: "flex rounded-md bg-black"
|
|
63956
|
-
}, /*#__PURE__*/
|
|
63953
|
+
}, /*#__PURE__*/React.createElement(Component, ToolboxUI_extends({}, componentProps, props, {
|
|
63957
63954
|
id: id,
|
|
63958
63955
|
servicesManager: servicesManager,
|
|
63959
63956
|
onInteraction: onInteraction,
|
|
63960
63957
|
size: "toolbox"
|
|
63961
63958
|
}))));
|
|
63962
|
-
}))), /*#__PURE__*/
|
|
63959
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
63963
63960
|
className: "bg-primary-dark h-auto px-2"
|
|
63964
|
-
}, activeToolOptions && /*#__PURE__*/
|
|
63961
|
+
}, activeToolOptions && /*#__PURE__*/React.createElement(ToolSettings, {
|
|
63965
63962
|
options: activeToolOptions
|
|
63966
63963
|
})));
|
|
63967
63964
|
};
|
|
63968
|
-
return useCollapsedPanel ? /*#__PURE__*/
|
|
63965
|
+
return useCollapsedPanel ? /*#__PURE__*/React.createElement(PanelSection, {
|
|
63969
63966
|
childrenClassName: "flex-shrink-0",
|
|
63970
63967
|
title: title
|
|
63971
63968
|
}, render()) : render();
|
|
@@ -64002,13 +63999,13 @@ function Toolbox({
|
|
|
64002
63999
|
const {
|
|
64003
64000
|
onInteraction,
|
|
64004
64001
|
toolbarButtons
|
|
64005
|
-
} =
|
|
64002
|
+
} = useToolbar({
|
|
64006
64003
|
servicesManager,
|
|
64007
64004
|
buttonSection: buttonSectionId
|
|
64008
64005
|
});
|
|
64009
|
-
const prevButtonIdsRef =
|
|
64010
|
-
const prevToolboxStateRef =
|
|
64011
|
-
|
|
64006
|
+
const prevButtonIdsRef = useRef('');
|
|
64007
|
+
const prevToolboxStateRef = useRef('');
|
|
64008
|
+
useEffect(() => {
|
|
64012
64009
|
const currentButtonIdsStr = JSON.stringify(toolbarButtons.map(button => {
|
|
64013
64010
|
const {
|
|
64014
64011
|
id,
|
|
@@ -64106,12 +64103,12 @@ function Toolbox({
|
|
|
64106
64103
|
const handleToolOptionChange = (toolName, optionName, newValue) => {
|
|
64107
64104
|
api.handleToolOptionChange(toolName, optionName, newValue);
|
|
64108
64105
|
};
|
|
64109
|
-
|
|
64106
|
+
useEffect(() => {
|
|
64110
64107
|
return () => {
|
|
64111
64108
|
api.handleToolSelect(null);
|
|
64112
64109
|
};
|
|
64113
64110
|
}, []);
|
|
64114
|
-
return /*#__PURE__*/
|
|
64111
|
+
return /*#__PURE__*/React.createElement(ToolboxUI, Toolbox_extends({}, props, {
|
|
64115
64112
|
title: title,
|
|
64116
64113
|
toolbarButtons: toolbarButtons,
|
|
64117
64114
|
toolboxState: toolboxState,
|
|
@@ -64120,7 +64117,7 @@ function Toolbox({
|
|
|
64120
64117
|
onInteraction: onInteraction
|
|
64121
64118
|
}));
|
|
64122
64119
|
}
|
|
64123
|
-
/* harmony default export */ const Toolbox_Toolbox = (Toolbox);
|
|
64120
|
+
/* harmony default export */ const Toolbox_Toolbox = ((/* unused pure expression or super */ null && (Toolbox)));
|
|
64124
64121
|
;// CONCATENATED MODULE: ../../ui/src/components/Toolbox/index.js
|
|
64125
64122
|
|
|
64126
64123
|
|
|
@@ -69690,6 +69687,10 @@ class CustomizationService extends pubSubServiceInterface/* PubSubService */.R {
|
|
|
69690
69687
|
}
|
|
69691
69688
|
onModeEnter() {
|
|
69692
69689
|
super.reset();
|
|
69690
|
+
const modeCustomizationKeys = Array.from(this.modeCustomizations.keys());
|
|
69691
|
+
for (const key of modeCustomizationKeys) {
|
|
69692
|
+
this.transformedCustomizations.delete(key);
|
|
69693
|
+
}
|
|
69693
69694
|
this.modeCustomizations.clear();
|
|
69694
69695
|
}
|
|
69695
69696
|
getModeCustomizations() {
|
|
@@ -196885,6 +196886,65 @@ const Icons_Icons = {
|
|
|
196885
196886
|
})), /*#__PURE__*/react.createElement("path", {
|
|
196886
196887
|
d: "M0 0h22v22H0z"
|
|
196887
196888
|
}))),
|
|
196889
|
+
DicomTagBrowser: props => /*#__PURE__*/react.createElement("svg", {
|
|
196890
|
+
width: "24px",
|
|
196891
|
+
height: "24px",
|
|
196892
|
+
viewBox: "0 0 28 28",
|
|
196893
|
+
version: "1.1",
|
|
196894
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
196895
|
+
}, /*#__PURE__*/react.createElement("title", null, "tool-dicom-tag-browser"), /*#__PURE__*/react.createElement("g", {
|
|
196896
|
+
id: "tool-dicom-tag-browser",
|
|
196897
|
+
stroke: "none",
|
|
196898
|
+
strokeWidth: "1",
|
|
196899
|
+
fill: "none",
|
|
196900
|
+
fillRule: "evenodd"
|
|
196901
|
+
}, /*#__PURE__*/react.createElement("rect", {
|
|
196902
|
+
id: "Rectangle",
|
|
196903
|
+
x: "0",
|
|
196904
|
+
y: "0",
|
|
196905
|
+
width: "28",
|
|
196906
|
+
height: "28"
|
|
196907
|
+
}), /*#__PURE__*/react.createElement("g", {
|
|
196908
|
+
id: "Group",
|
|
196909
|
+
transform: "translate(4, 5.5)",
|
|
196910
|
+
stroke: "currentColor",
|
|
196911
|
+
strokeLinecap: "round",
|
|
196912
|
+
strokeLinejoin: "round",
|
|
196913
|
+
strokeWidth: "1.5"
|
|
196914
|
+
}, /*#__PURE__*/react.createElement("circle", {
|
|
196915
|
+
id: "Oval",
|
|
196916
|
+
cx: "1.73913043",
|
|
196917
|
+
cy: "1.73913043",
|
|
196918
|
+
r: "1.73913043"
|
|
196919
|
+
}), /*#__PURE__*/react.createElement("line", {
|
|
196920
|
+
x1: "6.95652174",
|
|
196921
|
+
y1: "1.73913043",
|
|
196922
|
+
x2: "20",
|
|
196923
|
+
y2: "1.73913043",
|
|
196924
|
+
id: "Path"
|
|
196925
|
+
}), /*#__PURE__*/react.createElement("circle", {
|
|
196926
|
+
id: "Oval",
|
|
196927
|
+
cx: "1.73913043",
|
|
196928
|
+
cy: "8.69565217",
|
|
196929
|
+
r: "1.73913043"
|
|
196930
|
+
}), /*#__PURE__*/react.createElement("line", {
|
|
196931
|
+
x1: "6.95652174",
|
|
196932
|
+
y1: "8.69565217",
|
|
196933
|
+
x2: "20",
|
|
196934
|
+
y2: "8.69565217",
|
|
196935
|
+
id: "Path"
|
|
196936
|
+
}), /*#__PURE__*/react.createElement("circle", {
|
|
196937
|
+
id: "Oval",
|
|
196938
|
+
cx: "1.73913043",
|
|
196939
|
+
cy: "15.6521739",
|
|
196940
|
+
r: "1.73913043"
|
|
196941
|
+
}), /*#__PURE__*/react.createElement("line", {
|
|
196942
|
+
x1: "6.95652174",
|
|
196943
|
+
y1: "15.6521739",
|
|
196944
|
+
x2: "20",
|
|
196945
|
+
y2: "15.6521739",
|
|
196946
|
+
id: "Path"
|
|
196947
|
+
})))),
|
|
196888
196948
|
// Aliases
|
|
196889
196949
|
'tab-segmentation': props => Icons_Icons.TabSegmentation(props),
|
|
196890
196950
|
'tab-studies': props => Icons_Icons.TabStudies(props),
|
|
@@ -197525,7 +197585,6 @@ const SidePanel = ({
|
|
|
197525
197585
|
onActiveTabIndexChange
|
|
197526
197586
|
}) => {
|
|
197527
197587
|
const [panelOpen, setPanelOpen] = (0,react.useState)(activeTabIndexProp !== null);
|
|
197528
|
-
const [renderHeader, setRenderHeader] = (0,react.useState)(false);
|
|
197529
197588
|
const [activeTabIndex, setActiveTabIndex] = (0,react.useState)(0);
|
|
197530
197589
|
const styleMap = createStyleMap(expandedWidth, borderSize, collapsedWidth);
|
|
197531
197590
|
const baseStyle = createBaseStyle(expandedWidth);
|
|
@@ -197552,9 +197611,6 @@ const SidePanel = ({
|
|
|
197552
197611
|
});
|
|
197553
197612
|
}
|
|
197554
197613
|
}, [onActiveTabIndexChange, updatePanelOpen]);
|
|
197555
|
-
(0,react.useEffect)(() => {
|
|
197556
|
-
setRenderHeader(tabs.length === 1);
|
|
197557
|
-
}, [tabs]);
|
|
197558
197614
|
(0,react.useEffect)(() => {
|
|
197559
197615
|
updateActiveTabIndex(activeTabIndexProp);
|
|
197560
197616
|
}, [activeTabIndexProp, updateActiveTabIndex]);
|
|
@@ -197596,7 +197652,7 @@ const SidePanel = ({
|
|
|
197596
197652
|
};
|
|
197597
197653
|
const getCloseIcon = () => {
|
|
197598
197654
|
return /*#__PURE__*/react.createElement("div", {
|
|
197599
|
-
className: classnames_default()('absolute flex
|
|
197655
|
+
className: classnames_default()('absolute flex cursor-pointer items-center justify-center', side === 'left' ? 'right-0' : 'left-0'),
|
|
197600
197656
|
style: {
|
|
197601
197657
|
width: `${closeIconWidth}px`
|
|
197602
197658
|
},
|
|
@@ -197649,13 +197705,17 @@ const SidePanel = ({
|
|
|
197649
197705
|
}, getToolTipContent(tab.label, disabled)))));
|
|
197650
197706
|
}))));
|
|
197651
197707
|
};
|
|
197708
|
+
const getOneTabComponent = () => {
|
|
197709
|
+
return /*#__PURE__*/react.createElement("div", {
|
|
197710
|
+
className: classnames_default()('text-primary-active flex grow cursor-pointer select-none justify-center self-center text-[13px]'),
|
|
197711
|
+
"data-cy": `${tabs[0].name}-btn`,
|
|
197712
|
+
onClick: () => updatePanelOpen(!panelOpen)
|
|
197713
|
+
}, getCloseIcon(), /*#__PURE__*/react.createElement("span", null, tabs[0].label));
|
|
197714
|
+
};
|
|
197652
197715
|
const getOpenStateComponent = () => {
|
|
197653
|
-
if (tabs.length === 1) {
|
|
197654
|
-
return null;
|
|
197655
|
-
}
|
|
197656
197716
|
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
|
197657
197717
|
className: "bg-bkg-med flex h-[40px] select-none rounded-t p-2"
|
|
197658
|
-
}, getTabGridComponent()), /*#__PURE__*/react.createElement(Separator_Separator, {
|
|
197718
|
+
}, tabs.length === 1 ? getOneTabComponent() : getTabGridComponent()), /*#__PURE__*/react.createElement(Separator_Separator, {
|
|
197659
197719
|
orientation: "horizontal",
|
|
197660
197720
|
className: "bg-black",
|
|
197661
197721
|
thickness: "2px"
|
|
@@ -197667,10 +197727,7 @@ const SidePanel = ({
|
|
|
197667
197727
|
}, panelOpen ? /*#__PURE__*/react.createElement(react.Fragment, null, getOpenStateComponent(), tabs.map((tab, tabIndex) => {
|
|
197668
197728
|
if (tabIndex === activeTabIndex) {
|
|
197669
197729
|
return /*#__PURE__*/react.createElement(tab.content, {
|
|
197670
|
-
key: tabIndex
|
|
197671
|
-
getCloseIcon: getCloseIcon,
|
|
197672
|
-
tab: tab,
|
|
197673
|
-
renderHeader: renderHeader
|
|
197730
|
+
key: tabIndex
|
|
197674
197731
|
});
|
|
197675
197732
|
}
|
|
197676
197733
|
return null;
|
|
@@ -197756,1006 +197813,6 @@ DisplaySetMessageListTooltip.propTypes = {
|
|
|
197756
197813
|
;// CONCATENATED MODULE: ../../ui-next/src/components/DisplaySetMessageListTooltip/index.ts
|
|
197757
197814
|
|
|
197758
197815
|
|
|
197759
|
-
;// CONCATENATED MODULE: ../../ui-next/src/components/Thumbnail/Thumbnail.tsx
|
|
197760
|
-
|
|
197761
|
-
|
|
197762
|
-
|
|
197763
|
-
|
|
197764
|
-
|
|
197765
|
-
|
|
197766
|
-
|
|
197767
|
-
|
|
197768
|
-
/**
|
|
197769
|
-
* Display a thumbnail for a display set.
|
|
197770
|
-
*/
|
|
197771
|
-
const Thumbnail = ({
|
|
197772
|
-
displaySetInstanceUID,
|
|
197773
|
-
className,
|
|
197774
|
-
imageSrc,
|
|
197775
|
-
imageAltText,
|
|
197776
|
-
description,
|
|
197777
|
-
seriesNumber,
|
|
197778
|
-
numInstances,
|
|
197779
|
-
loadingProgress,
|
|
197780
|
-
countIcon,
|
|
197781
|
-
messages,
|
|
197782
|
-
dragData = {},
|
|
197783
|
-
isActive,
|
|
197784
|
-
onClick,
|
|
197785
|
-
onDoubleClick,
|
|
197786
|
-
viewPreset = 'thumbnails',
|
|
197787
|
-
modality,
|
|
197788
|
-
isHydratedForDerivedDisplaySet = false,
|
|
197789
|
-
canReject = false,
|
|
197790
|
-
onReject = () => {},
|
|
197791
|
-
isTracked = false,
|
|
197792
|
-
onClickUntrack = () => {}
|
|
197793
|
-
}) => {
|
|
197794
|
-
// TODO: We should wrap our thumbnail to create a "DraggableThumbnail", as
|
|
197795
|
-
// this will still allow for "drag", even if there is no drop target for the
|
|
197796
|
-
// specified item.
|
|
197797
|
-
const [collectedProps, drag, dragPreview] = (0,esm/* useDrag */.i3)({
|
|
197798
|
-
type: 'displayset',
|
|
197799
|
-
item: {
|
|
197800
|
-
...dragData
|
|
197801
|
-
},
|
|
197802
|
-
canDrag: function (monitor) {
|
|
197803
|
-
return Object.keys(dragData).length !== 0;
|
|
197804
|
-
}
|
|
197805
|
-
});
|
|
197806
|
-
const [lastTap, setLastTap] = (0,react.useState)(0);
|
|
197807
|
-
const handleTouchEnd = e => {
|
|
197808
|
-
const currentTime = new Date().getTime();
|
|
197809
|
-
const tapLength = currentTime - lastTap;
|
|
197810
|
-
if (tapLength < 300 && tapLength > 0) {
|
|
197811
|
-
onDoubleClick(e);
|
|
197812
|
-
} else {
|
|
197813
|
-
onClick(e);
|
|
197814
|
-
}
|
|
197815
|
-
setLastTap(currentTime);
|
|
197816
|
-
};
|
|
197817
|
-
const renderThumbnailPreset = () => {
|
|
197818
|
-
return /*#__PURE__*/react.createElement("div", {
|
|
197819
|
-
className: "flex h-full w-full flex-col items-center justify-center gap-[2px] p-[4px]"
|
|
197820
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
197821
|
-
className: "h-[114px] w-[128px]"
|
|
197822
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
197823
|
-
className: "relative"
|
|
197824
|
-
}, imageSrc ? /*#__PURE__*/react.createElement("img", {
|
|
197825
|
-
src: imageSrc,
|
|
197826
|
-
alt: imageAltText,
|
|
197827
|
-
className: "h-[114px] w-[128px] rounded",
|
|
197828
|
-
crossOrigin: "anonymous"
|
|
197829
|
-
}) : /*#__PURE__*/react.createElement("div", {
|
|
197830
|
-
className: "bg-background h-[114px] w-[128px] rounded"
|
|
197831
|
-
}), /*#__PURE__*/react.createElement("div", {
|
|
197832
|
-
className: "bg-muted absolute bottom-0 left-0 flex h-[14px] items-center gap-[4px] p-[4px]"
|
|
197833
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
197834
|
-
className: classnames_default()('h-[10px] w-[10px] rounded-[2px]', isActive || isHydratedForDerivedDisplaySet ? 'bg-highlight' : 'bg-primary/65', loadingProgress && loadingProgress < 1 && 'bg-primary/25')
|
|
197835
|
-
}), /*#__PURE__*/react.createElement("div", {
|
|
197836
|
-
className: "text-[11px] text-white"
|
|
197837
|
-
}, modality)), /*#__PURE__*/react.createElement("div", {
|
|
197838
|
-
className: "absolute top-0 right-0 flex items-center gap-[4px]"
|
|
197839
|
-
}, /*#__PURE__*/react.createElement(DisplaySetMessageListTooltip, {
|
|
197840
|
-
messages: messages,
|
|
197841
|
-
id: `display-set-tooltip-${displaySetInstanceUID}`
|
|
197842
|
-
}), canReject && /*#__PURE__*/react.createElement(Icons_Icons.Trash, {
|
|
197843
|
-
className: "h-[20px] w-[20px] text-red-500",
|
|
197844
|
-
onClick: onReject
|
|
197845
|
-
}), isTracked && /*#__PURE__*/react.createElement(Tooltip_TooltipProvider, null, /*#__PURE__*/react.createElement(Tooltip_Tooltip, null, /*#__PURE__*/react.createElement(Tooltip_TooltipTrigger, null, /*#__PURE__*/react.createElement("div", {
|
|
197846
|
-
className: "group"
|
|
197847
|
-
}, /*#__PURE__*/react.createElement(Icons_Icons.StatusTracking, {
|
|
197848
|
-
className: "text-primary-light h-[20px] w-[20px] group-hover:hidden"
|
|
197849
|
-
}), /*#__PURE__*/react.createElement(Icons_Icons.Cancel, {
|
|
197850
|
-
className: "text-primary-light hidden h-[15px] w-[15px] group-hover:block",
|
|
197851
|
-
onClick: onClickUntrack
|
|
197852
|
-
}))), /*#__PURE__*/react.createElement(Tooltip_TooltipContent, {
|
|
197853
|
-
side: "right"
|
|
197854
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
197855
|
-
className: "flex flex-1 flex-row"
|
|
197856
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
197857
|
-
className: "flex-2 flex items-center justify-center pr-4"
|
|
197858
|
-
}, /*#__PURE__*/react.createElement(Icons_Icons.InfoLink, {
|
|
197859
|
-
className: "text-primary-active"
|
|
197860
|
-
})), /*#__PURE__*/react.createElement("div", {
|
|
197861
|
-
className: "flex flex-1 flex-col"
|
|
197862
|
-
}, /*#__PURE__*/react.createElement("span", null, /*#__PURE__*/react.createElement("span", {
|
|
197863
|
-
className: "text-white"
|
|
197864
|
-
}, isTracked ? 'Series is tracked' : 'Series is untracked')))))))))), /*#__PURE__*/react.createElement("div", {
|
|
197865
|
-
className: "flex h-[52px] w-[128px] flex-col"
|
|
197866
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
197867
|
-
className: "text-[12px] text-white"
|
|
197868
|
-
}, description), /*#__PURE__*/react.createElement("div", {
|
|
197869
|
-
className: "flex h-[12px] items-center gap-[7px] overflow-hidden"
|
|
197870
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
197871
|
-
className: "text-muted-foreground text-[12px]"
|
|
197872
|
-
}, " S:", seriesNumber), /*#__PURE__*/react.createElement("div", {
|
|
197873
|
-
className: "text-muted-foreground text-[12px]"
|
|
197874
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
197875
|
-
className: "flex items-center gap-[4px]"
|
|
197876
|
-
}, ' ', countIcon ? ( /*#__PURE__*/react.createElement(Icons_Icons[countIcon] || Icons_Icons.MissingIcon, {
|
|
197877
|
-
className: 'w-3'
|
|
197878
|
-
})) : /*#__PURE__*/react.createElement(Icons_Icons.InfoSeries, {
|
|
197879
|
-
className: "w-3"
|
|
197880
|
-
}), /*#__PURE__*/react.createElement("div", null, numInstances))))));
|
|
197881
|
-
};
|
|
197882
|
-
const renderListPreset = () => {
|
|
197883
|
-
return /*#__PURE__*/react.createElement("div", {
|
|
197884
|
-
className: "flex h-full w-full items-center justify-between pr-[8px] pl-[8px] pt-[4px] pb-[4px]"
|
|
197885
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
197886
|
-
className: "relative flex h-[32px] items-center gap-[8px]"
|
|
197887
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
197888
|
-
className: classnames_default()('h-[32px] w-[4px] rounded-[2px]', isActive || isHydratedForDerivedDisplaySet ? 'bg-highlight' : 'bg-primary/65', loadingProgress && loadingProgress < 1 && 'bg-primary/25')
|
|
197889
|
-
}), /*#__PURE__*/react.createElement("div", {
|
|
197890
|
-
className: "flex h-full flex-col"
|
|
197891
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
197892
|
-
className: "flex items-center gap-[7px]"
|
|
197893
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
197894
|
-
className: "text-[13px] text-white"
|
|
197895
|
-
}, modality), /*#__PURE__*/react.createElement("div", {
|
|
197896
|
-
className: "max-w-[160px] overflow-hidden overflow-ellipsis whitespace-nowrap text-[13px] text-white"
|
|
197897
|
-
}, description)), /*#__PURE__*/react.createElement("div", {
|
|
197898
|
-
className: "flex h-[12px] items-center gap-[7px] overflow-hidden"
|
|
197899
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
197900
|
-
className: "text-muted-foreground text-[12px]"
|
|
197901
|
-
}, " S:", seriesNumber), /*#__PURE__*/react.createElement("div", {
|
|
197902
|
-
className: "text-muted-foreground text-[12px]"
|
|
197903
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
197904
|
-
className: "flex items-center gap-[4px]"
|
|
197905
|
-
}, ' ', countIcon ? ( /*#__PURE__*/react.createElement(Icons_Icons[countIcon] || Icons_Icons.MissingIcon, {
|
|
197906
|
-
className: 'w-3'
|
|
197907
|
-
})) : /*#__PURE__*/react.createElement(Icons_Icons.InfoSeries, {
|
|
197908
|
-
className: "w-3"
|
|
197909
|
-
}), /*#__PURE__*/react.createElement("div", null, numInstances)))))), /*#__PURE__*/react.createElement("div", {
|
|
197910
|
-
className: "flex h-full items-center gap-[4px]"
|
|
197911
|
-
}, /*#__PURE__*/react.createElement(DisplaySetMessageListTooltip, {
|
|
197912
|
-
messages: messages,
|
|
197913
|
-
id: `display-set-tooltip-${displaySetInstanceUID}`
|
|
197914
|
-
}), canReject && /*#__PURE__*/react.createElement(Icons_Icons.Trash, {
|
|
197915
|
-
className: "h-[20px] w-[20px] text-red-500",
|
|
197916
|
-
onClick: onReject
|
|
197917
|
-
}), isTracked && /*#__PURE__*/react.createElement(Tooltip_TooltipProvider, null, /*#__PURE__*/react.createElement(Tooltip_Tooltip, null, /*#__PURE__*/react.createElement(Tooltip_TooltipTrigger, null, /*#__PURE__*/react.createElement("div", {
|
|
197918
|
-
className: "group"
|
|
197919
|
-
}, /*#__PURE__*/react.createElement(Icons_Icons.StatusTracking, {
|
|
197920
|
-
className: "text-primary-light h-[20px] w-[20px] group-hover:hidden"
|
|
197921
|
-
}), /*#__PURE__*/react.createElement(Icons_Icons.Cancel, {
|
|
197922
|
-
className: "text-primary-light hidden h-[15px] w-[15px] group-hover:block",
|
|
197923
|
-
onClick: onClickUntrack
|
|
197924
|
-
}))), /*#__PURE__*/react.createElement(Tooltip_TooltipContent, {
|
|
197925
|
-
side: "right"
|
|
197926
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
197927
|
-
className: "flex flex-1 flex-row"
|
|
197928
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
197929
|
-
className: "flex-2 flex items-center justify-center pr-4"
|
|
197930
|
-
}, /*#__PURE__*/react.createElement(Icons_Icons.InfoLink, {
|
|
197931
|
-
className: "text-primary-active"
|
|
197932
|
-
})), /*#__PURE__*/react.createElement("div", {
|
|
197933
|
-
className: "flex flex-1 flex-col"
|
|
197934
|
-
}, /*#__PURE__*/react.createElement("span", null, /*#__PURE__*/react.createElement("span", {
|
|
197935
|
-
className: "text-white"
|
|
197936
|
-
}, isTracked ? 'Series is tracked' : 'Series is untracked')))))))));
|
|
197937
|
-
};
|
|
197938
|
-
return /*#__PURE__*/react.createElement("div", {
|
|
197939
|
-
className: classnames_default()(className, 'bg-muted hover:bg-primary/30 flex cursor-pointer select-none flex-col outline-none', viewPreset === 'thumbnails' && 'h-[170px] w-[135px]', viewPreset === 'list' && 'h-[40px] w-[275px]'),
|
|
197940
|
-
id: `thumbnail-${displaySetInstanceUID}`,
|
|
197941
|
-
"data-cy": `study-browser-thumbnail`,
|
|
197942
|
-
"data-series": seriesNumber,
|
|
197943
|
-
onClick: onClick,
|
|
197944
|
-
onDoubleClick: onDoubleClick,
|
|
197945
|
-
onTouchEnd: handleTouchEnd,
|
|
197946
|
-
role: "button"
|
|
197947
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
197948
|
-
ref: drag,
|
|
197949
|
-
className: "h-full w-full"
|
|
197950
|
-
}, viewPreset === 'thumbnails' && renderThumbnailPreset(), viewPreset === 'list' && renderListPreset()));
|
|
197951
|
-
};
|
|
197952
|
-
Thumbnail.propTypes = {
|
|
197953
|
-
displaySetInstanceUID: (prop_types_default()).string.isRequired,
|
|
197954
|
-
className: (prop_types_default()).string,
|
|
197955
|
-
imageSrc: (prop_types_default()).string,
|
|
197956
|
-
/**
|
|
197957
|
-
* Data the thumbnail should expose to a receiving drop target. Use a matching
|
|
197958
|
-
* `dragData.type` to identify which targets can receive this draggable item.
|
|
197959
|
-
* If this is not set, drag-n-drop will be disabled for this thumbnail.
|
|
197960
|
-
*
|
|
197961
|
-
* Ref: https://react-dnd.github.io/react-dnd/docs/api/use-drag#specification-object-members
|
|
197962
|
-
*/
|
|
197963
|
-
dragData: prop_types_default().shape({
|
|
197964
|
-
/** Must match the "type" a dropTarget expects */
|
|
197965
|
-
type: (prop_types_default()).string.isRequired
|
|
197966
|
-
}),
|
|
197967
|
-
imageAltText: (prop_types_default()).string,
|
|
197968
|
-
description: (prop_types_default()).string.isRequired,
|
|
197969
|
-
seriesNumber: (prop_types_default()).any,
|
|
197970
|
-
numInstances: (prop_types_default()).number.isRequired,
|
|
197971
|
-
loadingProgress: (prop_types_default()).number,
|
|
197972
|
-
messages: (prop_types_default()).object,
|
|
197973
|
-
isActive: (prop_types_default()).bool.isRequired,
|
|
197974
|
-
onClick: (prop_types_default()).func.isRequired,
|
|
197975
|
-
onDoubleClick: (prop_types_default()).func.isRequired,
|
|
197976
|
-
viewPreset: (prop_types_default()).string,
|
|
197977
|
-
modality: (prop_types_default()).string,
|
|
197978
|
-
isHydratedForDerivedDisplaySet: (prop_types_default()).bool,
|
|
197979
|
-
canReject: (prop_types_default()).bool,
|
|
197980
|
-
onReject: (prop_types_default()).func,
|
|
197981
|
-
isTracked: (prop_types_default()).bool,
|
|
197982
|
-
onClickUntrack: (prop_types_default()).func,
|
|
197983
|
-
countIcon: (prop_types_default()).string
|
|
197984
|
-
};
|
|
197985
|
-
|
|
197986
|
-
;// CONCATENATED MODULE: ../../ui-next/src/components/Thumbnail/index.ts
|
|
197987
|
-
|
|
197988
|
-
|
|
197989
|
-
;// CONCATENATED MODULE: ../../ui-next/src/components/ThumbnailList/ThumbnailList.tsx
|
|
197990
|
-
|
|
197991
|
-
|
|
197992
|
-
|
|
197993
|
-
const ThumbnailList = ({
|
|
197994
|
-
thumbnails,
|
|
197995
|
-
onThumbnailClick,
|
|
197996
|
-
onThumbnailDoubleClick,
|
|
197997
|
-
onClickUntrack,
|
|
197998
|
-
activeDisplaySetInstanceUIDs = [],
|
|
197999
|
-
viewPreset
|
|
198000
|
-
}) => {
|
|
198001
|
-
return /*#__PURE__*/react.createElement("div", {
|
|
198002
|
-
id: "ohif-thumbnail-list",
|
|
198003
|
-
className: `ohif-scrollbar bg-bkg-low grid place-items-center overflow-y-hidden pt-[4px] pr-[2.5px] pl-[2.5px] ${viewPreset === 'thumbnails' ? 'grid-cols-2 gap-[4px] pb-[12px]' : 'grid-cols-1 gap-[2px]'}`
|
|
198004
|
-
}, thumbnails.map(({
|
|
198005
|
-
displaySetInstanceUID,
|
|
198006
|
-
description,
|
|
198007
|
-
dragData,
|
|
198008
|
-
seriesNumber,
|
|
198009
|
-
numInstances,
|
|
198010
|
-
loadingProgress,
|
|
198011
|
-
modality,
|
|
198012
|
-
componentType,
|
|
198013
|
-
seriesDate,
|
|
198014
|
-
countIcon,
|
|
198015
|
-
isTracked,
|
|
198016
|
-
canReject,
|
|
198017
|
-
onReject,
|
|
198018
|
-
imageSrc,
|
|
198019
|
-
messages,
|
|
198020
|
-
imageAltText,
|
|
198021
|
-
isHydratedForDerivedDisplaySet
|
|
198022
|
-
}) => {
|
|
198023
|
-
const isActive = activeDisplaySetInstanceUIDs.includes(displaySetInstanceUID);
|
|
198024
|
-
switch (componentType) {
|
|
198025
|
-
case 'thumbnail':
|
|
198026
|
-
return /*#__PURE__*/react.createElement(Thumbnail, {
|
|
198027
|
-
key: displaySetInstanceUID,
|
|
198028
|
-
displaySetInstanceUID: displaySetInstanceUID,
|
|
198029
|
-
dragData: dragData,
|
|
198030
|
-
description: description,
|
|
198031
|
-
seriesNumber: seriesNumber,
|
|
198032
|
-
numInstances: numInstances || 1,
|
|
198033
|
-
countIcon: countIcon,
|
|
198034
|
-
imageSrc: imageSrc,
|
|
198035
|
-
imageAltText: imageAltText,
|
|
198036
|
-
messages: messages,
|
|
198037
|
-
isActive: isActive,
|
|
198038
|
-
onClick: () => onThumbnailClick(displaySetInstanceUID),
|
|
198039
|
-
onDoubleClick: () => onThumbnailDoubleClick(displaySetInstanceUID),
|
|
198040
|
-
viewPreset: viewPreset,
|
|
198041
|
-
modality: modality
|
|
198042
|
-
});
|
|
198043
|
-
case 'thumbnailTracked':
|
|
198044
|
-
return /*#__PURE__*/react.createElement(Thumbnail, {
|
|
198045
|
-
key: displaySetInstanceUID,
|
|
198046
|
-
displaySetInstanceUID: displaySetInstanceUID,
|
|
198047
|
-
dragData: dragData,
|
|
198048
|
-
description: description,
|
|
198049
|
-
seriesNumber: seriesNumber,
|
|
198050
|
-
numInstances: numInstances,
|
|
198051
|
-
loadingProgress: loadingProgress,
|
|
198052
|
-
countIcon: countIcon,
|
|
198053
|
-
imageSrc: imageSrc,
|
|
198054
|
-
imageAltText: imageAltText,
|
|
198055
|
-
messages: messages,
|
|
198056
|
-
isTracked: isTracked,
|
|
198057
|
-
isActive: isActive,
|
|
198058
|
-
onClick: () => onThumbnailClick(displaySetInstanceUID),
|
|
198059
|
-
onDoubleClick: () => onThumbnailDoubleClick(displaySetInstanceUID),
|
|
198060
|
-
onClickUntrack: () => onClickUntrack(displaySetInstanceUID),
|
|
198061
|
-
viewPreset: viewPreset,
|
|
198062
|
-
modality: modality
|
|
198063
|
-
});
|
|
198064
|
-
case 'thumbnailNoImage':
|
|
198065
|
-
return /*#__PURE__*/react.createElement(Thumbnail, {
|
|
198066
|
-
isActive: isActive,
|
|
198067
|
-
key: displaySetInstanceUID,
|
|
198068
|
-
displaySetInstanceUID: displaySetInstanceUID,
|
|
198069
|
-
dragData: dragData,
|
|
198070
|
-
modality: modality,
|
|
198071
|
-
messages: messages,
|
|
198072
|
-
description: description,
|
|
198073
|
-
onClick: () => onThumbnailClick(displaySetInstanceUID),
|
|
198074
|
-
onDoubleClick: () => onThumbnailDoubleClick(displaySetInstanceUID),
|
|
198075
|
-
viewPreset: viewPreset,
|
|
198076
|
-
countIcon: countIcon,
|
|
198077
|
-
seriesNumber: seriesNumber,
|
|
198078
|
-
numInstances: numInstances || 1,
|
|
198079
|
-
isHydratedForDerivedDisplaySet: isHydratedForDerivedDisplaySet,
|
|
198080
|
-
canReject: canReject,
|
|
198081
|
-
onReject: onReject
|
|
198082
|
-
});
|
|
198083
|
-
default:
|
|
198084
|
-
return /*#__PURE__*/react.createElement(react.Fragment, null);
|
|
198085
|
-
}
|
|
198086
|
-
}));
|
|
198087
|
-
};
|
|
198088
|
-
ThumbnailList.propTypes = {
|
|
198089
|
-
thumbnails: prop_types_default().arrayOf(prop_types_default().shape({
|
|
198090
|
-
displaySetInstanceUID: (prop_types_default()).string.isRequired,
|
|
198091
|
-
imageSrc: (prop_types_default()).string,
|
|
198092
|
-
imageAltText: (prop_types_default()).string,
|
|
198093
|
-
seriesDate: (prop_types_default()).string,
|
|
198094
|
-
seriesNumber: (prop_types_default()).any,
|
|
198095
|
-
numInstances: (prop_types_default()).number,
|
|
198096
|
-
description: (prop_types_default()).string,
|
|
198097
|
-
componentType: (prop_types_default()).any,
|
|
198098
|
-
isTracked: (prop_types_default()).bool,
|
|
198099
|
-
/**
|
|
198100
|
-
* Data the thumbnail should expose to a receiving drop target. Use a matching
|
|
198101
|
-
* `dragData.type` to identify which targets can receive this draggable item.
|
|
198102
|
-
* If this is not set, drag-n-drop will be disabled for this thumbnail.
|
|
198103
|
-
*
|
|
198104
|
-
* Ref: https://react-dnd.github.io/react-dnd/docs/api/use-drag#specification-object-members
|
|
198105
|
-
*/
|
|
198106
|
-
dragData: prop_types_default().shape({
|
|
198107
|
-
/** Must match the "type" a dropTarget expects */
|
|
198108
|
-
type: (prop_types_default()).string.isRequired
|
|
198109
|
-
})
|
|
198110
|
-
})),
|
|
198111
|
-
activeDisplaySetInstanceUIDs: prop_types_default().arrayOf((prop_types_default()).string),
|
|
198112
|
-
onThumbnailClick: (prop_types_default()).func.isRequired,
|
|
198113
|
-
onThumbnailDoubleClick: (prop_types_default()).func.isRequired,
|
|
198114
|
-
onClickUntrack: (prop_types_default()).func.isRequired,
|
|
198115
|
-
viewPreset: (prop_types_default()).string
|
|
198116
|
-
};
|
|
198117
|
-
|
|
198118
|
-
;// CONCATENATED MODULE: ../../ui-next/src/components/ThumbnailList/index.ts
|
|
198119
|
-
|
|
198120
|
-
|
|
198121
|
-
;// CONCATENATED MODULE: ../../ui-next/src/components/StudyItem/StudyItem.tsx
|
|
198122
|
-
|
|
198123
|
-
|
|
198124
|
-
|
|
198125
|
-
|
|
198126
|
-
|
|
198127
|
-
const StudyItem = ({
|
|
198128
|
-
date,
|
|
198129
|
-
description,
|
|
198130
|
-
numInstances,
|
|
198131
|
-
modalities,
|
|
198132
|
-
isActive,
|
|
198133
|
-
onClick,
|
|
198134
|
-
isExpanded,
|
|
198135
|
-
displaySets,
|
|
198136
|
-
activeDisplaySetInstanceUIDs,
|
|
198137
|
-
onClickThumbnail,
|
|
198138
|
-
onDoubleClickThumbnail,
|
|
198139
|
-
onClickUntrack,
|
|
198140
|
-
viewPreset = 'thumbnails'
|
|
198141
|
-
}) => {
|
|
198142
|
-
return /*#__PURE__*/react.createElement(Accordion_Accordion, {
|
|
198143
|
-
type: "single",
|
|
198144
|
-
collapsible: true,
|
|
198145
|
-
onClick: onClick,
|
|
198146
|
-
onKeyDown: onClick,
|
|
198147
|
-
role: "button",
|
|
198148
|
-
tabIndex: 0,
|
|
198149
|
-
defaultValue: isActive ? 'study-item' : undefined
|
|
198150
|
-
}, /*#__PURE__*/react.createElement(Accordion_AccordionItem, {
|
|
198151
|
-
value: "study-item"
|
|
198152
|
-
}, /*#__PURE__*/react.createElement(Accordion_AccordionTrigger, {
|
|
198153
|
-
className: classnames_default()('hover:bg-accent bg-popover rounded')
|
|
198154
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
198155
|
-
className: "flex h-[40px] flex-1 flex-row"
|
|
198156
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
198157
|
-
className: "flex w-full flex-row items-center justify-between"
|
|
198158
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
198159
|
-
className: "flex flex-col items-start text-[13px]"
|
|
198160
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
198161
|
-
className: "text-white"
|
|
198162
|
-
}, date), /*#__PURE__*/react.createElement("div", {
|
|
198163
|
-
className: "text-muted-foreground max-w-[160px] overflow-hidden truncate whitespace-nowrap"
|
|
198164
|
-
}, description)), /*#__PURE__*/react.createElement("div", {
|
|
198165
|
-
className: "text-muted-foreground mr-2 flex flex-col items-end text-[12px]"
|
|
198166
|
-
}, /*#__PURE__*/react.createElement("div", null, modalities), /*#__PURE__*/react.createElement("div", null, numInstances))))), /*#__PURE__*/react.createElement(Accordion_AccordionContent, {
|
|
198167
|
-
onClick: event => {
|
|
198168
|
-
event.stopPropagation();
|
|
198169
|
-
}
|
|
198170
|
-
}, isExpanded && displaySets && /*#__PURE__*/react.createElement(ThumbnailList, {
|
|
198171
|
-
thumbnails: displaySets,
|
|
198172
|
-
activeDisplaySetInstanceUIDs: activeDisplaySetInstanceUIDs,
|
|
198173
|
-
onThumbnailClick: onClickThumbnail,
|
|
198174
|
-
onThumbnailDoubleClick: onDoubleClickThumbnail,
|
|
198175
|
-
onClickUntrack: onClickUntrack,
|
|
198176
|
-
viewPreset: viewPreset
|
|
198177
|
-
}))));
|
|
198178
|
-
};
|
|
198179
|
-
StudyItem.propTypes = {
|
|
198180
|
-
date: (prop_types_default()).string.isRequired,
|
|
198181
|
-
description: (prop_types_default()).string,
|
|
198182
|
-
modalities: (prop_types_default()).string.isRequired,
|
|
198183
|
-
numInstances: (prop_types_default()).number.isRequired,
|
|
198184
|
-
trackedSeries: (prop_types_default()).number,
|
|
198185
|
-
isActive: (prop_types_default()).bool,
|
|
198186
|
-
onClick: (prop_types_default()).func.isRequired,
|
|
198187
|
-
isExpanded: (prop_types_default()).bool,
|
|
198188
|
-
displaySets: (prop_types_default()).array,
|
|
198189
|
-
activeDisplaySetInstanceUIDs: (prop_types_default()).array,
|
|
198190
|
-
onClickThumbnail: (prop_types_default()).func,
|
|
198191
|
-
onDoubleClickThumbnail: (prop_types_default()).func,
|
|
198192
|
-
onClickUntrack: (prop_types_default()).func,
|
|
198193
|
-
viewPreset: (prop_types_default()).string
|
|
198194
|
-
};
|
|
198195
|
-
|
|
198196
|
-
;// CONCATENATED MODULE: ../../ui-next/src/components/StudyItem/index.ts
|
|
198197
|
-
|
|
198198
|
-
|
|
198199
|
-
;// CONCATENATED MODULE: ../../ui-next/src/components/StudyBrowserSort/StudyBrowserSort.tsx
|
|
198200
|
-
|
|
198201
|
-
|
|
198202
|
-
function StudyBrowserSort({
|
|
198203
|
-
servicesManager
|
|
198204
|
-
}) {
|
|
198205
|
-
const {
|
|
198206
|
-
customizationService,
|
|
198207
|
-
displaySetService
|
|
198208
|
-
} = servicesManager.services;
|
|
198209
|
-
const {
|
|
198210
|
-
values: sortFunctions
|
|
198211
|
-
} = customizationService.get('studyBrowser.sortFunctions');
|
|
198212
|
-
const [selectedSort, setSelectedSort] = (0,react.useState)(sortFunctions[0]);
|
|
198213
|
-
const [sortDirection, setSortDirection] = (0,react.useState)('ascending');
|
|
198214
|
-
const handleSortChange = event => {
|
|
198215
|
-
const selectedSortFunction = sortFunctions.find(sort => sort.label === event.target.value);
|
|
198216
|
-
setSelectedSort(selectedSortFunction);
|
|
198217
|
-
};
|
|
198218
|
-
const toggleSortDirection = e => {
|
|
198219
|
-
e.stopPropagation();
|
|
198220
|
-
setSortDirection(prevDirection => prevDirection === 'ascending' ? 'descending' : 'ascending');
|
|
198221
|
-
};
|
|
198222
|
-
(0,react.useEffect)(() => {
|
|
198223
|
-
displaySetService.sortDisplaySets(selectedSort.sortFunction, sortDirection);
|
|
198224
|
-
}, [displaySetService, selectedSort, sortDirection]);
|
|
198225
|
-
(0,react.useEffect)(() => {
|
|
198226
|
-
const SubscriptionDisplaySetsChanged = displaySetService.subscribe(displaySetService.EVENTS.DISPLAY_SETS_CHANGED, () => {
|
|
198227
|
-
displaySetService.sortDisplaySets(selectedSort.sortFunction, sortDirection, true);
|
|
198228
|
-
});
|
|
198229
|
-
const SubscriptionDisplaySetMetaDataInvalidated = displaySetService.subscribe(displaySetService.EVENTS.DISPLAY_SET_SERIES_METADATA_INVALIDATED, () => {
|
|
198230
|
-
displaySetService.sortDisplaySets(selectedSort.sortFunction, sortDirection, true);
|
|
198231
|
-
});
|
|
198232
|
-
return () => {
|
|
198233
|
-
SubscriptionDisplaySetsChanged.unsubscribe();
|
|
198234
|
-
SubscriptionDisplaySetMetaDataInvalidated.unsubscribe();
|
|
198235
|
-
};
|
|
198236
|
-
}, [displaySetService, selectedSort, sortDirection]);
|
|
198237
|
-
return /*#__PURE__*/react.createElement("div", {
|
|
198238
|
-
className: "border-inputfield-main focus:border-inputfield-main flex h-[26px] w-[125px] items-center justify-center rounded border bg-black p-2"
|
|
198239
|
-
}, /*#__PURE__*/react.createElement("select", {
|
|
198240
|
-
onChange: handleSortChange,
|
|
198241
|
-
value: selectedSort.label,
|
|
198242
|
-
onClick: e => e.stopPropagation(),
|
|
198243
|
-
className: "w-full appearance-none bg-transparent text-sm leading-tight text-white shadow transition duration-300 focus:outline-none"
|
|
198244
|
-
}, sortFunctions.map(sort => /*#__PURE__*/react.createElement("option", {
|
|
198245
|
-
className: "appearance-none bg-black text-white",
|
|
198246
|
-
value: sort.label,
|
|
198247
|
-
key: sort.label
|
|
198248
|
-
}, sort.label))), /*#__PURE__*/react.createElement("button", {
|
|
198249
|
-
onClick: toggleSortDirection,
|
|
198250
|
-
className: "flex items-center justify-center"
|
|
198251
|
-
}, sortDirection === 'ascending' ? /*#__PURE__*/react.createElement(Icons_Icons.SortingAscending, {
|
|
198252
|
-
className: "text-primary-main w-2"
|
|
198253
|
-
}) : /*#__PURE__*/react.createElement(Icons_Icons.SortingDescending, {
|
|
198254
|
-
className: "text-primary-main w-2"
|
|
198255
|
-
})));
|
|
198256
|
-
}
|
|
198257
|
-
;// CONCATENATED MODULE: ../../ui-next/src/components/StudyBrowserSort/index.ts
|
|
198258
|
-
|
|
198259
|
-
|
|
198260
|
-
;// CONCATENATED MODULE: ../../ui-next/src/components/StudyBrowserViewOptions/StudyBrowserViewOptions.tsx
|
|
198261
|
-
|
|
198262
|
-
function StudyBrowserViewOptions({
|
|
198263
|
-
tabs,
|
|
198264
|
-
onSelectTab,
|
|
198265
|
-
activeTabName
|
|
198266
|
-
}) {
|
|
198267
|
-
const handleTabChange = tabName => {
|
|
198268
|
-
onSelectTab(tabName);
|
|
198269
|
-
};
|
|
198270
|
-
return /*#__PURE__*/react.createElement("div", {
|
|
198271
|
-
className: "border-inputfield-main focus:border-inputfield-main flex h-[26px] w-[125px] items-center justify-center rounded border bg-black p-2"
|
|
198272
|
-
}, /*#__PURE__*/react.createElement("select", {
|
|
198273
|
-
onChange: e => handleTabChange(e.target.value),
|
|
198274
|
-
value: activeTabName,
|
|
198275
|
-
onClick: e => e.stopPropagation(),
|
|
198276
|
-
className: "w-full appearance-none bg-transparent text-sm leading-tight text-white shadow transition duration-300 focus:outline-none"
|
|
198277
|
-
}, tabs.map(tab => {
|
|
198278
|
-
const {
|
|
198279
|
-
name,
|
|
198280
|
-
label,
|
|
198281
|
-
studies
|
|
198282
|
-
} = tab;
|
|
198283
|
-
const isActive = activeTabName === name;
|
|
198284
|
-
const isDisabled = !studies.length;
|
|
198285
|
-
if (isDisabled) {
|
|
198286
|
-
return null;
|
|
198287
|
-
}
|
|
198288
|
-
return /*#__PURE__*/react.createElement("option", {
|
|
198289
|
-
className: `appearance-none bg-black text-white ${isActive ? 'font-bold' : ''}`,
|
|
198290
|
-
value: name,
|
|
198291
|
-
key: name
|
|
198292
|
-
}, label);
|
|
198293
|
-
})));
|
|
198294
|
-
}
|
|
198295
|
-
;// CONCATENATED MODULE: ../../ui-next/src/components/StudyBrowserViewOptions/index.ts
|
|
198296
|
-
|
|
198297
|
-
|
|
198298
|
-
;// CONCATENATED MODULE: ../../ui-next/src/components/StudyBrowser/StudyBrowser.tsx
|
|
198299
|
-
|
|
198300
|
-
|
|
198301
|
-
|
|
198302
|
-
|
|
198303
|
-
|
|
198304
|
-
const getTrackedSeries = displaySets => {
|
|
198305
|
-
let trackedSeries = 0;
|
|
198306
|
-
displaySets.forEach(displaySet => {
|
|
198307
|
-
if (displaySet.isTracked) {
|
|
198308
|
-
trackedSeries++;
|
|
198309
|
-
}
|
|
198310
|
-
});
|
|
198311
|
-
return trackedSeries;
|
|
198312
|
-
};
|
|
198313
|
-
const noop = () => {};
|
|
198314
|
-
const StudyBrowser = ({
|
|
198315
|
-
tabs,
|
|
198316
|
-
activeTabName,
|
|
198317
|
-
expandedStudyInstanceUIDs,
|
|
198318
|
-
onClickTab = noop,
|
|
198319
|
-
onClickStudy = noop,
|
|
198320
|
-
onClickThumbnail = noop,
|
|
198321
|
-
onDoubleClickThumbnail = noop,
|
|
198322
|
-
onClickUntrack = noop,
|
|
198323
|
-
activeDisplaySetInstanceUIDs,
|
|
198324
|
-
servicesManager,
|
|
198325
|
-
showSettings,
|
|
198326
|
-
viewPresets
|
|
198327
|
-
}) => {
|
|
198328
|
-
const getTabContent = () => {
|
|
198329
|
-
const tabData = tabs.find(tab => tab.name === activeTabName);
|
|
198330
|
-
const viewPreset = viewPresets ? viewPresets.filter(preset => preset.selected)[0]?.id : 'thumbnails';
|
|
198331
|
-
return tabData.studies.map(({
|
|
198332
|
-
studyInstanceUid,
|
|
198333
|
-
date,
|
|
198334
|
-
description,
|
|
198335
|
-
numInstances,
|
|
198336
|
-
modalities,
|
|
198337
|
-
displaySets
|
|
198338
|
-
}) => {
|
|
198339
|
-
const isExpanded = expandedStudyInstanceUIDs.includes(studyInstanceUid);
|
|
198340
|
-
return /*#__PURE__*/react.createElement(react.Fragment, {
|
|
198341
|
-
key: studyInstanceUid
|
|
198342
|
-
}, /*#__PURE__*/react.createElement(StudyItem, {
|
|
198343
|
-
date: date,
|
|
198344
|
-
description: description,
|
|
198345
|
-
numInstances: numInstances,
|
|
198346
|
-
isExpanded: isExpanded,
|
|
198347
|
-
displaySets: displaySets,
|
|
198348
|
-
modalities: modalities,
|
|
198349
|
-
trackedSeries: getTrackedSeries(displaySets),
|
|
198350
|
-
isActive: isExpanded,
|
|
198351
|
-
onClick: () => {
|
|
198352
|
-
onClickStudy(studyInstanceUid);
|
|
198353
|
-
},
|
|
198354
|
-
onClickThumbnail: onClickThumbnail,
|
|
198355
|
-
onDoubleClickThumbnail: onDoubleClickThumbnail,
|
|
198356
|
-
onClickUntrack: onClickUntrack,
|
|
198357
|
-
activeDisplaySetInstanceUIDs: activeDisplaySetInstanceUIDs,
|
|
198358
|
-
"data-cy": "thumbnail-list",
|
|
198359
|
-
viewPreset: viewPreset
|
|
198360
|
-
}));
|
|
198361
|
-
});
|
|
198362
|
-
};
|
|
198363
|
-
return /*#__PURE__*/react.createElement(react.Fragment, null, showSettings && /*#__PURE__*/react.createElement("div", {
|
|
198364
|
-
className: "w-100 bg-bkg-low flex h-[48px] items-center justify-center gap-[10px] px-[8px] py-[10px]",
|
|
198365
|
-
"data-cy": 'studyBrowser-panel'
|
|
198366
|
-
}, /*#__PURE__*/react.createElement(StudyBrowserViewOptions, {
|
|
198367
|
-
tabs: tabs,
|
|
198368
|
-
onSelectTab: onClickTab,
|
|
198369
|
-
activeTabName: activeTabName
|
|
198370
|
-
}), /*#__PURE__*/react.createElement(StudyBrowserSort, {
|
|
198371
|
-
servicesManager: servicesManager
|
|
198372
|
-
})), /*#__PURE__*/react.createElement("div", {
|
|
198373
|
-
className: "ohif-scrollbar invisible-scrollbar bg-bkg-low flex flex-1 flex-col gap-[4px] overflow-auto"
|
|
198374
|
-
}, getTabContent()));
|
|
198375
|
-
};
|
|
198376
|
-
StudyBrowser.propTypes = {
|
|
198377
|
-
onClickTab: (prop_types_default()).func.isRequired,
|
|
198378
|
-
onClickStudy: (prop_types_default()).func,
|
|
198379
|
-
onClickThumbnail: (prop_types_default()).func,
|
|
198380
|
-
onDoubleClickThumbnail: (prop_types_default()).func,
|
|
198381
|
-
onClickUntrack: (prop_types_default()).func,
|
|
198382
|
-
activeTabName: (prop_types_default()).string.isRequired,
|
|
198383
|
-
expandedStudyInstanceUIDs: prop_types_default().arrayOf((prop_types_default()).string).isRequired,
|
|
198384
|
-
activeDisplaySetInstanceUIDs: prop_types_default().arrayOf((prop_types_default()).string),
|
|
198385
|
-
tabs: prop_types_default().arrayOf(prop_types_default().shape({
|
|
198386
|
-
name: (prop_types_default()).string.isRequired,
|
|
198387
|
-
label: (prop_types_default()).string.isRequired,
|
|
198388
|
-
studies: prop_types_default().arrayOf(prop_types_default().shape({
|
|
198389
|
-
studyInstanceUid: (prop_types_default()).string.isRequired,
|
|
198390
|
-
date: (prop_types_default()).string,
|
|
198391
|
-
numInstances: (prop_types_default()).number,
|
|
198392
|
-
modalities: (prop_types_default()).string,
|
|
198393
|
-
description: (prop_types_default()).string,
|
|
198394
|
-
displaySets: prop_types_default().arrayOf(prop_types_default().shape({
|
|
198395
|
-
displaySetInstanceUID: (prop_types_default()).string.isRequired,
|
|
198396
|
-
imageSrc: (prop_types_default()).string,
|
|
198397
|
-
imageAltText: (prop_types_default()).string,
|
|
198398
|
-
seriesDate: (prop_types_default()).string,
|
|
198399
|
-
seriesNumber: (prop_types_default()).any,
|
|
198400
|
-
numInstances: (prop_types_default()).number,
|
|
198401
|
-
description: (prop_types_default()).string,
|
|
198402
|
-
componentType: prop_types_default().oneOf(['thumbnail', 'thumbnailTracked', 'thumbnailNoImage']).isRequired,
|
|
198403
|
-
isTracked: (prop_types_default()).bool,
|
|
198404
|
-
/**
|
|
198405
|
-
* Data the thumbnail should expose to a receiving drop target. Use a matching
|
|
198406
|
-
* `dragData.type` to identify which targets can receive this draggable item.
|
|
198407
|
-
* If this is not set, drag-n-drop will be disabled for this thumbnail.
|
|
198408
|
-
*
|
|
198409
|
-
* Ref: https://react-dnd.github.io/react-dnd/docs/api/use-drag#specification-object-members
|
|
198410
|
-
*/
|
|
198411
|
-
dragData: prop_types_default().shape({
|
|
198412
|
-
/** Must match the "type" a dropTarget expects */
|
|
198413
|
-
type: (prop_types_default()).string.isRequired
|
|
198414
|
-
})
|
|
198415
|
-
}))
|
|
198416
|
-
})).isRequired
|
|
198417
|
-
}))
|
|
198418
|
-
};
|
|
198419
|
-
|
|
198420
|
-
;// CONCATENATED MODULE: ../../ui-next/src/components/StudyBrowser/index.ts
|
|
198421
|
-
|
|
198422
|
-
|
|
198423
|
-
;// CONCATENATED MODULE: ../../ui-next/src/components/PanelSection/PanelSection.tsx
|
|
198424
|
-
|
|
198425
|
-
|
|
198426
|
-
|
|
198427
|
-
const PanelSection = ({
|
|
198428
|
-
title,
|
|
198429
|
-
children,
|
|
198430
|
-
actionIcons = [],
|
|
198431
|
-
childrenClassName
|
|
198432
|
-
}) => {
|
|
198433
|
-
const [areChildrenVisible, setChildrenVisible] = (0,react.useState)(true);
|
|
198434
|
-
const handleHeaderClick = () => {
|
|
198435
|
-
setChildrenVisible(!areChildrenVisible);
|
|
198436
|
-
};
|
|
198437
|
-
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
|
198438
|
-
className: "bg-secondary-dark flex h-7 cursor-pointer select-none items-center justify-between rounded-[4px] pl-2.5 text-[13px]",
|
|
198439
|
-
onClick: handleHeaderClick
|
|
198440
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
198441
|
-
className: "text-aqua-pale"
|
|
198442
|
-
}, title), /*#__PURE__*/react.createElement("div", {
|
|
198443
|
-
className: "flex items-center space-x-1"
|
|
198444
|
-
}, actionIcons.map((icon, index) => {
|
|
198445
|
-
const Icon = Icons_Icons[icon.name];
|
|
198446
|
-
return /*#__PURE__*/react.createElement(Icon, {
|
|
198447
|
-
key: index,
|
|
198448
|
-
onClick: e => {
|
|
198449
|
-
e.stopPropagation();
|
|
198450
|
-
if (!areChildrenVisible) {
|
|
198451
|
-
setChildrenVisible(true);
|
|
198452
|
-
}
|
|
198453
|
-
icon.onClick();
|
|
198454
|
-
}
|
|
198455
|
-
});
|
|
198456
|
-
}), /*#__PURE__*/react.createElement("div", {
|
|
198457
|
-
className: "grid h-[28px] w-[28px] place-items-center"
|
|
198458
|
-
}, areChildrenVisible ? /*#__PURE__*/react.createElement(Icons_Icons.ChevronOpen, null) : /*#__PURE__*/react.createElement(Icons_Icons.ChevronClosed, null)))), areChildrenVisible && /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
|
198459
|
-
className: "h-[2px] bg-black"
|
|
198460
|
-
}), /*#__PURE__*/react.createElement("div", {
|
|
198461
|
-
className: `bg-primary-dark flex flex-col overflow-hidden rounded-b-[4px] ${childrenClassName}`
|
|
198462
|
-
}, children)));
|
|
198463
|
-
};
|
|
198464
|
-
PanelSection.propTypes = {
|
|
198465
|
-
title: (prop_types_default()).string,
|
|
198466
|
-
children: (prop_types_default()).node,
|
|
198467
|
-
childrenClassName: (prop_types_default()).string,
|
|
198468
|
-
actionIcons: prop_types_default().arrayOf(prop_types_default().shape({
|
|
198469
|
-
name: (prop_types_default()).string,
|
|
198470
|
-
onClick: (prop_types_default()).func
|
|
198471
|
-
}))
|
|
198472
|
-
};
|
|
198473
|
-
|
|
198474
|
-
;// CONCATENATED MODULE: ../../ui-next/src/components/PanelSection/index.ts
|
|
198475
|
-
|
|
198476
|
-
|
|
198477
|
-
// EXTERNAL MODULE: ../../ui/src/index.js + 691 modules
|
|
198478
|
-
var src = __webpack_require__(44657);
|
|
198479
|
-
;// CONCATENATED MODULE: ../../ui-next/src/components/Toolbox/ToolboxUI.tsx
|
|
198480
|
-
function ToolboxUI_extends() { return ToolboxUI_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, ToolboxUI_extends.apply(null, arguments); }
|
|
198481
|
-
|
|
198482
|
-
|
|
198483
|
-
// Migrate this file to the new UI eventually
|
|
198484
|
-
|
|
198485
|
-
|
|
198486
|
-
const ItemsPerRow = 4;
|
|
198487
|
-
function ToolboxUI_usePrevious(value) {
|
|
198488
|
-
const ref = (0,react.useRef)();
|
|
198489
|
-
(0,react.useEffect)(() => {
|
|
198490
|
-
ref.current = value;
|
|
198491
|
-
});
|
|
198492
|
-
return ref.current;
|
|
198493
|
-
}
|
|
198494
|
-
|
|
198495
|
-
/**
|
|
198496
|
-
* Just refactoring from the toolbox component to make it more readable
|
|
198497
|
-
*/
|
|
198498
|
-
function ToolboxUI(props) {
|
|
198499
|
-
const {
|
|
198500
|
-
toolbarButtons,
|
|
198501
|
-
handleToolSelect,
|
|
198502
|
-
toolboxState,
|
|
198503
|
-
numRows,
|
|
198504
|
-
servicesManager,
|
|
198505
|
-
title,
|
|
198506
|
-
useCollapsedPanel = true
|
|
198507
|
-
} = props;
|
|
198508
|
-
const {
|
|
198509
|
-
activeTool,
|
|
198510
|
-
toolOptions,
|
|
198511
|
-
selectedEvent
|
|
198512
|
-
} = toolboxState;
|
|
198513
|
-
const activeToolOptions = toolOptions?.[activeTool];
|
|
198514
|
-
const prevToolOptions = ToolboxUI_usePrevious(activeToolOptions);
|
|
198515
|
-
(0,react.useEffect)(() => {
|
|
198516
|
-
if (!activeToolOptions || Array.isArray(activeToolOptions) === false) {
|
|
198517
|
-
return;
|
|
198518
|
-
}
|
|
198519
|
-
activeToolOptions.forEach((option, index) => {
|
|
198520
|
-
const prevOption = prevToolOptions ? prevToolOptions[index] : undefined;
|
|
198521
|
-
if (!prevOption || option.value !== prevOption.value || selectedEvent) {
|
|
198522
|
-
const isOptionValid = option.condition ? option.condition({
|
|
198523
|
-
options: activeToolOptions
|
|
198524
|
-
}) : true;
|
|
198525
|
-
if (isOptionValid) {
|
|
198526
|
-
const {
|
|
198527
|
-
commands
|
|
198528
|
-
} = option;
|
|
198529
|
-
commands(option.value);
|
|
198530
|
-
}
|
|
198531
|
-
}
|
|
198532
|
-
});
|
|
198533
|
-
}, [activeToolOptions, selectedEvent]);
|
|
198534
|
-
const render = () => {
|
|
198535
|
-
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
|
198536
|
-
className: "flex flex-col bg-black"
|
|
198537
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
198538
|
-
className: "bg-primary-dark mt-0.5 flex flex-wrap py-2"
|
|
198539
|
-
}, toolbarButtons.map((toolDef, index) => {
|
|
198540
|
-
if (!toolDef) {
|
|
198541
|
-
return null;
|
|
198542
|
-
}
|
|
198543
|
-
const {
|
|
198544
|
-
id,
|
|
198545
|
-
Component,
|
|
198546
|
-
componentProps
|
|
198547
|
-
} = toolDef;
|
|
198548
|
-
const isLastRow = Math.floor(index / ItemsPerRow) + 1 === numRows;
|
|
198549
|
-
const toolClasses = `ml-1 ${isLastRow ? '' : 'mb-2'}`;
|
|
198550
|
-
const onInteraction = ({
|
|
198551
|
-
itemId,
|
|
198552
|
-
id,
|
|
198553
|
-
commands
|
|
198554
|
-
}) => {
|
|
198555
|
-
const idToUse = itemId || id;
|
|
198556
|
-
handleToolSelect(idToUse);
|
|
198557
|
-
props.onInteraction({
|
|
198558
|
-
itemId,
|
|
198559
|
-
commands
|
|
198560
|
-
});
|
|
198561
|
-
};
|
|
198562
|
-
return /*#__PURE__*/react.createElement("div", {
|
|
198563
|
-
key: id,
|
|
198564
|
-
className: classnames_default()({
|
|
198565
|
-
[toolClasses]: true,
|
|
198566
|
-
'border-secondary-light flex flex-col items-center justify-center rounded-md border': true
|
|
198567
|
-
})
|
|
198568
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
198569
|
-
className: "flex rounded-md bg-black"
|
|
198570
|
-
}, /*#__PURE__*/react.createElement(Component, ToolboxUI_extends({}, componentProps, props, {
|
|
198571
|
-
id: id,
|
|
198572
|
-
servicesManager: servicesManager,
|
|
198573
|
-
onInteraction: onInteraction,
|
|
198574
|
-
size: "toolbox"
|
|
198575
|
-
}))));
|
|
198576
|
-
}))), /*#__PURE__*/react.createElement("div", {
|
|
198577
|
-
className: "bg-primary-dark h-auto px-2"
|
|
198578
|
-
}, activeToolOptions && /*#__PURE__*/react.createElement(src/* ToolSettings */.TM, {
|
|
198579
|
-
options: activeToolOptions
|
|
198580
|
-
})));
|
|
198581
|
-
};
|
|
198582
|
-
return /*#__PURE__*/react.createElement(react.Fragment, null, useCollapsedPanel ? /*#__PURE__*/react.createElement(PanelSection, {
|
|
198583
|
-
childrenClassName: "flex-shrink-0",
|
|
198584
|
-
title: title
|
|
198585
|
-
}, render()) : render());
|
|
198586
|
-
}
|
|
198587
|
-
|
|
198588
|
-
// EXTERNAL MODULE: ../../core/src/index.ts + 74 modules
|
|
198589
|
-
var core_src = __webpack_require__(10541);
|
|
198590
|
-
;// CONCATENATED MODULE: ../../ui-next/src/components/Toolbox/Toolbox.tsx
|
|
198591
|
-
function Toolbox_extends() { return Toolbox_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, Toolbox_extends.apply(null, arguments); }
|
|
198592
|
-
|
|
198593
|
-
|
|
198594
|
-
|
|
198595
|
-
// Migrate this file to the new UI eventually
|
|
198596
|
-
|
|
198597
|
-
|
|
198598
|
-
|
|
198599
|
-
/**
|
|
198600
|
-
* A toolbox is a collection of buttons and commands that they invoke, used to provide
|
|
198601
|
-
* custom control panels to users. This component is a generic UI component that
|
|
198602
|
-
* interacts with services and commands in a generic fashion. While it might
|
|
198603
|
-
* seem unconventional to import it from the UI and integrate it into the JSX,
|
|
198604
|
-
* it belongs in the UI components as there isn't anything in this component that
|
|
198605
|
-
* couldn't be used for a completely different type of app. It plays a crucial
|
|
198606
|
-
* role in enhancing the app with a toolbox by providing a way to integrate
|
|
198607
|
-
* and display various tools and their corresponding options
|
|
198608
|
-
*/
|
|
198609
|
-
function Toolbox({
|
|
198610
|
-
servicesManager,
|
|
198611
|
-
buttonSectionId,
|
|
198612
|
-
commandsManager,
|
|
198613
|
-
title,
|
|
198614
|
-
renderHeader,
|
|
198615
|
-
getCloseIcon,
|
|
198616
|
-
tab,
|
|
198617
|
-
...props
|
|
198618
|
-
}) {
|
|
198619
|
-
const {
|
|
198620
|
-
state: toolboxState,
|
|
198621
|
-
api
|
|
198622
|
-
} = (0,src/* useToolbox */.Z1)(buttonSectionId);
|
|
198623
|
-
const {
|
|
198624
|
-
onInteraction,
|
|
198625
|
-
toolbarButtons
|
|
198626
|
-
} = (0,core_src/* useToolbar */.tR)({
|
|
198627
|
-
servicesManager,
|
|
198628
|
-
buttonSection: buttonSectionId
|
|
198629
|
-
});
|
|
198630
|
-
const prevButtonIdsRef = (0,react.useRef)('');
|
|
198631
|
-
const prevToolboxStateRef = (0,react.useRef)('');
|
|
198632
|
-
(0,react.useEffect)(() => {
|
|
198633
|
-
const currentButtonIdsStr = JSON.stringify(toolbarButtons.map(button => {
|
|
198634
|
-
const {
|
|
198635
|
-
id,
|
|
198636
|
-
componentProps
|
|
198637
|
-
} = button;
|
|
198638
|
-
if (componentProps.items?.length) {
|
|
198639
|
-
return componentProps.items.map(item => `${item.id}-${item.disabled}`);
|
|
198640
|
-
}
|
|
198641
|
-
return `${id}-${componentProps.disabled}`;
|
|
198642
|
-
}));
|
|
198643
|
-
const currentToolBoxStateStr = JSON.stringify(Object.keys(toolboxState.toolOptions).map(tool => {
|
|
198644
|
-
const options = toolboxState.toolOptions[tool];
|
|
198645
|
-
if (Array.isArray(options)) {
|
|
198646
|
-
return options?.map(option => `${option.id}-${option.value}`);
|
|
198647
|
-
}
|
|
198648
|
-
}));
|
|
198649
|
-
if (prevButtonIdsRef.current === currentButtonIdsStr && prevToolboxStateRef.current === currentToolBoxStateStr) {
|
|
198650
|
-
return;
|
|
198651
|
-
}
|
|
198652
|
-
prevButtonIdsRef.current = currentButtonIdsStr;
|
|
198653
|
-
prevToolboxStateRef.current = currentToolBoxStateStr;
|
|
198654
|
-
const initializeOptionsWithEnhancements = toolbarButtons.reduce((accumulator, toolbarButton) => {
|
|
198655
|
-
const {
|
|
198656
|
-
id: buttonId,
|
|
198657
|
-
componentProps
|
|
198658
|
-
} = toolbarButton;
|
|
198659
|
-
const createEnhancedOptions = (options, parentId) => {
|
|
198660
|
-
const optionsToUse = Array.isArray(options) ? options : [options];
|
|
198661
|
-
return optionsToUse.map(option => {
|
|
198662
|
-
if (typeof option.optionComponent === 'function') {
|
|
198663
|
-
return option;
|
|
198664
|
-
}
|
|
198665
|
-
const value = toolboxState.toolOptions?.[parentId]?.find(prop => prop.id === option.id)?.value ?? option.value;
|
|
198666
|
-
const updatedOptions = toolboxState.toolOptions?.[parentId];
|
|
198667
|
-
return {
|
|
198668
|
-
...option,
|
|
198669
|
-
value,
|
|
198670
|
-
commands: value => {
|
|
198671
|
-
api.handleToolOptionChange(parentId, option.id, value);
|
|
198672
|
-
const {
|
|
198673
|
-
isArray
|
|
198674
|
-
} = Array;
|
|
198675
|
-
const cmds = isArray(option.commands) ? option.commands : [option.commands];
|
|
198676
|
-
cmds.forEach(command => {
|
|
198677
|
-
const isString = typeof command === 'string';
|
|
198678
|
-
const isObject = typeof command === 'object';
|
|
198679
|
-
const isFunction = typeof command === 'function';
|
|
198680
|
-
if (isString) {
|
|
198681
|
-
commandsManager.run(command, {
|
|
198682
|
-
value
|
|
198683
|
-
});
|
|
198684
|
-
} else if (isObject) {
|
|
198685
|
-
commandsManager.run({
|
|
198686
|
-
...command,
|
|
198687
|
-
commandOptions: {
|
|
198688
|
-
...command.commandOptions,
|
|
198689
|
-
...option,
|
|
198690
|
-
value,
|
|
198691
|
-
options: updatedOptions
|
|
198692
|
-
}
|
|
198693
|
-
});
|
|
198694
|
-
} else if (isFunction) {
|
|
198695
|
-
command({
|
|
198696
|
-
value,
|
|
198697
|
-
commandsManager,
|
|
198698
|
-
servicesManager,
|
|
198699
|
-
options: updatedOptions
|
|
198700
|
-
});
|
|
198701
|
-
}
|
|
198702
|
-
});
|
|
198703
|
-
}
|
|
198704
|
-
};
|
|
198705
|
-
});
|
|
198706
|
-
};
|
|
198707
|
-
const {
|
|
198708
|
-
items,
|
|
198709
|
-
options
|
|
198710
|
-
} = componentProps;
|
|
198711
|
-
if (items?.length) {
|
|
198712
|
-
items.forEach(({
|
|
198713
|
-
options,
|
|
198714
|
-
id
|
|
198715
|
-
}) => {
|
|
198716
|
-
accumulator[id] = createEnhancedOptions(options, id);
|
|
198717
|
-
});
|
|
198718
|
-
} else if (options?.length) {
|
|
198719
|
-
accumulator[buttonId] = createEnhancedOptions(options, buttonId);
|
|
198720
|
-
} else if (options?.optionComponent) {
|
|
198721
|
-
accumulator[buttonId] = options.optionComponent;
|
|
198722
|
-
}
|
|
198723
|
-
return accumulator;
|
|
198724
|
-
}, {});
|
|
198725
|
-
api.initializeToolOptions(initializeOptionsWithEnhancements);
|
|
198726
|
-
}, [toolbarButtons, api, toolboxState, commandsManager, servicesManager]);
|
|
198727
|
-
const handleToolOptionChange = (toolName, optionName, newValue) => {
|
|
198728
|
-
api.handleToolOptionChange(toolName, optionName, newValue);
|
|
198729
|
-
};
|
|
198730
|
-
(0,react.useEffect)(() => {
|
|
198731
|
-
return () => {
|
|
198732
|
-
api.handleToolSelect(null);
|
|
198733
|
-
};
|
|
198734
|
-
}, []);
|
|
198735
|
-
return /*#__PURE__*/react.createElement(react.Fragment, null, renderHeader && /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
|
198736
|
-
className: "bg-primary-dark flex select-none rounded-t pt-1.5 pb-[2px]"
|
|
198737
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
198738
|
-
className: "flex h-[24px] w-full cursor-pointer select-none justify-center self-center text-[14px]"
|
|
198739
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
198740
|
-
className: "text-primary-active flex grow cursor-pointer select-none justify-center self-center text-[13px]"
|
|
198741
|
-
}, /*#__PURE__*/react.createElement("span", null, tab.label))), getCloseIcon()), /*#__PURE__*/react.createElement(Separator_Separator, {
|
|
198742
|
-
orientation: "horizontal",
|
|
198743
|
-
className: "bg-black",
|
|
198744
|
-
thickness: "2px"
|
|
198745
|
-
})), /*#__PURE__*/react.createElement(ToolboxUI, Toolbox_extends({}, props, {
|
|
198746
|
-
title: title,
|
|
198747
|
-
toolbarButtons: toolbarButtons,
|
|
198748
|
-
toolboxState: toolboxState,
|
|
198749
|
-
handleToolSelect: id => api.handleToolSelect(id),
|
|
198750
|
-
handleToolOptionChange: handleToolOptionChange,
|
|
198751
|
-
onInteraction: onInteraction
|
|
198752
|
-
})));
|
|
198753
|
-
}
|
|
198754
|
-
/* harmony default export */ const Toolbox_Toolbox = (Toolbox);
|
|
198755
|
-
;// CONCATENATED MODULE: ../../ui-next/src/components/Toolbox/index.ts
|
|
198756
|
-
|
|
198757
|
-
|
|
198758
|
-
|
|
198759
197816
|
;// CONCATENATED MODULE: ../../../node_modules/@radix-ui/react-menu/dist/index.mjs
|
|
198760
197817
|
"use client";
|
|
198761
197818
|
|
|
@@ -199973,6 +199030,1005 @@ DropdownMenuShortcut.displayName = 'DropdownMenuShortcut';
|
|
|
199973
199030
|
;// CONCATENATED MODULE: ../../ui-next/src/components/DropdownMenu/index.ts
|
|
199974
199031
|
|
|
199975
199032
|
|
|
199033
|
+
;// CONCATENATED MODULE: ../../ui-next/src/components/Thumbnail/Thumbnail.tsx
|
|
199034
|
+
|
|
199035
|
+
|
|
199036
|
+
|
|
199037
|
+
|
|
199038
|
+
|
|
199039
|
+
|
|
199040
|
+
|
|
199041
|
+
|
|
199042
|
+
|
|
199043
|
+
|
|
199044
|
+
/**
|
|
199045
|
+
* Display a thumbnail for a display set.
|
|
199046
|
+
*/
|
|
199047
|
+
const Thumbnail = ({
|
|
199048
|
+
displaySetInstanceUID,
|
|
199049
|
+
className,
|
|
199050
|
+
imageSrc,
|
|
199051
|
+
imageAltText,
|
|
199052
|
+
description,
|
|
199053
|
+
seriesNumber,
|
|
199054
|
+
numInstances,
|
|
199055
|
+
loadingProgress,
|
|
199056
|
+
countIcon,
|
|
199057
|
+
messages,
|
|
199058
|
+
dragData = {},
|
|
199059
|
+
isActive,
|
|
199060
|
+
onClick,
|
|
199061
|
+
onDoubleClick,
|
|
199062
|
+
viewPreset = 'thumbnails',
|
|
199063
|
+
modality,
|
|
199064
|
+
isHydratedForDerivedDisplaySet = false,
|
|
199065
|
+
canReject = false,
|
|
199066
|
+
onReject = () => {},
|
|
199067
|
+
isTracked = false,
|
|
199068
|
+
thumbnailType = 'thumbnail',
|
|
199069
|
+
onClickUntrack = () => {},
|
|
199070
|
+
onThumbnailContextMenu
|
|
199071
|
+
}) => {
|
|
199072
|
+
// TODO: We should wrap our thumbnail to create a "DraggableThumbnail", as
|
|
199073
|
+
// this will still allow for "drag", even if there is no drop target for the
|
|
199074
|
+
// specified item.
|
|
199075
|
+
const [collectedProps, drag, dragPreview] = (0,esm/* useDrag */.i3)({
|
|
199076
|
+
type: 'displayset',
|
|
199077
|
+
item: {
|
|
199078
|
+
...dragData
|
|
199079
|
+
},
|
|
199080
|
+
canDrag: function (monitor) {
|
|
199081
|
+
return Object.keys(dragData).length !== 0;
|
|
199082
|
+
}
|
|
199083
|
+
});
|
|
199084
|
+
const [lastTap, setLastTap] = (0,react.useState)(0);
|
|
199085
|
+
const handleTouchEnd = e => {
|
|
199086
|
+
const currentTime = new Date().getTime();
|
|
199087
|
+
const tapLength = currentTime - lastTap;
|
|
199088
|
+
if (tapLength < 300 && tapLength > 0) {
|
|
199089
|
+
onDoubleClick(e);
|
|
199090
|
+
} else {
|
|
199091
|
+
onClick(e);
|
|
199092
|
+
}
|
|
199093
|
+
setLastTap(currentTime);
|
|
199094
|
+
};
|
|
199095
|
+
const renderThumbnailPreset = () => {
|
|
199096
|
+
return /*#__PURE__*/react.createElement("div", {
|
|
199097
|
+
className: "flex h-full w-full flex-col items-center justify-center gap-[2px] p-[4px]"
|
|
199098
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199099
|
+
className: "h-[114px] w-[128px]"
|
|
199100
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199101
|
+
className: "relative"
|
|
199102
|
+
}, imageSrc ? /*#__PURE__*/react.createElement("img", {
|
|
199103
|
+
src: imageSrc,
|
|
199104
|
+
alt: imageAltText,
|
|
199105
|
+
className: "h-[114px] w-[128px] rounded",
|
|
199106
|
+
crossOrigin: "anonymous"
|
|
199107
|
+
}) : /*#__PURE__*/react.createElement("div", {
|
|
199108
|
+
className: "bg-background h-[114px] w-[128px] rounded"
|
|
199109
|
+
}), /*#__PURE__*/react.createElement("div", {
|
|
199110
|
+
className: "bg-muted absolute bottom-0 left-0 flex h-[14px] items-center gap-[4px] p-[4px]"
|
|
199111
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199112
|
+
className: classnames_default()('h-[10px] w-[10px] rounded-[2px]', isActive || isHydratedForDerivedDisplaySet ? 'bg-highlight' : 'bg-primary/65', loadingProgress && loadingProgress < 1 && 'bg-primary/25')
|
|
199113
|
+
}), /*#__PURE__*/react.createElement("div", {
|
|
199114
|
+
className: "text-[11px] text-white"
|
|
199115
|
+
}, modality)), /*#__PURE__*/react.createElement("div", {
|
|
199116
|
+
className: "absolute top-0 right-0 flex items-center gap-[4px]"
|
|
199117
|
+
}, /*#__PURE__*/react.createElement(DisplaySetMessageListTooltip, {
|
|
199118
|
+
messages: messages,
|
|
199119
|
+
id: `display-set-tooltip-${displaySetInstanceUID}`
|
|
199120
|
+
}), canReject && /*#__PURE__*/react.createElement(Icons_Icons.Trash, {
|
|
199121
|
+
className: "h-[20px] w-[20px] text-red-500",
|
|
199122
|
+
onClick: onReject
|
|
199123
|
+
}), isTracked && /*#__PURE__*/react.createElement(Tooltip_TooltipProvider, null, /*#__PURE__*/react.createElement(Tooltip_Tooltip, null, /*#__PURE__*/react.createElement(Tooltip_TooltipTrigger, null, /*#__PURE__*/react.createElement("div", {
|
|
199124
|
+
className: "group"
|
|
199125
|
+
}, /*#__PURE__*/react.createElement(Icons_Icons.StatusTracking, {
|
|
199126
|
+
className: "text-primary-light h-[20px] w-[20px] group-hover:hidden"
|
|
199127
|
+
}), /*#__PURE__*/react.createElement(Icons_Icons.Cancel, {
|
|
199128
|
+
className: "text-primary-light hidden h-[15px] w-[15px] group-hover:block",
|
|
199129
|
+
onClick: onClickUntrack
|
|
199130
|
+
}))), /*#__PURE__*/react.createElement(Tooltip_TooltipContent, {
|
|
199131
|
+
side: "right"
|
|
199132
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199133
|
+
className: "flex flex-1 flex-row"
|
|
199134
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199135
|
+
className: "flex-2 flex items-center justify-center pr-4"
|
|
199136
|
+
}, /*#__PURE__*/react.createElement(Icons_Icons.InfoLink, {
|
|
199137
|
+
className: "text-primary-active"
|
|
199138
|
+
})), /*#__PURE__*/react.createElement("div", {
|
|
199139
|
+
className: "flex flex-1 flex-col"
|
|
199140
|
+
}, /*#__PURE__*/react.createElement("span", null, /*#__PURE__*/react.createElement("span", {
|
|
199141
|
+
className: "text-white"
|
|
199142
|
+
}, isTracked ? 'Series is tracked' : 'Series is untracked')))))))), /*#__PURE__*/react.createElement("div", {
|
|
199143
|
+
className: "absolute bottom-0 right-0 flex items-center gap-[4px] p-[4px]"
|
|
199144
|
+
}, /*#__PURE__*/react.createElement(DropdownMenu_DropdownMenu, null, /*#__PURE__*/react.createElement(DropdownMenu_DropdownMenuTrigger, {
|
|
199145
|
+
asChild: true
|
|
199146
|
+
}, /*#__PURE__*/react.createElement(Button_Button, {
|
|
199147
|
+
variant: "ghost",
|
|
199148
|
+
size: "icon",
|
|
199149
|
+
className: "hidden group-hover:inline-flex data-[state=open]:inline-flex"
|
|
199150
|
+
}, /*#__PURE__*/react.createElement(Icons_Icons.More, null))), /*#__PURE__*/react.createElement(DropdownMenu_DropdownMenuContent, {
|
|
199151
|
+
asChild: true,
|
|
199152
|
+
hideWhenDetached: true
|
|
199153
|
+
}, /*#__PURE__*/react.createElement(DropdownMenu_DropdownMenuItem, {
|
|
199154
|
+
onSelect: () => {
|
|
199155
|
+
onThumbnailContextMenu('openDICOMTagViewer', {
|
|
199156
|
+
displaySetInstanceUID
|
|
199157
|
+
});
|
|
199158
|
+
},
|
|
199159
|
+
className: "gap-[6px]"
|
|
199160
|
+
}, /*#__PURE__*/react.createElement(Icons_Icons.DicomTagBrowser, null), "Tag Browser")))))), /*#__PURE__*/react.createElement("div", {
|
|
199161
|
+
className: "flex h-[52px] w-[128px] flex-col"
|
|
199162
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199163
|
+
className: "min-h-[18px] w-[128px] overflow-hidden text-ellipsis text-[12px] text-white"
|
|
199164
|
+
}, description), /*#__PURE__*/react.createElement("div", {
|
|
199165
|
+
className: "flex h-[12px] items-center gap-[7px] overflow-hidden"
|
|
199166
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199167
|
+
className: "text-muted-foreground text-[12px]"
|
|
199168
|
+
}, " S:", seriesNumber), /*#__PURE__*/react.createElement("div", {
|
|
199169
|
+
className: "text-muted-foreground text-[12px]"
|
|
199170
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199171
|
+
className: "flex items-center gap-[4px]"
|
|
199172
|
+
}, ' ', countIcon ? ( /*#__PURE__*/react.createElement(Icons_Icons[countIcon] || Icons_Icons.MissingIcon, {
|
|
199173
|
+
className: 'w-3'
|
|
199174
|
+
})) : /*#__PURE__*/react.createElement(Icons_Icons.InfoSeries, {
|
|
199175
|
+
className: "w-3"
|
|
199176
|
+
}), /*#__PURE__*/react.createElement("div", null, numInstances))))));
|
|
199177
|
+
};
|
|
199178
|
+
const renderListPreset = () => {
|
|
199179
|
+
return /*#__PURE__*/react.createElement("div", {
|
|
199180
|
+
className: "flex h-full w-full items-center justify-between pr-[8px] pl-[8px] pt-[4px] pb-[4px]"
|
|
199181
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199182
|
+
className: "relative flex h-[32px] items-center gap-[8px]"
|
|
199183
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199184
|
+
className: classnames_default()('h-[32px] w-[4px] rounded-[2px]', isActive || isHydratedForDerivedDisplaySet ? 'bg-highlight' : 'bg-primary/65', loadingProgress && loadingProgress < 1 && 'bg-primary/25')
|
|
199185
|
+
}), /*#__PURE__*/react.createElement("div", {
|
|
199186
|
+
className: "flex h-full flex-col"
|
|
199187
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199188
|
+
className: "flex items-center gap-[7px]"
|
|
199189
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199190
|
+
className: "text-[13px] text-white"
|
|
199191
|
+
}, modality), /*#__PURE__*/react.createElement("div", {
|
|
199192
|
+
className: "max-w-[160px] overflow-hidden overflow-ellipsis whitespace-nowrap text-[13px] text-white"
|
|
199193
|
+
}, description)), /*#__PURE__*/react.createElement("div", {
|
|
199194
|
+
className: "flex h-[12px] items-center gap-[7px] overflow-hidden"
|
|
199195
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199196
|
+
className: "text-muted-foreground text-[12px]"
|
|
199197
|
+
}, " S:", seriesNumber), /*#__PURE__*/react.createElement("div", {
|
|
199198
|
+
className: "text-muted-foreground text-[12px]"
|
|
199199
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199200
|
+
className: "flex items-center gap-[4px]"
|
|
199201
|
+
}, ' ', countIcon ? ( /*#__PURE__*/react.createElement(Icons_Icons[countIcon] || Icons_Icons.MissingIcon, {
|
|
199202
|
+
className: 'w-3'
|
|
199203
|
+
})) : /*#__PURE__*/react.createElement(Icons_Icons.InfoSeries, {
|
|
199204
|
+
className: "w-3"
|
|
199205
|
+
}), /*#__PURE__*/react.createElement("div", null, numInstances)))))), /*#__PURE__*/react.createElement("div", {
|
|
199206
|
+
className: "flex h-full items-center gap-[4px]"
|
|
199207
|
+
}, /*#__PURE__*/react.createElement(DisplaySetMessageListTooltip, {
|
|
199208
|
+
messages: messages,
|
|
199209
|
+
id: `display-set-tooltip-${displaySetInstanceUID}`
|
|
199210
|
+
}), canReject && /*#__PURE__*/react.createElement(Icons_Icons.Trash, {
|
|
199211
|
+
className: "h-[20px] w-[20px] text-red-500",
|
|
199212
|
+
onClick: onReject
|
|
199213
|
+
}), isTracked && /*#__PURE__*/react.createElement(Tooltip_TooltipProvider, null, /*#__PURE__*/react.createElement(Tooltip_Tooltip, null, /*#__PURE__*/react.createElement(Tooltip_TooltipTrigger, null, /*#__PURE__*/react.createElement("div", {
|
|
199214
|
+
className: "group"
|
|
199215
|
+
}, /*#__PURE__*/react.createElement(Icons_Icons.StatusTracking, {
|
|
199216
|
+
className: "text-primary-light h-[20px] w-[20px] group-hover:hidden"
|
|
199217
|
+
}), /*#__PURE__*/react.createElement(Icons_Icons.Cancel, {
|
|
199218
|
+
className: "text-primary-light hidden h-[15px] w-[15px] group-hover:block",
|
|
199219
|
+
onClick: onClickUntrack
|
|
199220
|
+
}))), /*#__PURE__*/react.createElement(Tooltip_TooltipContent, {
|
|
199221
|
+
side: "right"
|
|
199222
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199223
|
+
className: "flex flex-1 flex-row"
|
|
199224
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199225
|
+
className: "flex-2 flex items-center justify-center pr-4"
|
|
199226
|
+
}, /*#__PURE__*/react.createElement(Icons_Icons.InfoLink, {
|
|
199227
|
+
className: "text-primary-active"
|
|
199228
|
+
})), /*#__PURE__*/react.createElement("div", {
|
|
199229
|
+
className: "flex flex-1 flex-col"
|
|
199230
|
+
}, /*#__PURE__*/react.createElement("span", null, /*#__PURE__*/react.createElement("span", {
|
|
199231
|
+
className: "text-white"
|
|
199232
|
+
}, isTracked ? 'Series is tracked' : 'Series is untracked'))))))), /*#__PURE__*/react.createElement(DropdownMenu_DropdownMenu, null, /*#__PURE__*/react.createElement(DropdownMenu_DropdownMenuTrigger, {
|
|
199233
|
+
asChild: true
|
|
199234
|
+
}, /*#__PURE__*/react.createElement(Button_Button, {
|
|
199235
|
+
variant: "ghost",
|
|
199236
|
+
size: "icon",
|
|
199237
|
+
className: "hidden group-hover:inline-flex data-[state=open]:inline-flex"
|
|
199238
|
+
}, /*#__PURE__*/react.createElement(Icons_Icons.More, null))), /*#__PURE__*/react.createElement(DropdownMenu_DropdownMenuContent, {
|
|
199239
|
+
asChild: true,
|
|
199240
|
+
hideWhenDetached: true
|
|
199241
|
+
}, /*#__PURE__*/react.createElement(DropdownMenu_DropdownMenuItem, {
|
|
199242
|
+
onSelect: () => {
|
|
199243
|
+
onThumbnailContextMenu('openDICOMTagViewer', {
|
|
199244
|
+
displaySetInstanceUID
|
|
199245
|
+
});
|
|
199246
|
+
},
|
|
199247
|
+
className: "gap-[6px]"
|
|
199248
|
+
}, /*#__PURE__*/react.createElement(Icons_Icons.DicomTagBrowser, null), "Tag Browser")))));
|
|
199249
|
+
};
|
|
199250
|
+
return /*#__PURE__*/react.createElement("div", {
|
|
199251
|
+
className: classnames_default()(className, 'bg-muted hover:bg-primary/30 group flex cursor-pointer select-none flex-col outline-none', viewPreset === 'thumbnails' && 'h-[170px] w-[135px]', viewPreset === 'list' && 'col-span-2 h-[40px] w-[275px]'),
|
|
199252
|
+
id: `thumbnail-${displaySetInstanceUID}`,
|
|
199253
|
+
"data-cy": thumbnailType === 'thumbnailNoImage' ? 'study-browser-thumbnail-no-image' : 'study-browser-thumbnail',
|
|
199254
|
+
"data-series": seriesNumber,
|
|
199255
|
+
onClick: onClick,
|
|
199256
|
+
onDoubleClick: onDoubleClick,
|
|
199257
|
+
onTouchEnd: handleTouchEnd,
|
|
199258
|
+
role: "button"
|
|
199259
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199260
|
+
ref: drag,
|
|
199261
|
+
className: "h-full w-full"
|
|
199262
|
+
}, viewPreset === 'thumbnails' && renderThumbnailPreset(), viewPreset === 'list' && renderListPreset()));
|
|
199263
|
+
};
|
|
199264
|
+
Thumbnail.propTypes = {
|
|
199265
|
+
displaySetInstanceUID: (prop_types_default()).string.isRequired,
|
|
199266
|
+
className: (prop_types_default()).string,
|
|
199267
|
+
imageSrc: (prop_types_default()).string,
|
|
199268
|
+
/**
|
|
199269
|
+
* Data the thumbnail should expose to a receiving drop target. Use a matching
|
|
199270
|
+
* `dragData.type` to identify which targets can receive this draggable item.
|
|
199271
|
+
* If this is not set, drag-n-drop will be disabled for this thumbnail.
|
|
199272
|
+
*
|
|
199273
|
+
* Ref: https://react-dnd.github.io/react-dnd/docs/api/use-drag#specification-object-members
|
|
199274
|
+
*/
|
|
199275
|
+
dragData: prop_types_default().shape({
|
|
199276
|
+
/** Must match the "type" a dropTarget expects */
|
|
199277
|
+
type: (prop_types_default()).string.isRequired
|
|
199278
|
+
}),
|
|
199279
|
+
imageAltText: (prop_types_default()).string,
|
|
199280
|
+
description: (prop_types_default()).string.isRequired,
|
|
199281
|
+
seriesNumber: (prop_types_default()).any,
|
|
199282
|
+
numInstances: (prop_types_default()).number.isRequired,
|
|
199283
|
+
loadingProgress: (prop_types_default()).number,
|
|
199284
|
+
messages: (prop_types_default()).object,
|
|
199285
|
+
isActive: (prop_types_default()).bool.isRequired,
|
|
199286
|
+
onClick: (prop_types_default()).func.isRequired,
|
|
199287
|
+
onDoubleClick: (prop_types_default()).func.isRequired,
|
|
199288
|
+
viewPreset: (prop_types_default()).string,
|
|
199289
|
+
modality: (prop_types_default()).string,
|
|
199290
|
+
isHydratedForDerivedDisplaySet: (prop_types_default()).bool,
|
|
199291
|
+
canReject: (prop_types_default()).bool,
|
|
199292
|
+
onReject: (prop_types_default()).func,
|
|
199293
|
+
isTracked: (prop_types_default()).bool,
|
|
199294
|
+
onClickUntrack: (prop_types_default()).func,
|
|
199295
|
+
countIcon: (prop_types_default()).string,
|
|
199296
|
+
thumbnailType: prop_types_default().oneOf(['thumbnail', 'thumbnailTracked', 'thumbnailNoImage'])
|
|
199297
|
+
};
|
|
199298
|
+
|
|
199299
|
+
;// CONCATENATED MODULE: ../../ui-next/src/components/Thumbnail/index.ts
|
|
199300
|
+
|
|
199301
|
+
|
|
199302
|
+
;// CONCATENATED MODULE: ../../ui-next/src/components/ThumbnailList/ThumbnailList.tsx
|
|
199303
|
+
|
|
199304
|
+
|
|
199305
|
+
|
|
199306
|
+
const ThumbnailList = ({
|
|
199307
|
+
thumbnails,
|
|
199308
|
+
onThumbnailClick,
|
|
199309
|
+
onThumbnailDoubleClick,
|
|
199310
|
+
onClickUntrack,
|
|
199311
|
+
activeDisplaySetInstanceUIDs = [],
|
|
199312
|
+
viewPreset,
|
|
199313
|
+
onThumbnailContextMenu
|
|
199314
|
+
}) => {
|
|
199315
|
+
return /*#__PURE__*/react.createElement("div", {
|
|
199316
|
+
className: "min-h-[350px]",
|
|
199317
|
+
style: {
|
|
199318
|
+
'--radix-accordion-content-height': '350px'
|
|
199319
|
+
}
|
|
199320
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199321
|
+
id: "ohif-thumbnail-list",
|
|
199322
|
+
className: `ohif-scrollbar bg-bkg-low grid place-items-center overflow-y-hidden pt-[4px] pr-[2.5px] pl-[2.5px] ${viewPreset === 'thumbnails' ? 'grid-cols-2 gap-[4px] pb-[12px]' : 'grid-cols-1 gap-[2px]'}`
|
|
199323
|
+
}, thumbnails.map(({
|
|
199324
|
+
displaySetInstanceUID,
|
|
199325
|
+
description,
|
|
199326
|
+
dragData,
|
|
199327
|
+
seriesNumber,
|
|
199328
|
+
numInstances,
|
|
199329
|
+
loadingProgress,
|
|
199330
|
+
modality,
|
|
199331
|
+
componentType,
|
|
199332
|
+
seriesDate,
|
|
199333
|
+
countIcon,
|
|
199334
|
+
isTracked,
|
|
199335
|
+
canReject,
|
|
199336
|
+
onReject,
|
|
199337
|
+
imageSrc,
|
|
199338
|
+
messages,
|
|
199339
|
+
imageAltText,
|
|
199340
|
+
isHydratedForDerivedDisplaySet
|
|
199341
|
+
}) => {
|
|
199342
|
+
const isActive = activeDisplaySetInstanceUIDs.includes(displaySetInstanceUID);
|
|
199343
|
+
return /*#__PURE__*/react.createElement(Thumbnail, {
|
|
199344
|
+
key: displaySetInstanceUID,
|
|
199345
|
+
displaySetInstanceUID: displaySetInstanceUID,
|
|
199346
|
+
dragData: dragData,
|
|
199347
|
+
description: description,
|
|
199348
|
+
seriesNumber: seriesNumber,
|
|
199349
|
+
numInstances: numInstances || 1,
|
|
199350
|
+
countIcon: countIcon,
|
|
199351
|
+
imageSrc: imageSrc,
|
|
199352
|
+
imageAltText: imageAltText,
|
|
199353
|
+
messages: messages,
|
|
199354
|
+
isActive: isActive,
|
|
199355
|
+
modality: modality,
|
|
199356
|
+
viewPreset: componentType === 'thumbnailNoImage' ? 'list' : viewPreset,
|
|
199357
|
+
thumbnailType: componentType,
|
|
199358
|
+
onClick: () => onThumbnailClick(displaySetInstanceUID),
|
|
199359
|
+
onDoubleClick: () => onThumbnailDoubleClick(displaySetInstanceUID),
|
|
199360
|
+
isTracked: isTracked,
|
|
199361
|
+
loadingProgress: loadingProgress,
|
|
199362
|
+
onClickUntrack: () => onClickUntrack(displaySetInstanceUID),
|
|
199363
|
+
isHydratedForDerivedDisplaySet: isHydratedForDerivedDisplaySet,
|
|
199364
|
+
canReject: canReject,
|
|
199365
|
+
onReject: onReject,
|
|
199366
|
+
onThumbnailContextMenu: onThumbnailContextMenu
|
|
199367
|
+
});
|
|
199368
|
+
})));
|
|
199369
|
+
};
|
|
199370
|
+
ThumbnailList.propTypes = {
|
|
199371
|
+
thumbnails: prop_types_default().arrayOf(prop_types_default().shape({
|
|
199372
|
+
displaySetInstanceUID: (prop_types_default()).string.isRequired,
|
|
199373
|
+
imageSrc: (prop_types_default()).string,
|
|
199374
|
+
imageAltText: (prop_types_default()).string,
|
|
199375
|
+
seriesDate: (prop_types_default()).string,
|
|
199376
|
+
seriesNumber: (prop_types_default()).any,
|
|
199377
|
+
numInstances: (prop_types_default()).number,
|
|
199378
|
+
description: (prop_types_default()).string,
|
|
199379
|
+
componentType: (prop_types_default()).any,
|
|
199380
|
+
isTracked: (prop_types_default()).bool,
|
|
199381
|
+
/**
|
|
199382
|
+
* Data the thumbnail should expose to a receiving drop target. Use a matching
|
|
199383
|
+
* `dragData.type` to identify which targets can receive this draggable item.
|
|
199384
|
+
* If this is not set, drag-n-drop will be disabled for this thumbnail.
|
|
199385
|
+
*
|
|
199386
|
+
* Ref: https://react-dnd.github.io/react-dnd/docs/api/use-drag#specification-object-members
|
|
199387
|
+
*/
|
|
199388
|
+
dragData: prop_types_default().shape({
|
|
199389
|
+
/** Must match the "type" a dropTarget expects */
|
|
199390
|
+
type: (prop_types_default()).string.isRequired
|
|
199391
|
+
})
|
|
199392
|
+
})),
|
|
199393
|
+
activeDisplaySetInstanceUIDs: prop_types_default().arrayOf((prop_types_default()).string),
|
|
199394
|
+
onThumbnailClick: (prop_types_default()).func.isRequired,
|
|
199395
|
+
onThumbnailDoubleClick: (prop_types_default()).func.isRequired,
|
|
199396
|
+
onClickUntrack: (prop_types_default()).func.isRequired,
|
|
199397
|
+
viewPreset: (prop_types_default()).string
|
|
199398
|
+
};
|
|
199399
|
+
|
|
199400
|
+
;// CONCATENATED MODULE: ../../ui-next/src/components/ThumbnailList/index.ts
|
|
199401
|
+
|
|
199402
|
+
|
|
199403
|
+
;// CONCATENATED MODULE: ../../ui-next/src/components/StudyItem/StudyItem.tsx
|
|
199404
|
+
|
|
199405
|
+
|
|
199406
|
+
|
|
199407
|
+
|
|
199408
|
+
|
|
199409
|
+
const StudyItem = ({
|
|
199410
|
+
date,
|
|
199411
|
+
description,
|
|
199412
|
+
numInstances,
|
|
199413
|
+
modalities,
|
|
199414
|
+
isActive,
|
|
199415
|
+
onClick,
|
|
199416
|
+
isExpanded,
|
|
199417
|
+
displaySets,
|
|
199418
|
+
activeDisplaySetInstanceUIDs,
|
|
199419
|
+
onClickThumbnail,
|
|
199420
|
+
onDoubleClickThumbnail,
|
|
199421
|
+
onClickUntrack,
|
|
199422
|
+
viewPreset = 'thumbnails',
|
|
199423
|
+
onThumbnailContextMenu
|
|
199424
|
+
}) => {
|
|
199425
|
+
return /*#__PURE__*/react.createElement(Accordion_Accordion, {
|
|
199426
|
+
type: "single",
|
|
199427
|
+
collapsible: true,
|
|
199428
|
+
onClick: onClick,
|
|
199429
|
+
onKeyDown: onClick,
|
|
199430
|
+
role: "button",
|
|
199431
|
+
tabIndex: 0,
|
|
199432
|
+
defaultValue: isActive ? 'study-item' : undefined
|
|
199433
|
+
}, /*#__PURE__*/react.createElement(Accordion_AccordionItem, {
|
|
199434
|
+
value: "study-item"
|
|
199435
|
+
}, /*#__PURE__*/react.createElement(Accordion_AccordionTrigger, {
|
|
199436
|
+
className: classnames_default()('hover:bg-accent bg-popover rounded')
|
|
199437
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199438
|
+
className: "flex h-[40px] flex-1 flex-row"
|
|
199439
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199440
|
+
className: "flex w-full flex-row items-center justify-between"
|
|
199441
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199442
|
+
className: "flex flex-col items-start text-[13px]"
|
|
199443
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199444
|
+
className: "text-white"
|
|
199445
|
+
}, date), /*#__PURE__*/react.createElement("div", {
|
|
199446
|
+
className: "text-muted-foreground h-[18px] max-w-[160px] overflow-hidden truncate whitespace-nowrap"
|
|
199447
|
+
}, description)), /*#__PURE__*/react.createElement("div", {
|
|
199448
|
+
className: "text-muted-foreground mr-2 flex flex-col items-end text-[12px]"
|
|
199449
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199450
|
+
className: "max-w-[150px] overflow-hidden text-ellipsis"
|
|
199451
|
+
}, modalities), /*#__PURE__*/react.createElement("div", null, numInstances))))), /*#__PURE__*/react.createElement(Accordion_AccordionContent, {
|
|
199452
|
+
onClick: event => {
|
|
199453
|
+
event.stopPropagation();
|
|
199454
|
+
}
|
|
199455
|
+
}, isExpanded && displaySets && /*#__PURE__*/react.createElement(ThumbnailList, {
|
|
199456
|
+
thumbnails: displaySets,
|
|
199457
|
+
activeDisplaySetInstanceUIDs: activeDisplaySetInstanceUIDs,
|
|
199458
|
+
onThumbnailClick: onClickThumbnail,
|
|
199459
|
+
onThumbnailDoubleClick: onDoubleClickThumbnail,
|
|
199460
|
+
onClickUntrack: onClickUntrack,
|
|
199461
|
+
viewPreset: viewPreset,
|
|
199462
|
+
onThumbnailContextMenu: onThumbnailContextMenu
|
|
199463
|
+
}))));
|
|
199464
|
+
};
|
|
199465
|
+
StudyItem.propTypes = {
|
|
199466
|
+
date: (prop_types_default()).string.isRequired,
|
|
199467
|
+
description: (prop_types_default()).string,
|
|
199468
|
+
modalities: (prop_types_default()).string.isRequired,
|
|
199469
|
+
numInstances: (prop_types_default()).number.isRequired,
|
|
199470
|
+
trackedSeries: (prop_types_default()).number,
|
|
199471
|
+
isActive: (prop_types_default()).bool,
|
|
199472
|
+
onClick: (prop_types_default()).func.isRequired,
|
|
199473
|
+
isExpanded: (prop_types_default()).bool,
|
|
199474
|
+
displaySets: (prop_types_default()).array,
|
|
199475
|
+
activeDisplaySetInstanceUIDs: (prop_types_default()).array,
|
|
199476
|
+
onClickThumbnail: (prop_types_default()).func,
|
|
199477
|
+
onDoubleClickThumbnail: (prop_types_default()).func,
|
|
199478
|
+
onClickUntrack: (prop_types_default()).func,
|
|
199479
|
+
viewPreset: (prop_types_default()).string
|
|
199480
|
+
};
|
|
199481
|
+
|
|
199482
|
+
;// CONCATENATED MODULE: ../../ui-next/src/components/StudyItem/index.ts
|
|
199483
|
+
|
|
199484
|
+
|
|
199485
|
+
;// CONCATENATED MODULE: ../../ui-next/src/components/StudyBrowserSort/StudyBrowserSort.tsx
|
|
199486
|
+
|
|
199487
|
+
|
|
199488
|
+
function StudyBrowserSort({
|
|
199489
|
+
servicesManager
|
|
199490
|
+
}) {
|
|
199491
|
+
const {
|
|
199492
|
+
customizationService,
|
|
199493
|
+
displaySetService
|
|
199494
|
+
} = servicesManager.services;
|
|
199495
|
+
const {
|
|
199496
|
+
values: sortFunctions
|
|
199497
|
+
} = customizationService.get('studyBrowser.sortFunctions');
|
|
199498
|
+
const [selectedSort, setSelectedSort] = (0,react.useState)(sortFunctions[0]);
|
|
199499
|
+
const [sortDirection, setSortDirection] = (0,react.useState)('ascending');
|
|
199500
|
+
const handleSortChange = event => {
|
|
199501
|
+
const selectedSortFunction = sortFunctions.find(sort => sort.label === event.target.value);
|
|
199502
|
+
setSelectedSort(selectedSortFunction);
|
|
199503
|
+
};
|
|
199504
|
+
const toggleSortDirection = e => {
|
|
199505
|
+
e.stopPropagation();
|
|
199506
|
+
setSortDirection(prevDirection => prevDirection === 'ascending' ? 'descending' : 'ascending');
|
|
199507
|
+
};
|
|
199508
|
+
(0,react.useEffect)(() => {
|
|
199509
|
+
displaySetService.sortDisplaySets(selectedSort.sortFunction, sortDirection);
|
|
199510
|
+
}, [displaySetService, selectedSort, sortDirection]);
|
|
199511
|
+
(0,react.useEffect)(() => {
|
|
199512
|
+
const SubscriptionDisplaySetsChanged = displaySetService.subscribe(displaySetService.EVENTS.DISPLAY_SETS_CHANGED, () => {
|
|
199513
|
+
displaySetService.sortDisplaySets(selectedSort.sortFunction, sortDirection, true);
|
|
199514
|
+
});
|
|
199515
|
+
const SubscriptionDisplaySetMetaDataInvalidated = displaySetService.subscribe(displaySetService.EVENTS.DISPLAY_SET_SERIES_METADATA_INVALIDATED, () => {
|
|
199516
|
+
displaySetService.sortDisplaySets(selectedSort.sortFunction, sortDirection, true);
|
|
199517
|
+
});
|
|
199518
|
+
return () => {
|
|
199519
|
+
SubscriptionDisplaySetsChanged.unsubscribe();
|
|
199520
|
+
SubscriptionDisplaySetMetaDataInvalidated.unsubscribe();
|
|
199521
|
+
};
|
|
199522
|
+
}, [displaySetService, selectedSort, sortDirection]);
|
|
199523
|
+
return /*#__PURE__*/react.createElement("div", {
|
|
199524
|
+
className: "border-inputfield-main focus:border-inputfield-main flex h-[26px] w-[125px] items-center justify-center rounded border bg-black p-2"
|
|
199525
|
+
}, /*#__PURE__*/react.createElement("select", {
|
|
199526
|
+
onChange: handleSortChange,
|
|
199527
|
+
value: selectedSort.label,
|
|
199528
|
+
onClick: e => e.stopPropagation(),
|
|
199529
|
+
className: "w-full appearance-none bg-transparent text-sm leading-tight text-white shadow transition duration-300 focus:outline-none"
|
|
199530
|
+
}, sortFunctions.map(sort => /*#__PURE__*/react.createElement("option", {
|
|
199531
|
+
className: "appearance-none bg-black text-white",
|
|
199532
|
+
value: sort.label,
|
|
199533
|
+
key: sort.label
|
|
199534
|
+
}, sort.label))), /*#__PURE__*/react.createElement("button", {
|
|
199535
|
+
onClick: toggleSortDirection,
|
|
199536
|
+
className: "flex items-center justify-center"
|
|
199537
|
+
}, sortDirection === 'ascending' ? /*#__PURE__*/react.createElement(Icons_Icons.SortingAscending, {
|
|
199538
|
+
className: "text-primary-main w-2"
|
|
199539
|
+
}) : /*#__PURE__*/react.createElement(Icons_Icons.SortingDescending, {
|
|
199540
|
+
className: "text-primary-main w-2"
|
|
199541
|
+
})));
|
|
199542
|
+
}
|
|
199543
|
+
;// CONCATENATED MODULE: ../../ui-next/src/components/StudyBrowserSort/index.ts
|
|
199544
|
+
|
|
199545
|
+
|
|
199546
|
+
;// CONCATENATED MODULE: ../../ui-next/src/components/StudyBrowserViewOptions/StudyBrowserViewOptions.tsx
|
|
199547
|
+
|
|
199548
|
+
function StudyBrowserViewOptions({
|
|
199549
|
+
tabs,
|
|
199550
|
+
onSelectTab,
|
|
199551
|
+
activeTabName
|
|
199552
|
+
}) {
|
|
199553
|
+
const handleTabChange = tabName => {
|
|
199554
|
+
onSelectTab(tabName);
|
|
199555
|
+
};
|
|
199556
|
+
return /*#__PURE__*/react.createElement("div", {
|
|
199557
|
+
className: "border-inputfield-main focus:border-inputfield-main flex h-[26px] w-[125px] items-center justify-center rounded border bg-black p-2"
|
|
199558
|
+
}, /*#__PURE__*/react.createElement("select", {
|
|
199559
|
+
onChange: e => handleTabChange(e.target.value),
|
|
199560
|
+
value: activeTabName,
|
|
199561
|
+
onClick: e => e.stopPropagation(),
|
|
199562
|
+
className: "w-full appearance-none bg-transparent text-sm leading-tight text-white shadow transition duration-300 focus:outline-none"
|
|
199563
|
+
}, tabs.map(tab => {
|
|
199564
|
+
const {
|
|
199565
|
+
name,
|
|
199566
|
+
label,
|
|
199567
|
+
studies
|
|
199568
|
+
} = tab;
|
|
199569
|
+
const isActive = activeTabName === name;
|
|
199570
|
+
const isDisabled = !studies.length;
|
|
199571
|
+
if (isDisabled) {
|
|
199572
|
+
return null;
|
|
199573
|
+
}
|
|
199574
|
+
return /*#__PURE__*/react.createElement("option", {
|
|
199575
|
+
className: `appearance-none bg-black text-white ${isActive ? 'font-bold' : ''}`,
|
|
199576
|
+
value: name,
|
|
199577
|
+
key: name
|
|
199578
|
+
}, label);
|
|
199579
|
+
})));
|
|
199580
|
+
}
|
|
199581
|
+
;// CONCATENATED MODULE: ../../ui-next/src/components/StudyBrowserViewOptions/index.ts
|
|
199582
|
+
|
|
199583
|
+
|
|
199584
|
+
;// CONCATENATED MODULE: ../../ui-next/src/components/StudyBrowser/StudyBrowser.tsx
|
|
199585
|
+
|
|
199586
|
+
|
|
199587
|
+
|
|
199588
|
+
|
|
199589
|
+
|
|
199590
|
+
const getTrackedSeries = displaySets => {
|
|
199591
|
+
let trackedSeries = 0;
|
|
199592
|
+
displaySets.forEach(displaySet => {
|
|
199593
|
+
if (displaySet.isTracked) {
|
|
199594
|
+
trackedSeries++;
|
|
199595
|
+
}
|
|
199596
|
+
});
|
|
199597
|
+
return trackedSeries;
|
|
199598
|
+
};
|
|
199599
|
+
const noop = () => {};
|
|
199600
|
+
const StudyBrowser = ({
|
|
199601
|
+
tabs,
|
|
199602
|
+
activeTabName,
|
|
199603
|
+
expandedStudyInstanceUIDs,
|
|
199604
|
+
onClickTab = noop,
|
|
199605
|
+
onClickStudy = noop,
|
|
199606
|
+
onClickThumbnail = noop,
|
|
199607
|
+
onDoubleClickThumbnail = noop,
|
|
199608
|
+
onClickUntrack = noop,
|
|
199609
|
+
activeDisplaySetInstanceUIDs,
|
|
199610
|
+
servicesManager,
|
|
199611
|
+
showSettings,
|
|
199612
|
+
viewPresets,
|
|
199613
|
+
onThumbnailContextMenu
|
|
199614
|
+
}) => {
|
|
199615
|
+
const getTabContent = () => {
|
|
199616
|
+
const tabData = tabs.find(tab => tab.name === activeTabName);
|
|
199617
|
+
const viewPreset = viewPresets ? viewPresets.filter(preset => preset.selected)[0]?.id : 'thumbnails';
|
|
199618
|
+
return tabData.studies.map(({
|
|
199619
|
+
studyInstanceUid,
|
|
199620
|
+
date,
|
|
199621
|
+
description,
|
|
199622
|
+
numInstances,
|
|
199623
|
+
modalities,
|
|
199624
|
+
displaySets
|
|
199625
|
+
}) => {
|
|
199626
|
+
const isExpanded = expandedStudyInstanceUIDs.includes(studyInstanceUid);
|
|
199627
|
+
return /*#__PURE__*/react.createElement(react.Fragment, {
|
|
199628
|
+
key: studyInstanceUid
|
|
199629
|
+
}, /*#__PURE__*/react.createElement(StudyItem, {
|
|
199630
|
+
date: date,
|
|
199631
|
+
description: description,
|
|
199632
|
+
numInstances: numInstances,
|
|
199633
|
+
isExpanded: isExpanded,
|
|
199634
|
+
displaySets: displaySets,
|
|
199635
|
+
modalities: modalities,
|
|
199636
|
+
trackedSeries: getTrackedSeries(displaySets),
|
|
199637
|
+
isActive: isExpanded,
|
|
199638
|
+
onClick: () => {
|
|
199639
|
+
onClickStudy(studyInstanceUid);
|
|
199640
|
+
},
|
|
199641
|
+
onClickThumbnail: onClickThumbnail,
|
|
199642
|
+
onDoubleClickThumbnail: onDoubleClickThumbnail,
|
|
199643
|
+
onClickUntrack: onClickUntrack,
|
|
199644
|
+
activeDisplaySetInstanceUIDs: activeDisplaySetInstanceUIDs,
|
|
199645
|
+
"data-cy": "thumbnail-list",
|
|
199646
|
+
viewPreset: viewPreset,
|
|
199647
|
+
onThumbnailContextMenu: onThumbnailContextMenu
|
|
199648
|
+
}));
|
|
199649
|
+
});
|
|
199650
|
+
};
|
|
199651
|
+
return /*#__PURE__*/react.createElement(react.Fragment, null, showSettings && /*#__PURE__*/react.createElement("div", {
|
|
199652
|
+
className: "w-100 bg-bkg-low flex h-[48px] items-center justify-center gap-[10px] px-[8px] py-[10px]",
|
|
199653
|
+
"data-cy": 'studyBrowser-panel'
|
|
199654
|
+
}, /*#__PURE__*/react.createElement(StudyBrowserViewOptions, {
|
|
199655
|
+
tabs: tabs,
|
|
199656
|
+
onSelectTab: onClickTab,
|
|
199657
|
+
activeTabName: activeTabName
|
|
199658
|
+
}), /*#__PURE__*/react.createElement(StudyBrowserSort, {
|
|
199659
|
+
servicesManager: servicesManager
|
|
199660
|
+
})), /*#__PURE__*/react.createElement("div", {
|
|
199661
|
+
className: "ohif-scrollbar invisible-scrollbar bg-bkg-low flex flex-1 flex-col gap-[4px] overflow-auto"
|
|
199662
|
+
}, getTabContent()));
|
|
199663
|
+
};
|
|
199664
|
+
StudyBrowser.propTypes = {
|
|
199665
|
+
onClickTab: (prop_types_default()).func.isRequired,
|
|
199666
|
+
onClickStudy: (prop_types_default()).func,
|
|
199667
|
+
onClickThumbnail: (prop_types_default()).func,
|
|
199668
|
+
onDoubleClickThumbnail: (prop_types_default()).func,
|
|
199669
|
+
onClickUntrack: (prop_types_default()).func,
|
|
199670
|
+
activeTabName: (prop_types_default()).string.isRequired,
|
|
199671
|
+
expandedStudyInstanceUIDs: prop_types_default().arrayOf((prop_types_default()).string).isRequired,
|
|
199672
|
+
activeDisplaySetInstanceUIDs: prop_types_default().arrayOf((prop_types_default()).string),
|
|
199673
|
+
tabs: prop_types_default().arrayOf(prop_types_default().shape({
|
|
199674
|
+
name: (prop_types_default()).string.isRequired,
|
|
199675
|
+
label: (prop_types_default()).string.isRequired,
|
|
199676
|
+
studies: prop_types_default().arrayOf(prop_types_default().shape({
|
|
199677
|
+
studyInstanceUid: (prop_types_default()).string.isRequired,
|
|
199678
|
+
date: (prop_types_default()).string,
|
|
199679
|
+
numInstances: (prop_types_default()).number,
|
|
199680
|
+
modalities: (prop_types_default()).string,
|
|
199681
|
+
description: (prop_types_default()).string,
|
|
199682
|
+
displaySets: prop_types_default().arrayOf(prop_types_default().shape({
|
|
199683
|
+
displaySetInstanceUID: (prop_types_default()).string.isRequired,
|
|
199684
|
+
imageSrc: (prop_types_default()).string,
|
|
199685
|
+
imageAltText: (prop_types_default()).string,
|
|
199686
|
+
seriesDate: (prop_types_default()).string,
|
|
199687
|
+
seriesNumber: (prop_types_default()).any,
|
|
199688
|
+
numInstances: (prop_types_default()).number,
|
|
199689
|
+
description: (prop_types_default()).string,
|
|
199690
|
+
componentType: prop_types_default().oneOf(['thumbnail', 'thumbnailTracked', 'thumbnailNoImage']).isRequired,
|
|
199691
|
+
isTracked: (prop_types_default()).bool,
|
|
199692
|
+
/**
|
|
199693
|
+
* Data the thumbnail should expose to a receiving drop target. Use a matching
|
|
199694
|
+
* `dragData.type` to identify which targets can receive this draggable item.
|
|
199695
|
+
* If this is not set, drag-n-drop will be disabled for this thumbnail.
|
|
199696
|
+
*
|
|
199697
|
+
* Ref: https://react-dnd.github.io/react-dnd/docs/api/use-drag#specification-object-members
|
|
199698
|
+
*/
|
|
199699
|
+
dragData: prop_types_default().shape({
|
|
199700
|
+
/** Must match the "type" a dropTarget expects */
|
|
199701
|
+
type: (prop_types_default()).string.isRequired
|
|
199702
|
+
})
|
|
199703
|
+
}))
|
|
199704
|
+
})).isRequired
|
|
199705
|
+
}))
|
|
199706
|
+
};
|
|
199707
|
+
|
|
199708
|
+
;// CONCATENATED MODULE: ../../ui-next/src/components/StudyBrowser/index.ts
|
|
199709
|
+
|
|
199710
|
+
|
|
199711
|
+
;// CONCATENATED MODULE: ../../ui-next/src/components/PanelSection/PanelSection.tsx
|
|
199712
|
+
|
|
199713
|
+
|
|
199714
|
+
|
|
199715
|
+
const PanelSection = ({
|
|
199716
|
+
title,
|
|
199717
|
+
children,
|
|
199718
|
+
actionIcons = [],
|
|
199719
|
+
childrenClassName
|
|
199720
|
+
}) => {
|
|
199721
|
+
const [areChildrenVisible, setChildrenVisible] = (0,react.useState)(true);
|
|
199722
|
+
const handleHeaderClick = () => {
|
|
199723
|
+
setChildrenVisible(!areChildrenVisible);
|
|
199724
|
+
};
|
|
199725
|
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
|
199726
|
+
className: "bg-secondary-dark flex h-7 cursor-pointer select-none items-center justify-between rounded-[4px] pl-2.5 text-[13px]",
|
|
199727
|
+
onClick: handleHeaderClick
|
|
199728
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199729
|
+
className: "text-aqua-pale"
|
|
199730
|
+
}, title), /*#__PURE__*/react.createElement("div", {
|
|
199731
|
+
className: "flex items-center space-x-1"
|
|
199732
|
+
}, actionIcons.map((icon, index) => {
|
|
199733
|
+
const Icon = Icons_Icons[icon.name];
|
|
199734
|
+
return /*#__PURE__*/react.createElement(Icon, {
|
|
199735
|
+
key: index,
|
|
199736
|
+
onClick: e => {
|
|
199737
|
+
e.stopPropagation();
|
|
199738
|
+
if (!areChildrenVisible) {
|
|
199739
|
+
setChildrenVisible(true);
|
|
199740
|
+
}
|
|
199741
|
+
icon.onClick();
|
|
199742
|
+
}
|
|
199743
|
+
});
|
|
199744
|
+
}), /*#__PURE__*/react.createElement("div", {
|
|
199745
|
+
className: "grid h-[28px] w-[28px] place-items-center"
|
|
199746
|
+
}, areChildrenVisible ? /*#__PURE__*/react.createElement(Icons_Icons.ChevronOpen, null) : /*#__PURE__*/react.createElement(Icons_Icons.ChevronClosed, null)))), areChildrenVisible && /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
|
199747
|
+
className: "h-[2px] bg-black"
|
|
199748
|
+
}), /*#__PURE__*/react.createElement("div", {
|
|
199749
|
+
className: `bg-primary-dark flex flex-col overflow-hidden rounded-b-[4px] ${childrenClassName}`
|
|
199750
|
+
}, children)));
|
|
199751
|
+
};
|
|
199752
|
+
PanelSection.propTypes = {
|
|
199753
|
+
title: (prop_types_default()).string,
|
|
199754
|
+
children: (prop_types_default()).node,
|
|
199755
|
+
childrenClassName: (prop_types_default()).string,
|
|
199756
|
+
actionIcons: prop_types_default().arrayOf(prop_types_default().shape({
|
|
199757
|
+
name: (prop_types_default()).string,
|
|
199758
|
+
onClick: (prop_types_default()).func
|
|
199759
|
+
}))
|
|
199760
|
+
};
|
|
199761
|
+
|
|
199762
|
+
;// CONCATENATED MODULE: ../../ui-next/src/components/PanelSection/index.ts
|
|
199763
|
+
|
|
199764
|
+
|
|
199765
|
+
// EXTERNAL MODULE: ../../ui/src/index.js + 691 modules
|
|
199766
|
+
var src = __webpack_require__(44657);
|
|
199767
|
+
;// CONCATENATED MODULE: ../../ui-next/src/components/Toolbox/ToolboxUI.tsx
|
|
199768
|
+
function ToolboxUI_extends() { return ToolboxUI_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, ToolboxUI_extends.apply(null, arguments); }
|
|
199769
|
+
|
|
199770
|
+
|
|
199771
|
+
// Migrate this file to the new UI eventually
|
|
199772
|
+
|
|
199773
|
+
|
|
199774
|
+
const ItemsPerRow = 4;
|
|
199775
|
+
function ToolboxUI_usePrevious(value) {
|
|
199776
|
+
const ref = (0,react.useRef)();
|
|
199777
|
+
(0,react.useEffect)(() => {
|
|
199778
|
+
ref.current = value;
|
|
199779
|
+
});
|
|
199780
|
+
return ref.current;
|
|
199781
|
+
}
|
|
199782
|
+
|
|
199783
|
+
/**
|
|
199784
|
+
* Just refactoring from the toolbox component to make it more readable
|
|
199785
|
+
*/
|
|
199786
|
+
function ToolboxUI(props) {
|
|
199787
|
+
const {
|
|
199788
|
+
toolbarButtons,
|
|
199789
|
+
handleToolSelect,
|
|
199790
|
+
toolboxState,
|
|
199791
|
+
numRows,
|
|
199792
|
+
servicesManager,
|
|
199793
|
+
title,
|
|
199794
|
+
useCollapsedPanel = true
|
|
199795
|
+
} = props;
|
|
199796
|
+
const {
|
|
199797
|
+
activeTool,
|
|
199798
|
+
toolOptions,
|
|
199799
|
+
selectedEvent
|
|
199800
|
+
} = toolboxState;
|
|
199801
|
+
const activeToolOptions = toolOptions?.[activeTool];
|
|
199802
|
+
const prevToolOptions = ToolboxUI_usePrevious(activeToolOptions);
|
|
199803
|
+
(0,react.useEffect)(() => {
|
|
199804
|
+
if (!activeToolOptions || Array.isArray(activeToolOptions) === false) {
|
|
199805
|
+
return;
|
|
199806
|
+
}
|
|
199807
|
+
activeToolOptions.forEach((option, index) => {
|
|
199808
|
+
const prevOption = prevToolOptions ? prevToolOptions[index] : undefined;
|
|
199809
|
+
if (!prevOption || option.value !== prevOption.value || selectedEvent) {
|
|
199810
|
+
const isOptionValid = option.condition ? option.condition({
|
|
199811
|
+
options: activeToolOptions
|
|
199812
|
+
}) : true;
|
|
199813
|
+
if (isOptionValid) {
|
|
199814
|
+
const {
|
|
199815
|
+
commands
|
|
199816
|
+
} = option;
|
|
199817
|
+
commands(option.value);
|
|
199818
|
+
}
|
|
199819
|
+
}
|
|
199820
|
+
});
|
|
199821
|
+
}, [activeToolOptions, selectedEvent]);
|
|
199822
|
+
const render = () => {
|
|
199823
|
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
|
199824
|
+
className: "flex flex-col bg-black"
|
|
199825
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199826
|
+
className: "bg-primary-dark mt-0.5 flex flex-wrap py-2"
|
|
199827
|
+
}, toolbarButtons.map((toolDef, index) => {
|
|
199828
|
+
if (!toolDef) {
|
|
199829
|
+
return null;
|
|
199830
|
+
}
|
|
199831
|
+
const {
|
|
199832
|
+
id,
|
|
199833
|
+
Component,
|
|
199834
|
+
componentProps
|
|
199835
|
+
} = toolDef;
|
|
199836
|
+
const isLastRow = Math.floor(index / ItemsPerRow) + 1 === numRows;
|
|
199837
|
+
const toolClasses = `ml-1 ${isLastRow ? '' : 'mb-2'}`;
|
|
199838
|
+
const onInteraction = ({
|
|
199839
|
+
itemId,
|
|
199840
|
+
id,
|
|
199841
|
+
commands
|
|
199842
|
+
}) => {
|
|
199843
|
+
const idToUse = itemId || id;
|
|
199844
|
+
handleToolSelect(idToUse);
|
|
199845
|
+
props.onInteraction({
|
|
199846
|
+
itemId,
|
|
199847
|
+
commands
|
|
199848
|
+
});
|
|
199849
|
+
};
|
|
199850
|
+
return /*#__PURE__*/react.createElement("div", {
|
|
199851
|
+
key: id,
|
|
199852
|
+
className: classnames_default()({
|
|
199853
|
+
[toolClasses]: true,
|
|
199854
|
+
'border-secondary-light flex flex-col items-center justify-center rounded-md border': true
|
|
199855
|
+
})
|
|
199856
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
199857
|
+
className: "flex rounded-md bg-black"
|
|
199858
|
+
}, /*#__PURE__*/react.createElement(Component, ToolboxUI_extends({}, componentProps, props, {
|
|
199859
|
+
id: id,
|
|
199860
|
+
servicesManager: servicesManager,
|
|
199861
|
+
onInteraction: onInteraction,
|
|
199862
|
+
size: "toolbox"
|
|
199863
|
+
}))));
|
|
199864
|
+
}))), /*#__PURE__*/react.createElement("div", {
|
|
199865
|
+
className: "bg-primary-dark h-auto px-2"
|
|
199866
|
+
}, activeToolOptions && /*#__PURE__*/react.createElement(src/* ToolSettings */.TM, {
|
|
199867
|
+
options: activeToolOptions
|
|
199868
|
+
})));
|
|
199869
|
+
};
|
|
199870
|
+
return /*#__PURE__*/react.createElement(react.Fragment, null, useCollapsedPanel ? /*#__PURE__*/react.createElement(PanelSection, {
|
|
199871
|
+
childrenClassName: "flex-shrink-0",
|
|
199872
|
+
title: title
|
|
199873
|
+
}, render()) : render());
|
|
199874
|
+
}
|
|
199875
|
+
|
|
199876
|
+
// EXTERNAL MODULE: ../../core/src/index.ts + 74 modules
|
|
199877
|
+
var core_src = __webpack_require__(10541);
|
|
199878
|
+
;// CONCATENATED MODULE: ../../ui-next/src/components/Toolbox/Toolbox.tsx
|
|
199879
|
+
function Toolbox_extends() { return Toolbox_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, Toolbox_extends.apply(null, arguments); }
|
|
199880
|
+
|
|
199881
|
+
|
|
199882
|
+
|
|
199883
|
+
// Migrate this file to the new UI eventually
|
|
199884
|
+
|
|
199885
|
+
/**
|
|
199886
|
+
* A toolbox is a collection of buttons and commands that they invoke, used to provide
|
|
199887
|
+
* custom control panels to users. This component is a generic UI component that
|
|
199888
|
+
* interacts with services and commands in a generic fashion. While it might
|
|
199889
|
+
* seem unconventional to import it from the UI and integrate it into the JSX,
|
|
199890
|
+
* it belongs in the UI components as there isn't anything in this component that
|
|
199891
|
+
* couldn't be used for a completely different type of app. It plays a crucial
|
|
199892
|
+
* role in enhancing the app with a toolbox by providing a way to integrate
|
|
199893
|
+
* and display various tools and their corresponding options
|
|
199894
|
+
*/
|
|
199895
|
+
function Toolbox({
|
|
199896
|
+
servicesManager,
|
|
199897
|
+
buttonSectionId,
|
|
199898
|
+
commandsManager,
|
|
199899
|
+
title,
|
|
199900
|
+
...props
|
|
199901
|
+
}) {
|
|
199902
|
+
const {
|
|
199903
|
+
state: toolboxState,
|
|
199904
|
+
api
|
|
199905
|
+
} = (0,src/* useToolbox */.Z1)(buttonSectionId);
|
|
199906
|
+
const {
|
|
199907
|
+
onInteraction,
|
|
199908
|
+
toolbarButtons
|
|
199909
|
+
} = (0,core_src/* useToolbar */.tR)({
|
|
199910
|
+
servicesManager,
|
|
199911
|
+
buttonSection: buttonSectionId
|
|
199912
|
+
});
|
|
199913
|
+
const prevButtonIdsRef = (0,react.useRef)('');
|
|
199914
|
+
const prevToolboxStateRef = (0,react.useRef)('');
|
|
199915
|
+
(0,react.useEffect)(() => {
|
|
199916
|
+
const currentButtonIdsStr = JSON.stringify(toolbarButtons.map(button => {
|
|
199917
|
+
const {
|
|
199918
|
+
id,
|
|
199919
|
+
componentProps
|
|
199920
|
+
} = button;
|
|
199921
|
+
if (componentProps.items?.length) {
|
|
199922
|
+
return componentProps.items.map(item => `${item.id}-${item.disabled}`);
|
|
199923
|
+
}
|
|
199924
|
+
return `${id}-${componentProps.disabled}`;
|
|
199925
|
+
}));
|
|
199926
|
+
const currentToolBoxStateStr = JSON.stringify(Object.keys(toolboxState.toolOptions).map(tool => {
|
|
199927
|
+
const options = toolboxState.toolOptions[tool];
|
|
199928
|
+
if (Array.isArray(options)) {
|
|
199929
|
+
return options?.map(option => `${option.id}-${option.value}`);
|
|
199930
|
+
}
|
|
199931
|
+
}));
|
|
199932
|
+
if (prevButtonIdsRef.current === currentButtonIdsStr && prevToolboxStateRef.current === currentToolBoxStateStr) {
|
|
199933
|
+
return;
|
|
199934
|
+
}
|
|
199935
|
+
prevButtonIdsRef.current = currentButtonIdsStr;
|
|
199936
|
+
prevToolboxStateRef.current = currentToolBoxStateStr;
|
|
199937
|
+
const initializeOptionsWithEnhancements = toolbarButtons.reduce((accumulator, toolbarButton) => {
|
|
199938
|
+
const {
|
|
199939
|
+
id: buttonId,
|
|
199940
|
+
componentProps
|
|
199941
|
+
} = toolbarButton;
|
|
199942
|
+
const createEnhancedOptions = (options, parentId) => {
|
|
199943
|
+
const optionsToUse = Array.isArray(options) ? options : [options];
|
|
199944
|
+
return optionsToUse.map(option => {
|
|
199945
|
+
if (typeof option.optionComponent === 'function') {
|
|
199946
|
+
return option;
|
|
199947
|
+
}
|
|
199948
|
+
const value = toolboxState.toolOptions?.[parentId]?.find(prop => prop.id === option.id)?.value ?? option.value;
|
|
199949
|
+
const updatedOptions = toolboxState.toolOptions?.[parentId];
|
|
199950
|
+
return {
|
|
199951
|
+
...option,
|
|
199952
|
+
value,
|
|
199953
|
+
commands: value => {
|
|
199954
|
+
api.handleToolOptionChange(parentId, option.id, value);
|
|
199955
|
+
const {
|
|
199956
|
+
isArray
|
|
199957
|
+
} = Array;
|
|
199958
|
+
const cmds = isArray(option.commands) ? option.commands : [option.commands];
|
|
199959
|
+
cmds.forEach(command => {
|
|
199960
|
+
const isString = typeof command === 'string';
|
|
199961
|
+
const isObject = typeof command === 'object';
|
|
199962
|
+
const isFunction = typeof command === 'function';
|
|
199963
|
+
if (isString) {
|
|
199964
|
+
commandsManager.run(command, {
|
|
199965
|
+
value
|
|
199966
|
+
});
|
|
199967
|
+
} else if (isObject) {
|
|
199968
|
+
commandsManager.run({
|
|
199969
|
+
...command,
|
|
199970
|
+
commandOptions: {
|
|
199971
|
+
...command.commandOptions,
|
|
199972
|
+
...option,
|
|
199973
|
+
value,
|
|
199974
|
+
options: updatedOptions
|
|
199975
|
+
}
|
|
199976
|
+
});
|
|
199977
|
+
} else if (isFunction) {
|
|
199978
|
+
command({
|
|
199979
|
+
value,
|
|
199980
|
+
commandsManager,
|
|
199981
|
+
servicesManager,
|
|
199982
|
+
options: updatedOptions
|
|
199983
|
+
});
|
|
199984
|
+
}
|
|
199985
|
+
});
|
|
199986
|
+
}
|
|
199987
|
+
};
|
|
199988
|
+
});
|
|
199989
|
+
};
|
|
199990
|
+
const {
|
|
199991
|
+
items,
|
|
199992
|
+
options
|
|
199993
|
+
} = componentProps;
|
|
199994
|
+
if (items?.length) {
|
|
199995
|
+
items.forEach(({
|
|
199996
|
+
options,
|
|
199997
|
+
id
|
|
199998
|
+
}) => {
|
|
199999
|
+
accumulator[id] = createEnhancedOptions(options, id);
|
|
200000
|
+
});
|
|
200001
|
+
} else if (options?.length) {
|
|
200002
|
+
accumulator[buttonId] = createEnhancedOptions(options, buttonId);
|
|
200003
|
+
} else if (options?.optionComponent) {
|
|
200004
|
+
accumulator[buttonId] = options.optionComponent;
|
|
200005
|
+
}
|
|
200006
|
+
return accumulator;
|
|
200007
|
+
}, {});
|
|
200008
|
+
api.initializeToolOptions(initializeOptionsWithEnhancements);
|
|
200009
|
+
}, [toolbarButtons, api, toolboxState, commandsManager, servicesManager]);
|
|
200010
|
+
const handleToolOptionChange = (toolName, optionName, newValue) => {
|
|
200011
|
+
api.handleToolOptionChange(toolName, optionName, newValue);
|
|
200012
|
+
};
|
|
200013
|
+
(0,react.useEffect)(() => {
|
|
200014
|
+
return () => {
|
|
200015
|
+
api.handleToolSelect(null);
|
|
200016
|
+
};
|
|
200017
|
+
}, []);
|
|
200018
|
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(ToolboxUI, Toolbox_extends({}, props, {
|
|
200019
|
+
title: title,
|
|
200020
|
+
toolbarButtons: toolbarButtons,
|
|
200021
|
+
toolboxState: toolboxState,
|
|
200022
|
+
handleToolSelect: id => api.handleToolSelect(id),
|
|
200023
|
+
handleToolOptionChange: handleToolOptionChange,
|
|
200024
|
+
onInteraction: onInteraction
|
|
200025
|
+
})));
|
|
200026
|
+
}
|
|
200027
|
+
/* harmony default export */ const Toolbox_Toolbox = (Toolbox);
|
|
200028
|
+
;// CONCATENATED MODULE: ../../ui-next/src/components/Toolbox/index.ts
|
|
200029
|
+
|
|
200030
|
+
|
|
200031
|
+
|
|
199976
200032
|
// EXTERNAL MODULE: ../../../node_modules/react-shepherd/dist/index.js
|
|
199977
200033
|
var dist = __webpack_require__(5302);
|
|
199978
200034
|
// EXTERNAL MODULE: ../node_modules/react-router/dist/index.js
|
|
@@ -409704,7 +409760,7 @@ function __disposeResources(env) {
|
|
|
409704
409760
|
/******/ // This function allow to reference async chunks
|
|
409705
409761
|
/******/ __webpack_require__.u = (chunkId) => {
|
|
409706
409762
|
/******/ // return url for filenames based on template
|
|
409707
|
-
/******/ return "" + ({"572":"polySeg","3054":"histogram-worker","3584":"suv-peak-worker"}[chunkId] || chunkId) + ".bundle." + {"44":"
|
|
409763
|
+
/******/ return "" + ({"572":"polySeg","3054":"histogram-worker","3584":"suv-peak-worker"}[chunkId] || chunkId) + ".bundle." + {"44":"248223cbd5284282963a","140":"7a5de4db1e8e78d53244","445":"ada0ef1412342d5599cb","572":"e73d9d124f22e40be8a9","612":"07fb99d653db74839730","914":"9372fff6a4624c35d259","1156":"b37b2a8d6dba5d35ef64","1471":"23ed44fce3b02968fa7b","1597":"ad76fdeb3061bcfa1681","1617":"2169d929628279d83b28","1727":"0e5ce8831ef8bb34899c","1836":"0cb6c000321d0863c41d","1920":"2e0f60f6b04c5b781064","2211":"a3eb113173d861685ea1","2327":"c60b7cf05680af5b70c1","2392":"c09eef47c2a8c6674225","3054":"dba1191f438be8396c73","3194":"052149a399b3ecec92c8","3236":"5cb72eb058e14d5d266e","3342":"0c3edb9855a615ef6a6e","3404":"c1aea18e16001cf20244","3584":"541fa8cf744041222c7e","3675":"bbe5f470f9c04976b51b","3722":"5e8f70021eefb2fe1508","3726":"1eb58097501c18d23329","4012":"e2d71adefdf700d9f3b1","4129":"2d2f56d83cc84af8fb4e","4202":"c8ddc4d76d963bc3176f","4444":"363fa1b70c8c1ef6745e","5323":"c1fe781cca10b6ace921","5350":"72ded9946d8ebecbb318","6552":"b595a3327cbdbe9245c8","6835":"d3700fdda3df47c5f085","7370":"f8725a8dc428f9e237b4","7516":"4a9c2a92ba1b593defaf","7778":"53b95f4c85063cc0353a","7853":"e56257f620547271b4dd","8218":"755f36e5b1663e48f304","8324":"ae1b5a7a34a85d846285","8362":"3e2e255355b2ee1beec7","8560":"929add0d5a4b24d234df","8792":"6ecd3510022078878c4b","9014":"ac341275cc94cdceef4b","9404":"829d1ce23cd52e6dfc89","9455":"4c6698fea09feff95f9f","9806":"a7c532f7be2473e93737"}[chunkId] + ".js";
|
|
409708
409764
|
/******/ };
|
|
409709
409765
|
/******/ })();
|
|
409710
409766
|
/******/
|