2020-03-10 20:11:12 +01:00
|
|
|
import React from 'react';
|
|
|
|
|
// Icons
|
2020-04-07 21:47:12 +02:00
|
|
|
|
2020-03-13 15:37:17 +01:00
|
|
|
import arrowDown from './../../assets/icons/arrow-down.svg';
|
2020-03-19 23:58:13 +01:00
|
|
|
import calendar from './../../assets/icons/calendar.svg';
|
2020-03-10 20:11:12 +01:00
|
|
|
import cancel from './../../assets/icons/cancel.svg';
|
2020-07-22 20:25:51 +02:00
|
|
|
import clipboard from './../../assets/icons/clipboard.svg';
|
2020-06-26 17:34:43 +02:00
|
|
|
import close from './../../assets/icons/close.svg';
|
2020-04-13 12:59:58 +02:00
|
|
|
import dottedCircle from './../../assets/icons/dotted-circle.svg';
|
|
|
|
|
import circledCheckmark from './../../assets/icons/circled-checkmark.svg';
|
2020-03-10 20:11:12 +01:00
|
|
|
import chevronDown from './../../assets/icons/chevron-down.svg';
|
2020-04-07 03:18:52 +02:00
|
|
|
import chevronLeft from './../../assets/icons/chevron-left.svg';
|
2020-03-10 20:11:12 +01:00
|
|
|
import chevronRight from './../../assets/icons/chevron-right.svg';
|
2020-04-10 18:33:14 +02:00
|
|
|
import eyeVisible from './../../assets/icons/eye-visible.svg';
|
|
|
|
|
import eyeHidden from './../../assets/icons/eye-hidden.svg';
|
2020-07-10 21:49:53 +02:00
|
|
|
import externalLink from './../../assets/icons/external-link.svg';
|
2020-04-08 18:00:07 +02:00
|
|
|
import groupLayers from './../../assets/icons/group-layers.svg';
|
2020-04-10 21:47:08 +02:00
|
|
|
import info from './../../assets/icons/info.svg';
|
2020-03-10 20:11:12 +01:00
|
|
|
import infoLink from './../../assets/icons/info-link.svg';
|
|
|
|
|
import launchArrow from './../../assets/icons/launch-arrow.svg';
|
|
|
|
|
import launchInfo from './../../assets/icons/launch-info.svg';
|
2020-06-26 17:34:43 +02:00
|
|
|
import link from './../../assets/icons/link.svg';
|
2020-04-07 21:47:12 +02:00
|
|
|
import listBullets from './../../assets/icons/list-bullets.svg';
|
2020-04-13 18:48:45 +02:00
|
|
|
import lock from './../../assets/icons/lock.svg';
|
2020-03-11 00:34:09 +01:00
|
|
|
import logoOhifSmall from './../../assets/icons/logo-ohif-small.svg';
|
2020-03-13 03:27:48 +01:00
|
|
|
import magnifier from './../../assets/icons/magnifier.svg';
|
2020-03-11 00:34:09 +01:00
|
|
|
import notificationwarningDiamond from './../../assets/icons/notificationwarning-diamond.svg';
|
2020-04-10 01:31:21 +02:00
|
|
|
import pencil from './../../assets/icons/pencil.svg';
|
2020-04-13 18:48:45 +02:00
|
|
|
import profile from './../../assets/icons/profile.svg';
|
2020-04-08 18:00:07 +02:00
|
|
|
import pushLeft from './../../assets/icons/push-left.svg';
|
|
|
|
|
import pushRight from './../../assets/icons/push-right.svg';
|
2020-03-10 20:11:12 +01:00
|
|
|
import settings from './../../assets/icons/settings.svg';
|
2020-03-11 00:34:09 +01:00
|
|
|
import sorting from './../../assets/icons/sorting.svg';
|
2020-03-10 20:11:12 +01:00
|
|
|
import sortingActiveDown from './../../assets/icons/sorting-active-down.svg';
|
|
|
|
|
import sortingActiveUp from './../../assets/icons/sorting-active-up.svg';
|
2020-04-13 12:59:58 +02:00
|
|
|
import tracked from './../../assets/icons/tracked.svg';
|
2020-06-26 17:34:43 +02:00
|
|
|
import unlink from './../../assets/icons/unlink.svg';
|
2020-03-10 20:11:12 +01:00
|
|
|
|
2020-04-07 03:18:52 +02:00
|
|
|
/** Tools */
|
|
|
|
|
import toolZoom from './../../assets/icons/tool-zoom.svg';
|
2020-04-08 18:04:50 +02:00
|
|
|
import toolCapture from './../../assets/icons/tool-capture.svg';
|
|
|
|
|
import toolLayout from './../../assets/icons/tool-layout.svg';
|
|
|
|
|
import toolMore from './../../assets/icons/tool-more-menu.svg';
|
|
|
|
|
import toolMove from './../../assets/icons/tool-move.svg';
|
|
|
|
|
import toolWindow from './../../assets/icons/tool-window-level.svg';
|
2020-04-09 00:31:33 +02:00
|
|
|
import toolAnnotate from './../../assets/icons/tool-annotate.svg';
|
|
|
|
|
import toolBidirectional from './../../assets/icons/tool-bidirectional.svg';
|
|
|
|
|
import toolElipse from './../../assets/icons/tool-elipse.svg';
|
|
|
|
|
import toolLength from './../../assets/icons/tool-length.svg';
|
2020-04-07 03:18:52 +02:00
|
|
|
|
2020-06-26 21:49:34 +02:00
|
|
|
/** Old OHIF */
|
|
|
|
|
import oldBars from './../../assets/icons/old-bars.svg';
|
|
|
|
|
import oldCircle from './../../assets/icons/old-circle.svg';
|
|
|
|
|
import oldEllipseH from './../../assets/icons/old-ellipse-h.svg';
|
|
|
|
|
import oldInvert from './../../assets/icons/old-invert.svg';
|
|
|
|
|
import oldRotateRight from './../../assets/icons/old-rotate-right.svg';
|
2020-06-26 21:56:19 +02:00
|
|
|
import oldYoutube from './../../assets/icons/old-youtube.svg';
|
|
|
|
|
import oldDotCircle from './../../assets/icons/old-dot-circle.svg';
|
|
|
|
|
import oldAngleLeft from './../../assets/icons/old-angle-left.svg';
|
2020-06-26 21:59:47 +02:00
|
|
|
import oldReset from './../../assets/icons/old-reset.svg';
|
2020-06-26 22:03:17 +02:00
|
|
|
import oldCircleO from './../../assets/icons/old-circle-o.svg';
|
2020-07-03 18:39:41 +02:00
|
|
|
import oldTrash from './../../assets/icons/old-trash.svg';
|
2020-06-26 21:59:47 +02:00
|
|
|
|
2020-03-10 20:11:12 +01:00
|
|
|
const ICONS = {
|
2020-03-13 15:37:17 +01:00
|
|
|
'arrow-down': arrowDown,
|
2020-03-19 23:58:13 +01:00
|
|
|
calendar: calendar,
|
2020-03-10 20:11:12 +01:00
|
|
|
cancel: cancel,
|
2020-07-22 20:25:51 +02:00
|
|
|
clipboard: clipboard,
|
2020-06-26 17:34:43 +02:00
|
|
|
close: close,
|
2020-04-13 12:59:58 +02:00
|
|
|
'dotted-circle': dottedCircle,
|
|
|
|
|
'circled-checkmark': circledCheckmark,
|
2020-03-10 20:11:12 +01:00
|
|
|
'chevron-down': chevronDown,
|
2020-04-07 03:18:52 +02:00
|
|
|
'chevron-left': chevronLeft,
|
2020-03-10 20:11:12 +01:00
|
|
|
'chevron-right': chevronRight,
|
2020-04-10 18:33:14 +02:00
|
|
|
'eye-visible': eyeVisible,
|
|
|
|
|
'eye-hidden': eyeHidden,
|
2020-07-10 21:49:53 +02:00
|
|
|
'external-link': externalLink,
|
2020-04-08 18:00:07 +02:00
|
|
|
'group-layers': groupLayers,
|
2020-04-10 21:47:08 +02:00
|
|
|
info: info,
|
2020-03-10 20:11:12 +01:00
|
|
|
'info-link': infoLink,
|
|
|
|
|
'launch-arrow': launchArrow,
|
|
|
|
|
'launch-info': launchInfo,
|
2020-06-26 17:34:43 +02:00
|
|
|
link: link,
|
2020-04-07 21:47:12 +02:00
|
|
|
'list-bullets': listBullets,
|
2020-04-13 18:48:45 +02:00
|
|
|
lock: lock,
|
2020-03-11 00:34:09 +01:00
|
|
|
'logo-ohif-small': logoOhifSmall,
|
2020-03-13 03:27:48 +01:00
|
|
|
magnifier: magnifier,
|
2020-03-11 00:34:09 +01:00
|
|
|
'notificationwarning-diamond': notificationwarningDiamond,
|
2020-04-10 01:31:21 +02:00
|
|
|
pencil: pencil,
|
2020-04-13 18:48:45 +02:00
|
|
|
profile: profile,
|
2020-04-08 18:00:07 +02:00
|
|
|
'push-left': pushLeft,
|
|
|
|
|
'push-right': pushRight,
|
2020-03-10 20:11:12 +01:00
|
|
|
settings: settings,
|
|
|
|
|
'sorting-active-down': sortingActiveDown,
|
|
|
|
|
'sorting-active-up': sortingActiveUp,
|
|
|
|
|
sorting: sorting,
|
2020-04-13 12:59:58 +02:00
|
|
|
tracked: tracked,
|
2020-06-26 17:34:43 +02:00
|
|
|
unlink: unlink,
|
2020-04-07 03:18:52 +02:00
|
|
|
|
|
|
|
|
/** Tools */
|
|
|
|
|
'tool-zoom': toolZoom,
|
2020-04-08 18:04:50 +02:00
|
|
|
'tool-capture': toolCapture,
|
|
|
|
|
'tool-layout': toolLayout,
|
|
|
|
|
'tool-more-menu': toolMore,
|
|
|
|
|
'tool-move': toolMove,
|
|
|
|
|
'tool-window-level': toolWindow,
|
2020-04-09 00:31:33 +02:00
|
|
|
'tool-annotate': toolAnnotate,
|
|
|
|
|
'tool-bidirectional': toolBidirectional,
|
|
|
|
|
'tool-elipse': toolElipse,
|
|
|
|
|
'tool-length': toolLength,
|
2020-06-26 21:49:34 +02:00
|
|
|
|
|
|
|
|
/** Old OHIF */
|
|
|
|
|
'old-bars': oldBars,
|
|
|
|
|
'old-circle': oldCircle,
|
|
|
|
|
'old-ellipse-h': oldEllipseH,
|
|
|
|
|
'old-invert': oldInvert,
|
2020-06-26 21:56:19 +02:00
|
|
|
'old-rotate-right': oldRotateRight,
|
|
|
|
|
'old-youtube': oldYoutube,
|
|
|
|
|
'old-dot-circle': oldDotCircle,
|
2020-06-26 21:59:47 +02:00
|
|
|
'old-angle-left': oldAngleLeft,
|
2020-06-26 22:03:17 +02:00
|
|
|
'old-reset': oldReset,
|
2020-07-03 18:39:41 +02:00
|
|
|
'old-circle-o': oldCircleO,
|
2020-07-10 21:49:53 +02:00
|
|
|
'old-trash': oldTrash,
|
2020-03-10 20:11:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Return the matching SVG Icon as a React Component.
|
|
|
|
|
* Results in an inlined SVG Element. If there's no match,
|
|
|
|
|
* return `null`
|
|
|
|
|
*/
|
|
|
|
|
export default function getIcon(key, props) {
|
|
|
|
|
if (!key || !ICONS[key]) {
|
|
|
|
|
return React.createElement('div', null, 'Missing Icon');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return React.createElement(ICONS[key], props);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export { ICONS };
|