Compare commits

..
Author SHA1 Message Date
ohif-bot 0d02ddd586 chore(release): publish [skip ci]
- @ohif/extension-cornerstone@0.50.4
 - @ohif/viewer@0.50.17
2019-09-04 20:07:11 +00:00
Danny Brown 36c95fb897 ci: parallize terser (#864)
* ci: parallize terser

* Missing NODE_ENV set

* show progress for demo build
2019-09-04 15:58:51 -04:00
ohif-bot e9f8941abd chore(release): publish [skip ci]
- @ohif/extension-cornerstone@0.50.3
 - @ohif/extension-dicom-html@0.50.3
 - @ohif/extension-dicom-microscopy@0.50.4
 - @ohif/extension-dicom-pdf@0.50.3
 - @ohif/extension-vtk@0.50.6
 - @ohif/core@0.50.5
 - @ohif/i18n@0.50.3
 - @ohif/ui@0.50.3
 - @ohif/viewer@0.50.16
2019-09-04 19:15:38 +00:00
Danny Brown 8e96d66859 ci: timeout and publish issues (#861)
* ci: test docs-publish

* Specify to use prod

* Babel should transpile with env set by webpack

* in-progress

* in-progress

* Polyfill for ie11 and edge features

* Ditch polyfills w/ babel - we'll use a service for now

* Bump tools version; shift vtk.js up a layer

* Specify we shouldn't target older than IE 11

* ditch babel plugins that should be covered by preset-env

* Add a top level build demo command

* Let our babel config determine settings

* Same babel fixes as PWA

* Rebuild deps that don't satisfy our target

* Mini helper script for excluding all node_modules, except...

* Shift vtk.js dep up a layer

* Kill core-js

* Export in a node happy way

* Updated yarn lock

* Set NODE_ENV when launching anything w/ WebPack

* docs: updated FAQ

* docs: on browser support

* Add support for redux browser extension

* misc. small clean-up

* docs: Remove roadmap page; add browser-support to sidebar

* Formatting

* Remove roadmap links

* Formatting

* ci: Remove config syntax error

* Simplified bug report template

* update community request template

* Update question's template

* simplify build scripts

* specify new script names

* fix: for measurement api being pruned by minimizer in prod builds

* Use named exports

* Simplify config

* Let's not do so much heavy lifting for a dev-server build

* fix dev build

* Add hotkeys to demo

* fix: jest babel config and env specific configs

* Remove call to non-existant command

* Shift experimental proposal plugin up a layer

* Use `https`

* Try with reduced number of package exceptions

* Try to resolve cypress issue

* Try to fix cypress issue in CI

* Skip https

* Set node_env before building with WebPack

* Watch command output

* ci: no output timeout increase
2019-09-04 15:00:45 -04:00
ohif-bot 3691297054 chore(release): publish [skip ci]
- @ohif/extension-cornerstone@0.50.2
 - @ohif/extension-dicom-html@0.50.2
 - @ohif/extension-dicom-microscopy@0.50.3
 - @ohif/extension-dicom-pdf@0.50.2
 - @ohif/extension-vtk@0.50.5
 - @ohif/core@0.50.4
 - @ohif/i18n@0.50.2
 - @ohif/ui@0.50.2
 - @ohif/viewer@0.50.15
2019-09-04 18:07:38 +00:00
Danny Brown 49d343941e fix: measurementsAPI issue caused by production build (#842)
* ci: test docs-publish

* Specify to use prod

* Babel should transpile with env set by webpack

* in-progress

* in-progress

* Polyfill for ie11 and edge features

* Ditch polyfills w/ babel - we'll use a service for now

* Bump tools version; shift vtk.js up a layer

* Specify we shouldn't target older than IE 11

* ditch babel plugins that should be covered by preset-env

* Add a top level build demo command

* Let our babel config determine settings

* Same babel fixes as PWA

* Rebuild deps that don't satisfy our target

* Mini helper script for excluding all node_modules, except...

* Shift vtk.js dep up a layer

* Kill core-js

* Export in a node happy way

* Updated yarn lock

* Set NODE_ENV when launching anything w/ WebPack

* docs: updated FAQ

* docs: on browser support

* Add support for redux browser extension

* misc. small clean-up

* docs: Remove roadmap page; add browser-support to sidebar

* Formatting

* Remove roadmap links

* Formatting

* ci: Remove config syntax error

* Simplified bug report template

* update community request template

* Update question's template

* simplify build scripts

* specify new script names

* fix: for measurement api being pruned by minimizer in prod builds

* Use named exports

* Simplify config

* Let's not do so much heavy lifting for a dev-server build

* fix dev build

* Add hotkeys to demo

* fix: jest babel config and env specific configs

* Remove call to non-existant command

* Shift experimental proposal plugin up a layer

* Use `https`

* Try with reduced number of package exceptions

* Try to resolve cypress issue

* Try to fix cypress issue in CI

* Skip https
2019-09-04 13:53:13 -04:00
Danny Brown 25e7232660 docs: Update ohif-viewer package links 2019-09-04 10:55:54 -04:00
ohif-bot 8c3b7c8573 chore(release): publish [skip ci]
- @ohif/extension-dicom-microscopy@0.50.2
 - @ohif/viewer@0.50.14
2019-09-03 12:18:48 +00:00
Erik Ziegler dbaf5c5611 fix(dicom-microscopy): Update dicom-microscopy-viewer to 0.6.1 to fix Google Cloud usage with WSI images (#843) 2019-09-03 14:07:46 +02:00
ohif-bot 1b68c307fc chore(release): publish [skip ci]
- @ohif/viewer@0.50.13
2019-09-03 00:49:13 +00:00
Gustavo André Lelis 7a9b477609 fix: 🐛 Activating Pan and Zoom on right and middle click by def (#841) 2019-09-02 20:38:48 -04:00
ohif-bot 8f758186c1 chore(release): publish [skip ci]
- @ohif/viewer@0.50.12
2019-08-29 14:38:57 +00:00
Danny Brown d48b617e1c fix: asset resolution when at non-root route (#828)
* ci: test docs-publish

* Specify to use prod

* Babel should transpile with env set by webpack

* chore: production defaults to true; set in --env.production by cli

* Remove lingering merge issue

* Add minimification plugins

* Need relative URLs to find root assets

* Default public url to forward slash in define plugin

* Don't wrap w/ react-hot-loader if we're building for production

* No need to log extensions

* Minimize using terser; and minimize css

* Import redux from es; this bypasses commonjs as import and fixes our "production build" warning

* Split commone webpack build for now to test hotfix

* postfix slash

* undefined safe env access

* Try to fix node_env prod issue w/ redux

* Set NODE_ENV production for all prod builds

* Syntax error

* nix tests

* Increase max amount of available memory

* Don't run bundle analyzer by default

* fix: asset resolution when at non-root route
2019-08-29 10:29:38 -04:00
ohif-bot 7c2b444cf9 chore(release): publish [skip ci]
- @ohif/viewer@0.50.11
2019-08-29 13:03:45 +00:00
Danny Brown d86f758125 ci: set NODE_ENV, fix out of memory issue, fix hot reload bundling
* ci: test docs-publish

* Specify to use prod

* Babel should transpile with env set by webpack

* chore: production defaults to true; set in --env.production by cli

* Remove lingering merge issue

* Add minimification plugins

* Need relative URLs to find root assets

* Default public url to forward slash in define plugin

* Don't wrap w/ react-hot-loader if we're building for production

* No need to log extensions

* Minimize using terser; and minimize css

* Import redux from es; this bypasses commonjs as import and fixes our "production build" warning

* Split commone webpack build for now to test hotfix

* postfix slash

* undefined safe env access

* Try to fix node_env prod issue w/ redux

* Set NODE_ENV production for all prod builds

* Syntax error

* nix tests

* Increase max amount of available memory

* Don't run bundle analyzer by default
2019-08-29 08:53:33 -04:00
ohif-bot d26035fa55 chore(release): publish [skip ci]
- @ohif/viewer@0.50.10
2019-08-27 19:28:23 +00:00
Danny Brown ec4e2ef1a6 ci: fix dev-server script (#811)
* ci: test docs-publish

* Require unit tests for dry run

* ci: Make sure our docs publish is executable

* Try to correct path issue

* Try repo prefix

* Try as yarn command

* Need a workspace to attach to from previous step

* Add before we call our bash script

* See if we can enforce commands being available -- or just install locally?

* Try again

* Try SSH

* Include username in gh https url

* Note regarding failure on PR branches

* Remove docs publish from PR workflow

* chore: ability to specify an alternative html-template at build time

* chore: add command to build demo PWA website output

* chore: remove unused CI code

* Testing GCP capabilities

* syntax

* Naming

* naming

* chore: WebPack output progress that we care about

* chore: Only publish the app config we care about

* PWA should publish source map

* Unused index.html file

* chore: Remove unused copy-webpack-plugin ignore

* Don't generate source map until we resolve memory issue

* ci: attempt to publish with GCP bucket deploy

* Update dev config to use new template loccations and env vars
2019-08-27 15:19:23 -04:00
Danny Brown 619d363243 ci: GCP deploy (#810)
* ci: test docs-publish

* Require unit tests for dry run

* ci: Make sure our docs publish is executable

* Try to correct path issue

* Try repo prefix

* Try as yarn command

* Need a workspace to attach to from previous step

* Add before we call our bash script

* See if we can enforce commands being available -- or just install locally?

* Try again

* Try SSH

* Include username in gh https url

* Note regarding failure on PR branches

* Remove docs publish from PR workflow

* chore: ability to specify an alternative html-template at build time

* chore: add command to build demo PWA website output

* chore: remove unused CI code

* Testing GCP capabilities

* syntax

* Naming

* naming

* chore: WebPack output progress that we care about

* chore: Only publish the app config we care about

* PWA should publish source map

* Unused index.html file

* chore: Remove unused copy-webpack-plugin ignore

* Don't generate source map until we resolve memory issue

* ci: attempt to publish with GCP bucket deploy
2019-08-27 14:43:44 -04:00
Danny Brown 073c0af7f7 GitHub labels appear to prefer short-hand syntax over literal emojis 2019-08-27 12:59:11 -04:00
Danny Brown 4aa49f4e26 Add awaiting review label to stale bot ignore 2019-08-27 10:59:58 -04:00
ohif-bot a6dbe952d8 chore(release): publish [skip ci]
- @ohif/viewer@0.50.9
2019-08-27 03:03:03 +00:00
Danny Brown 196694f5a6 ci: test gcp demo site build (#805)
* ci: test docs-publish

* Require unit tests for dry run

* ci: Make sure our docs publish is executable

* Try to correct path issue

* Try repo prefix

* Try as yarn command

* Need a workspace to attach to from previous step

* Add before we call our bash script

* See if we can enforce commands being available -- or just install locally?

* Try again

* Try SSH

* Include username in gh https url

* Note regarding failure on PR branches

* Remove docs publish from PR workflow

* chore: ability to specify an alternative html-template at build time

* chore: add command to build demo PWA website output

* chore: remove unused CI code

* Testing GCP capabilities

* syntax

* Naming

* naming
2019-08-26 22:54:18 -04:00
Danny Brown 552df4c9a8 ci: test docs-publish (#803)
* ci: test docs-publish

* Require unit tests for dry run

* ci: Make sure our docs publish is executable

* Try to correct path issue

* Try repo prefix

* Try as yarn command

* Need a workspace to attach to from previous step

* Add before we call our bash script

* See if we can enforce commands being available -- or just install locally?

* Try again

* Try SSH

* Include username in gh https url

* Note regarding failure on PR branches

* Remove docs publish from PR workflow
2019-08-26 22:19:05 -04:00
Danny Brown 467712f8cd chore: Add Stale Bot config (#802) 2019-08-26 14:47:18 -04:00
ohif-bot 681c160f08 chore(release): publish [skip ci]
- @ohif/extension-vtk@0.50.4
 - @ohif/core@0.50.3
 - @ohif/viewer@0.50.8
2019-08-26 13:57:47 +00:00
Omar Toutounji a88d865a9b fix(Studies): Qidosupportsincludefield should be true by default (#801)
* fix(Studies): qidoSupportsIncludeField should be true by default
* avoided creating new var
2019-08-26 09:46:25 -04:00
Danny Brown d76fab0bc9 Merge pull request #792 from dannyrb/docs/testing-guidelines
docs: testing
2019-08-22 12:43:46 -04:00
ohif-bot e74f8fb536 chore(release): publish [skip ci]
- @ohif/viewer@0.50.7
2019-08-22 15:28:03 +00:00
Danny Brown ba20093b81 Merge pull request #794 from trustsitka/fix-ExpandableToolMenu-props
fix: 🐛 Update for changes in ExpandableToolMenu props
2019-08-22 11:17:05 -04:00
Danny Brown ee68b7bcd3 Merge branch 'master' into fix-ExpandableToolMenu-props 2019-08-22 10:33:23 -04:00
ohif-bot 9138b554e3 chore(release): publish [skip ci]
- @ohif/extension-vtk@0.50.3
 - @ohif/core@0.50.2
 - @ohif/viewer@0.50.6
2019-08-22 13:56:22 +00:00
Danny Brown 89079e9d37 Merge pull request #770 from OHIF/chore/core-cleanup
chore: Cleanup legacy code in core
2019-08-22 09:46:35 -04:00
David Wire e09670ada2 fix: 🐛 Update for changes in ExpandableToolMenu props
The props for ExpandableToolMenu were changed from expecting `text` to
expecting `label` for the menu's label. These changes make sure we're
providing it that way.
2019-08-22 07:46:16 -06:00
Danny Brown 84cd2237c5 Merge branch 'master' into chore/core-cleanup 2019-08-22 09:32:07 -04:00
Danny Brown 0a2acdf2a0 Merge branch 'master' into docs/testing-guidelines 2019-08-21 23:28:58 -04:00
dannyrb be6e53db0d Shift to bottom 2019-08-21 23:25:31 -04:00
dannyrb aa48749959 Testing dorito 2019-08-21 23:24:03 -04:00
dannyrb df6fbb416d docs: better pre-amble for testing doc 2019-08-21 23:06:30 -04:00
dannyrb 95cff27b95 docs: expanding on testing 2019-08-21 22:54:00 -04:00
dannyrb 4c322067a0 Kent quote 2019-08-21 22:26:02 -04:00
dannyrb 312e5826e6 e2e test guidance 2019-08-21 20:42:41 -04:00
dannyrb 4d219bdaca Small updates 2019-08-21 17:42:33 -04:00
dannyrb f56bed2aa4 docs: in-progress 2019-08-21 16:20:47 -04:00
Danny Brown d0c0690e0c Merge branch 'master' into chore/core-cleanup 2019-08-16 14:04:12 -04:00
Erik Ziegler be8ab62ab4 refactor: Cleanup legacy code in core 2019-08-14 17:48:29 +02:00
103 changed files with 2647 additions and 1922 deletions

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
# Browsers that we support
> 1%
IE 11
not dead
not op_mini all
+69
View File
@@ -0,0 +1,69 @@
#!/bin/bash
# Set directory to location of this script
# https://stackoverflow.com/a/3355423/1867984
cd "$(dirname "$0")"
yarn -v
node -v
echo 'Installing Gitbook CLI'
yarn global bin
yarn config get prefix
yarn config set prefix ~/.yarn
export PATH="$PATH:`yarn global bin`"
echo 'Running Gitbook installation'
# Generate all version's GitBook output
# For each directory in /docs ...
cd ./../docs/
for D in *; do
if [ -d "${D}" ]; then
echo "Generating output for: ${D}"
cd "${D}"
# Clear previous output, generate new
rm -rf _book
gitbook install
gitbook build
cd ..
fi
done
# Move CNAME File into `latest`
cp CNAME ./latest/_book/CNAME
# Create a history folder in our latest version's output
mkdir ./latest/_book/history
# Move each version's files to latest's history folder
for D in *; do
if [ -d "${D}" ]; then
if [ "${D}" == v* ] ; then
echo "Moving ${D} to the latest version's history folder"
mkdir "./latest/_book/history/${D}"
cp -v -r "./${D}/_book"/* "./latest/_book/history/${D}"
fi
fi
done
# Back to repo root
cd ..
echo "Done generating documentation output"
echo 'STARTING PUBLISH'
# WILL ALWAYS FAIL IF INITIATED FROM PR BRANCH
./node_modules/.bin/gh-pages \
--silent \
--repo https://$GITHUB_TOKEN@github.com/OHIF/Viewers.git \
--message 'Autogenerated Message: [ci skip]' \
--dist docs/latest/_book
+36 -40
View File
@@ -187,13 +187,10 @@ jobs:
no\n" > ~/.ssh/config
- run: git config --global user.email "danny.ri.brown+ohif-bot@gmail.com"
- run: git config --global user.name "ohif-bot"
- run: yarn global add gitbook-cli
- run: yarn global add gh-pages
- run:
name: Generate Docs
command: yarn run staticDeploy
- run:
name: Publish Docs
command: yarn run docs:publish
- run: chmod +x ~/repo/.circleci/build-and-publish-docs.sh
- run: ~/repo/.circleci/build-and-publish-docs.sh
docker_publish:
<<: *defaults
@@ -224,30 +221,32 @@ jobs:
docker push ohif/$IMAGE_NAME:latest
fi
deploy_demo_site:
viewer_demo_build:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
# Build & Test
- run:
name: 'Build Demo Site, Upload SourceMaps, Send Deploy Notification'
name: 'Build Demo Site'
command: yarn run build:demo
no_output_timeout: 30m
- run:
name: 'Upload SourceMaps, Send Deploy Notification'
command: |
yarn build:demo:ci
perl -i -pe 's#</head>#`cat .circleci/rollbar.html` #e' build/index.html
export FILE_1=$(find ./build/static/js -type f -name "2.*.js" -exec basename {} \;)
export FILE_MAIN=$(find ./build/static/js -type f -name "main.*.js" -exec basename {} \;)
export FILE_RUNTIME_MAIN=$(find ./build/static/js -type f -name "runtime~main.*.js" -exec basename {} \;)
curl https://api.rollbar.com/api/1/sourcemap -F source_map=@build/static/js/$FILE_1.map -F access_token=$ROLLBAR_TOKEN -F version=$CIRCLE_SHA1 -F minified_url=https://$GOOGLE_STORAGE_BUCKET/static/js/$FILE_1
curl https://api.rollbar.com/api/1/sourcemap -F source_map=@build/static/js/$FILE_MAIN.map -F access_token=$ROLLBAR_TOKEN -F version=$CIRCLE_SHA1 -F minified_url=https://$GOOGLE_STORAGE_BUCKET/static/js/$FILE_MAIN
curl https://api.rollbar.com/api/1/sourcemap -F source_map=@build/static/js/$FILE_RUNTIME_MAIN.map -F access_token=$ROLLBAR_TOKEN -F version=$CIRCLE_SHA1 -F minified_url=https://$GOOGLE_STORAGE_BUCKET/static/js/$FILE_RUNTIME_MAIN
# export FILE_1=$(find ./build/static/js -type f -name "2.*.js" -exec basename {} \;)
# export FILE_MAIN=$(find ./build/static/js -type f -name "main.*.js" -exec basename {} \;)
# export FILE_RUNTIME_MAIN=$(find ./build/static/js -type f -name "runtime~main.*.js" -exec basename {} \;)
# curl https://api.rollbar.com/api/1/sourcemap -F source_map=@build/static/js/$FILE_1.map -F access_token=$ROLLBAR_TOKEN -F version=$CIRCLE_SHA1 -F minified_url=https://$GOOGLE_STORAGE_BUCKET/static/js/$FILE_1
# curl https://api.rollbar.com/api/1/sourcemap -F source_map=@build/static/js/$FILE_MAIN.map -F access_token=$ROLLBAR_TOKEN -F version=$CIRCLE_SHA1 -F minified_url=https://$GOOGLE_STORAGE_BUCKET/static/js/$FILE_MAIN
# curl https://api.rollbar.com/api/1/sourcemap -F source_map=@build/static/js/$FILE_RUNTIME_MAIN.map -F access_token=$ROLLBAR_TOKEN -F version=$CIRCLE_SHA1 -F minified_url=https://$GOOGLE_STORAGE_BUCKET/static/js/$FILE_RUNTIME_MAIN
curl --request POST https://api.rollbar.com/api/1/deploy/ -F access_token=$ROLLBAR_TOKEN -F environment=$GOOGLE_STORAGE_BUCKET -F revision=$CIRCLE_SHA1 -F local_username=CircleCI
# Persist :+1:
- persist_to_workspace:
root: ~/repo
paths: .
demo_site_publish:
viewer_demo_publish:
working_directory: ~/repo
docker:
- image: google/cloud-sdk
@@ -259,18 +258,13 @@ jobs:
- run:
name: Deploy latest version to viewer.ohif.org
command: |
# This file will exist if a new version was published by
# our `semantic-release` command in the previous job
#if [[ ! -e tmp/updated-version.txt ]]; then
# exit 0
#else
echo $GCLOUD_SERVICE_KEY | gcloud auth activate-service-account --key-file=-
gcloud --quiet config set project ${GOOGLE_PROJECT_ID}
gcloud --quiet config set compute/zone ${GOOGLE_COMPUTE_ZONE}
gsutil -m rm gs://$GOOGLE_STORAGE_BUCKET/**
gsutil -m rsync -R build gs://$GOOGLE_STORAGE_BUCKET
#fi
# https://circleci.com/docs/2.0/google-auth/#authorization
echo $GCLOUD_SERVICE_KEY | gcloud auth activate-service-account --key-file=-
gcloud --quiet config set project ${GOOGLE_PROJECT_ID}
gcloud --quiet config set compute/zone ${GOOGLE_COMPUTE_ZONE}
# Remove all files in Storage Bucket; Push latest
gsutil -m rm gs://$GOOGLE_STORAGE_BUCKET/**
gsutil -m rsync -R platform/viewer/dist gs://$GOOGLE_STORAGE_BUCKET
workflows:
version: 2
@@ -288,7 +282,8 @@ workflows:
# Cypress job added by `cypress-io` orb
- cypress/run:
pre-steps:
- run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v' # Use yarn latest
- run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global
add wait-on' # Use yarn latest
yarn: true
store_artifacts: true
start: yarn run dev
@@ -312,7 +307,8 @@ workflows:
# Cypress job added by `cypress-io` orb
- cypress/run:
pre-steps:
- run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v' # Use yarn latest
- run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global
add wait-on' # Use yarn latest
yarn: true
record: true
store_artifacts: true
@@ -330,17 +326,17 @@ workflows:
requires:
- cypress/run
# Update docs.ohif.org
# - docs_publish:
# requires:
# - cypress/run
- docs_publish:
requires:
- cypress/run
# Update hub.docker.org
# - docker_publish:
# requires:
# - npm_publish
# Update viewer.ohif.org
# - build_demo_site:
# requires:
# - cypress/run
# - demo_site_publish:
# requires:
# - build_demo_site
- viewer_demo_build:
requires:
- cypress/run
- viewer_demo_publish:
requires:
- viewer_demo_build
-15
View File
@@ -1,15 +0,0 @@
<script>
// Note: This is a client access token so there is no issue with having it publicly available
var _rollbarConfig = {
accessToken: "739c64cd39e84592ba062bc29aac9769",
captureUncaught: true,
captureUnhandledRejections: true,
payload: {
environment: "viewer.ohif.org"
}
};
// Rollbar Snippet
!function(r){var e={};function o(n){if(e[n])return e[n].exports;var t=e[n]={i:n,l:!1,exports:{}};return r[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=r,o.c=e,o.d=function(r,e,n){o.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},o.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,e){if(1&e&&(r=o(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var t in r)o.d(n,t,function(e){return r[e]}.bind(null,t));return n},o.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(e,"a",e),e},o.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},o.p="",o(o.s=0)}([function(r,e,o){var n=o(1),t=o(4);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdnjs.cloudflare.com/ajax/libs/rollbar.js/2.7.1/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,e,o){var n=o(2);function t(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}var a=0;function l(r,e){this.options=r,this._rollbarOldOnError=null;var o=a++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}var i=o(3),d=function(r,e){return new l(r,e)},c=function(r){return new i(d,r)};function s(r){return t(function(){var e=Array.prototype.slice.call(arguments,0),o={shim:this,method:r,args:e,ts:new Date};window._rollbarShims[this.shimId()].messages.push(o)})}l.prototype.loadFull=function(r,e,o,n,a){var l=!1,i=e.createElement("script"),d=e.getElementsByTagName("script")[0],c=d.parentNode;i.crossOrigin="",i.src=n.rollbarJsUrl,o||(i.async=!0),i.onload=i.onreadystatechange=t(function(){if(!(l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){i.onload=i.onreadystatechange=null;try{c.removeChild(i)}catch(r){}l=!0,function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,t,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(t=n.args||[],i=0;i<t.length;++i)if("function"==typeof(l=t[i])){l(e);break}}"function"==typeof a&&a(e)}()}}),c.insertBefore(i,d)},l.prototype.wrap=function(r,e,o){try{var n;if(n="function"==typeof e?e:function(){return e||{}},"function"!=typeof r)return r;if(r._isWrap)return r;if(!r._rollbar_wrapped&&(r._rollbar_wrapped=function(){o&&"function"==typeof o&&o.apply(this,arguments);try{return r.apply(this,arguments)}catch(o){var e=o;throw e&&("string"==typeof e&&(e=new String(e)),e._rollbarContext=n()||{},e._rollbarContext._wrappedSource=r.toString(),window._rollbarWrappedError=e),e}},r._rollbar_wrapped._isWrap=!0,r.hasOwnProperty))for(var t in r)r.hasOwnProperty(t)&&(r._rollbar_wrapped[t]=r[t]);return r._rollbar_wrapped}catch(e){return r}};for(var p="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleUnhandledRejection,captureEvent,captureDomContentLoaded,captureLoad".split(","),u=0;u<p.length;++u)l.prototype[p[u]]=s(p[u]);r.exports={setupShim:function(r,e){if(r){var o=e.globalAlias||"Rollbar";if("object"==typeof r[o])return r[o];r._rollbarShims={},r._rollbarWrappedError=null;var a=new c(e);return t(function(){e.captureUncaught&&(a._rollbarOldOnError=r.onerror,n.captureUncaughtExceptions(r,a,!0),n.wrapGlobals(r,a,!0)),e.captureUnhandledRejections&&n.captureUnhandledRejections(r,a,!0);var t=e.autoInstrument;return!1!==e.enabled&&(void 0===t||!0===t||"object"==typeof t&&t.network)&&r.addEventListener&&(r.addEventListener("load",a.captureLoad.bind(a)),r.addEventListener("DOMContentLoaded",a.captureDomContentLoaded.bind(a))),r[o]=a,a})()}},Rollbar:c}},function(r,e){function o(r,e,o){if(e.hasOwnProperty&&e.hasOwnProperty("addEventListener")){for(var n=e.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var t=function(e,o,t){n.call(this,e,r.wrap(o),t)};t._rollbarOldAdd=n,t.belongsToShim=o,e.addEventListener=t;for(var a=e.removeEventListener;a._rollbarOldRemove&&a.belongsToShim;)a=a._rollbarOldRemove;var l=function(r,e,o){a.call(this,r,e&&e._rollbar_wrapped||e,o)};l._rollbarOldRemove=a,l.belongsToShim=o,e.removeEventListener=l}}r.exports={captureUncaughtExceptions:function(r,e,o){if(r){var n;if("function"==typeof e._rollbarOldOnError)n=e._rollbarOldOnError;else if(r.onerror){for(n=r.onerror;n._rollbarOldOnError;)n=n._rollbarOldOnError;e._rollbarOldOnError=n}var t=function(){var o=Array.prototype.slice.call(arguments,0);!function(r,e,o,n){r._rollbarWrappedError&&(n[4]||(n[4]=r._rollbarWLine truncated
// End Rollbar Snippet
</script>
</head>
+15 -21
View File
@@ -2,38 +2,32 @@
name: "\U0001F41B Bug report"
about: Create a report to help us improve
title: ''
labels: 'Bug Report :bug:'
labels: 'Community: Report :bug:'
assignees: ''
---
**Before Creating an issue**
> **Before Creating an issue**
>
> - Are you running the latest version?
> - Are you reporting to the correct repository?
> - Did you search existing issues?
- Are you running the latest version?
- Are you reporting to the correct repository?
- Did you search existing issues?
## Bug Report
**Describe the bug**
### Describe the Bug
_A clear and concise description of what the bug is._
**Steps To Reproduce**
### What steps can we follow to reproduce the bug?
1. [First Step]
2. [Second Step]
1. First step
2. Second step
3. ...
```
```js
Please use code blocks to show formatted errors or code snippets
```
**Expected behavior**
_A clear and concise description of what you expected to happen._
**Environment**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Additional context**
> :warning: Reports we cannot reproduce are at risk of being marked stale and
> closed. The more information you can provide, the more likely we are to look
> into and address your issue.
+14 -8
View File
@@ -2,18 +2,24 @@
name: "\U0001F680 Feature request"
about: Suggest an idea for this project
title: ''
labels: enhancement
labels: 'Community: Request :hand:'
assignees: ''
---
<!-- ## Awesome, do you have an idea? 😍
> :hand: Many people requests features. Tell us why yours is important to the
> community. How does it add value? Why _this feature_?
>
> Is your request very specific to your needs? Consider
> [contributing it](https://docs.ohif.org/contributing.html) yourself! Or reach
> out to a community member that offers
> [consulting services](https://docs.ohif.org/help.html#paid--commercial).
If you have a **feature request, improvement or idea**, check [our official roadmap](https://github.com/OHIF/react-viewerbase/projects) to see if it is already planned! -->
## Request
<!-- ### 👉 &nbsp; [Go to Roadmap](https://github.com/OHIF/react-viewerbase/projects)
**What feature or change would you like to see made?**
If your feature request isn't there, continue with this issue and we can discuss
it 🤟 -->
...
Please include the reasons why you think your change should be made, and any
supporting evidence that helps us asses its value and priority.
**Why should we prioritize this feature?**
...
@@ -2,13 +2,13 @@
name: "\U0001F917 Support Question"
about: "I have a question \U0001F4AC"
title: ''
labels: question
labels: 'Community: Question :question:'
assignees: ''
---
We are a small team with limited resources. Your question is much more likely to
be answered if it is
[a good question](https://stackoverflow.com/help/how-to-ask)
> :hand: We are a small team with limited resources. Your question is much more
> likely to be answered if it is
> [a good question](https://stackoverflow.com/help/how-to-ask)
**Description**
+28
View File
@@ -0,0 +1,28 @@
# GitHub App: Stale
# https://github.com/apps/stale
#
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 21
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- 'Story 🙌'
- 'Bug: Verified 🐛'
- 'Task: CI/Tooling 🤖'
- 'Task: Docs 📖'
- 'Task: Docs :book:'
- 'Task: Refactor 🛠'
- 'Task: Tests 🔬'
- 'PR: Awaiting Review 👀'
- 'Triage 🏳️'
- 'Announcement 🎉'
# Label to use when marking an issue as stale
staleLabel: 'Stale :baguette_bread:'
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
-3
View File
@@ -13,9 +13,6 @@ node -v
# should also symlink all projects appropriately
yarn install --no-ignore-optional --pure-lockfile
dir
ls
# Build && Move PWA Output
yarn run build:ci
mkdir -p ./.netlify/www/pwa
-13
View File
@@ -1,13 +0,0 @@
#!/bin/bash
# Set directory to location of this script
# https://stackoverflow.com/a/3355423/1867984
cd "$(dirname "$0")"
echo 'PUBLISHING'
./node_modules/.bin/gh-pages \
--silent \
--repo https://$GITHUB_TOKEN@github.com/OHIF/Viewers.git \
--message 'Autogenerated Message: [ci skip]' \
--dist docs/latest/_book
Regular → Executable
View File
File mode changed.
@@ -0,0 +1,22 @@
const path = require('path');
function excludeNodeModulesExcept(modules) {
var pathSep = path.sep;
if (pathSep == '\\')
// must be quoted for use in a regexp:
pathSep = '\\\\';
var moduleRegExps = modules.map(function(modName) {
return new RegExp('node_modules' + pathSep + modName);
});
return function(modulePath) {
if (/node_modules/.test(modulePath)) {
for (var i = 0; i < moduleRegExps.length; i++)
if (moduleRegExps[i].test(modulePath)) return false;
return true;
}
return false;
};
}
module.exports = excludeNodeModulesExcept;
+17
View File
@@ -0,0 +1,17 @@
const autoprefixer = require('autoprefixer');
const cssToJavaScript = {
test: /\.css$/,
use: [
'style-loader',
{ loader: 'css-loader', options: { importLoaders: 1 } },
{
loader: 'postcss-loader',
options: {
plugins: () => [autoprefixer('last 2 version', 'ie >= 11')],
},
},
],
};
module.exports = cssToJavaScript;
+10
View File
@@ -0,0 +1,10 @@
/**
* This is exclusively used by `vtk.js` to bundle glsl files.
*/
const loadShaders = {
test: /\.glsl$/i,
include: /vtk\.js[\/\\]Sources/,
loader: 'shader-loader',
};
module.exports = loadShaders;
+17
View File
@@ -0,0 +1,17 @@
/**
* This allows us to include web workers in our bundle, and VTK.js
* web workers in our bundle. While this increases bundle size, it
* cuts down on the number of includes we need for `script tag` usage.
*/
const loadWebWorkers = {
test: /\.worker\.js$/,
include: /vtk\.js[\/\\]Sources/,
use: [
{
loader: 'worker-loader',
options: { inline: true, fallback: false },
},
],
};
module.exports = loadWebWorkers;
+10
View File
@@ -0,0 +1,10 @@
const stylusToJavaScript = {
test: /\.styl$/,
use: [
{ loader: 'style-loader' }, // 3. Style nodes from JS Strings
{ loader: 'css-loader' }, // 2. CSS to CommonJS
{ loader: 'stylus-loader' }, // 1. Stylus to CSS
],
};
module.exports = stylusToJavaScript;
+39
View File
@@ -0,0 +1,39 @@
const excludeNodeModulesExcept = require('./../helpers/excludeNodeModulesExcept.js');
function transpileJavaScript(mode) {
const exclude =
mode === 'production'
? excludeNodeModulesExcept([
'vtk.js',
// 'dicomweb-client',
// https://github.com/react-dnd/react-dnd/blob/master/babel.config.js
'react-dnd',
// https://github.com/dcmjs-org/dcmjs/blob/master/.babelrc
// https://github.com/react-dnd/react-dnd/issues/1342
// 'dcmjs', // contains: loglevelnext
// https://github.com/shellscape/loglevelnext#browser-support
// 'loglevelnext',
// https://github.com/dcmjs-org/dicom-microscopy-viewer/issues/35
// 'dicom-microscopy-viewer',
// https://github.com/openlayers/openlayers#supported-browsers
// 'ol', --> Should be fine
])
: excludeNodeModulesExcept([]);
return {
test: /\.jsx?$/,
// These are packages that are not transpiled to our lowest supported
// JS version (currently ES5). Most of these leverage ES6+ features,
// that we need to transpile to a different syntax.
exclude,
loader: 'babel-loader',
options: {
// Find babel.config.js in monorepo root
// https://babeljs.io/docs/en/options#rootmode
rootMode: 'upward',
envName: mode,
},
};
}
module.exports = transpileJavaScript;
+56
View File
@@ -0,0 +1,56 @@
const path = require('path');
const webpack = require('webpack');
const loadShadersRule = require('./rules/loadShaders.js');
const loadWebWorkersRule = require('./rules/loadWebWorkers.js');
const transpileJavaScriptRule = require('./rules/transpileJavaScript.js');
module.exports = (env, argv, { SRC_DIR, DIST_DIR }) => {
if (!process.env.NODE_ENV) {
throw new Error('process.env.NODE_ENV not set');
}
const mode =
process.env.NODE_ENV === 'production' ? 'production' : 'development';
return {
mode,
entry: {
app: `${SRC_DIR}/index.js`,
},
context: SRC_DIR,
module: {
rules: [
transpileJavaScriptRule(mode),
loadWebWorkersRule,
loadShadersRule,
],
},
resolve: {
// Which directories to search when resolving modules
modules: [
// Modules specific to this package
path.resolve(__dirname, '../node_modules'),
// Hoisted Yarn Workspace Modules
path.resolve(__dirname, '../../../node_modules'),
SRC_DIR,
],
// Attempt to resolve these extensions in order.
extensions: ['.js', '.jsx', '.json', '*'],
// symlinked resources are resolved to their real path, not their symlinked location
symlinks: true,
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
'process.env.DEBUG': JSON.stringify(process.env.DEBUG),
'process.env.APP_CONFIG': JSON.stringify(process.env.APP_CONFIG || ''),
'process.env.PUBLIC_URL': JSON.stringify(process.env.PUBLIC_URL || '/'),
}),
],
// Fix: https://github.com/webpack-contrib/css-loader/issues/447#issuecomment-285598881
// For issue in cornerstone-wado-image-loader
node: {
fs: 'empty',
},
};
};
-127
View File
@@ -1,127 +0,0 @@
const path = require('path');
const webpack = require('webpack');
const autoprefixer = require('autoprefixer');
// const ExtractCssChunks = require('extract-css-chunks-webpack-plugin');
module.exports = (env, argv, { SRC_DIR, DIST_DIR }) => {
return {
entry: {
bundle: `${SRC_DIR}/index.js`,
},
context: SRC_DIR,
module: {
rules: [
/**
* JSX
*/
{
test: /\.jsx?$/,
exclude: [/node_modules/, /packages\\extension/],
loader: 'babel-loader',
options: {
// Find babel.config.js in monorepo root
// https://babeljs.io/docs/en/options#rootmode
rootMode: 'upward',
presets: [
[
'@babel/preset-env',
{
// Do not transform ES6 modules to another format.
// Webpack will take care of that.
modules: false,
targets: {
ie: '11',
},
// https://babeljs.io/docs/en/babel-preset-env#usebuiltins
useBuiltIns: 'usage',
// https://babeljs.io/docs/en/babel-preset-env#corejs
corejs: 3,
},
],
],
},
},
/**
* Stylus to CSS
* CSS to CommonJS
* Style nodes from JS Strings
*/
{
test: /\.styl$/,
use: [
{ loader: 'style-loader' },
{ loader: 'css-loader' },
{ loader: 'stylus-loader' },
],
},
{
test: /\.css$/,
use: [
'style-loader',
// ExtractCssChunks.loader,
{ loader: 'css-loader', options: { importLoaders: 1 } },
{
loader: 'postcss-loader',
options: {
config: {
path: './postcss.config.js',
},
plugins: () => [autoprefixer('last 2 version', 'ie >= 11')],
},
},
],
},
/**
* This allows us to include web workers in our bundle, and VTK.js
* web workers in our bundle. While this increases bundle size, it
* cuts down on the number of includes we need for `script tag` usage.
*/
{
test: /\.worker\.js$/,
include: /vtk\.js[\/\\]Sources/,
use: [
{
loader: 'worker-loader',
options: { inline: true, fallback: false },
},
],
},
/**
* This is exclusively used by `vtk.js` to bundle glsl files.
*/
{
test: /\.glsl$/i,
include: /vtk\.js[\/\\]Sources/,
loader: 'shader-loader',
},
],
},
resolve: {
// Which directories to search when resolving modules
modules: [
// Modules specific to this package
path.resolve(__dirname, '../node_modules'),
// Hoisted Yarn Workspace Modules
path.resolve(__dirname, '../../../node_modules'),
SRC_DIR,
],
// Attempt to resolve these extensions in order.
extensions: ['.js', '.jsx', '.json', '*'],
// symlinked resources are resolved to their real path, not their symlinked location
symlinks: true,
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
'process.env.DEBUG': JSON.stringify(process.env.DEBUG),
'process.env.APP_CONFIG': JSON.stringify(process.env.APP_CONFIG || ''),
'process.env.PUBLIC_URL': JSON.stringify(process.env.PUBLIC_URL || ''),
}),
],
// Fix: https://github.com/webpack-contrib/css-loader/issues/447#issuecomment-285598881
// For issue in cornerstone-wado-image-loader
node: {
fs: 'empty',
},
};
};
+18
View File
@@ -0,0 +1,18 @@
const webpackBase = require('./webpack.base.js');
const cssToJavaScriptRule = require('./rules/cssToJavaScript.js');
const stylusToJavaScriptRule = require('./rules/stylusToJavaScript.js');
/**
* WebPack configuration for CommonJS Bundles. Extends rules of BaseConfig by making
* sure we're bundling styles and other files that would normally be split in a
* PWA.
*/
module.exports = (env, argv, { SRC_DIR, DIST_DIR }) => {
const baseConfig = webpackBase(env, argv, { SRC_DIR, DIST_DIR });
return merge(baseConfig, {
module: {
rules: [cssToJavaScriptRule, stylusToJavaScriptRule],
},
});
};
+6 -7
View File
@@ -11,8 +11,7 @@
<a href="https://github.com/OHIF/Viewers/tree/master/docs/latest">Edit the docs</a>
</div>
<div align="center">
<a href="https://docs.ohif.org/demo">Demo</a> |
<a href="https://ohif.canny.io/">Roadmap</a> |
<a href="https://viewer.ohif.org/">Live Demo</a> |
<a href="https://react.ohif.org/">Component Library</a>
</div>
@@ -59,7 +58,7 @@ The fastest and easiest way to get started is to include the OHIF Viewer with a
- Including the following dependencies with script tags:
- [React](https://unpkg.com/react@16/umd/react.production.min.js)
- [React Dom](https://unpkg.com/react-dom@16/umd/react-dom.production.min.js)
- The [OHIF Viewer](https://unpkg.com/ohif-viewer@0.19.5/dist/index.umd.js)
- The [OHIF Viewer](https://unpkg.com/@ohif/viewer)
- Have an element with an ID of `root` on the page
- Configure the OHIF Viewer at `window.config`:
@@ -236,9 +235,9 @@ MIT © [OHIF](https://github.com/OHIF)
[semantic-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[semantic-url]: https://github.com/semantic-release/semantic-release
<!-- ROW -->
[npm-url]: https://npmjs.org/package/ohif-viewer
[npm-downloads-image]: https://img.shields.io/npm/dm/ohif-viewer.svg?style=flat-square
[npm-version-image]: https://img.shields.io/npm/v/ohif-viewer.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@ohif/viewer
[npm-downloads-image]: https://img.shields.io/npm/dm/@ohif/viewer.svg?style=flat-square
[npm-version-image]: https://img.shields.io/npm/v/@ohif/viewer.svg?style=flat-square
[docker-pulls-img]: https://img.shields.io/docker/pulls/ohif/viewer.svg?style=flat-square
[docker-image-url]: https://hub.docker.com/r/ohif/viewer
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square
@@ -252,7 +251,7 @@ MIT © [OHIF](https://github.com/OHIF)
[deployment-docs]: https://docs.ohif.org/deployment/
[react-url]: https://reactjs.org/
[pwa-url]: https://developers.google.com/web/progressive-web-apps/
[ohif-viewer-url]: https://www.npmjs.com/package/ohif-viewer
[ohif-viewer-url]: https://www.npmjs.com/package/@ohif/viewer
[configuration-url]: https://docs.ohif.org/essentials/configuration.html
[extensions-url]: https://docs.ohif.org/advanced/extensions.html
<!-- Platform -->
+52 -46
View File
@@ -1,57 +1,63 @@
const aliases = require('./aliases.config');
const path = require('path');
// https://babeljs.io/docs/en/options#babelrcroots
module.exports = {
// Also specified in .webpack/webpack.common.js
// https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md
presets: [
[
'@babel/preset-env',
{
targets: {
ie: '11',
},
// https://babeljs.io/docs/en/babel-preset-env#usebuiltins
useBuiltIns: 'usage',
// https://babeljs.io/docs/en/babel-preset-env#corejs
corejs: 3,
},
],
'@babel/preset-react',
],
// https://babeljs.io/docs/en/options#babelrcroots
babelrcRoots: ['./platform/*', './extensions/*'],
plugins: [
'react-hot-loader/babel',
'inline-react-svg',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-transform-regenerator',
'@babel/plugin-transform-runtime',
[
'module-resolver',
{
// https://github.com/tleunen/babel-plugin-module-resolver/issues/338
// There seem to be a bug with module-resolver with a mono-repo setup:
// It doesn't resolve paths correctly when using root/alias combo, so we
// use this function instead.
resolvePath(sourcePath, currentFile, opts) {
// This will return undefined if aliases has no key for the sourcePath,
// in which case module-resolver will fallback on its default behaviour.
return aliases[sourcePath];
},
},
],
],
plugins: ['inline-react-svg', '@babel/plugin-proposal-class-properties'],
env: {
debug: {
sourceMaps: 'inline',
retainLines: true,
test: {
presets: [
[
// TODO: https://babeljs.io/blog/2019/03/19/7.4.0#migration-from-core-js-2
'@babel/preset-env',
{
modules: 'commonjs',
debug: false,
},
],
'@babel/preset-react',
],
plugins: [
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-transform-regenerator',
'@babel/plugin-transform-runtime',
],
},
build: {
production: {
presets: [
// WebPack handles ES6 --> Target Syntax
['@babel/preset-env', { modules: false }],
'@babel/preset-react',
],
ignore: ['**/*.test.jsx', '**/*.test.js', '__snapshots__', '__tests__'],
},
development: {
presets: [
// WebPack handles ES6 --> Target Syntax
['@babel/preset-env', { modules: false }],
'@babel/preset-react',
],
plugins: ['react-hot-loader/babel'],
ignore: ['**/*.test.jsx', '**/*.test.js', '__snapshots__', '__tests__'],
},
},
// ignore: ["node_modules"]
};
// TODO: Plugins; Aliases
// We don't currently use aliases, but this is a nice snippet that would help
// [
// 'module-resolver',
// {
// // https://github.com/tleunen/babel-plugin-module-resolver/issues/338
// // There seem to be a bug with module-resolver with a mono-repo setup:
// // It doesn't resolve paths correctly when using root/alias combo, so we
// // use this function instead.
// resolvePath(sourcePath, currentFile, opts) {
// // This will return undefined if aliases has no key for the sourcePath,
// // in which case module-resolver will fallback on its default behaviour.
// return aliases[sourcePath];
// },
// },
// ],
+64
View File
@@ -0,0 +1,64 @@
#!/bin/bash
# Set directory to location of this script
# https://stackoverflow.com/a/3355423/1867984
cd "$(dirname "$0")"
yarn -v
node -v
echo 'Installing Gitbook CLI'
yarn global add gitbook-cli
echo 'Running Gitbook installation'
# Generate all version's GitBook output
# For each directory in /docs ...
cd ./../docs/
for D in *; do
if [ -d "${D}" ]; then
echo "Generating output for: ${D}"
cd "${D}"
# Clear previous output, generate new
rm -rf _book
gitbook install
gitbook build
cd ..
fi
done
# Move CNAME File into `latest`
cp CNAME ./latest/_book/CNAME
# Create a history folder in our latest version's output
mkdir ./latest/_book/history
# Move each version's files to latest's history folder
for D in *; do
if [ -d "${D}" ]; then
if [ "${D}" == v* ] ; then
echo "Moving ${D} to the latest version's history folder"
mkdir "./latest/_book/history/${D}"
cp -v -r "./${D}/_book"/* "./latest/_book/history/${D}"
fi
fi
done
# Back to repo root
cd ..
echo "Done generating documentation output"
echo 'PUBLISHING'
./node_modules/.bin/gh-pages \
--silent \
--repo https://$GITHUB_TOKEN@github.com/OHIF/Viewers.git \
--message 'Autogenerated Message: [ci skip]' \
--dist docs/latest/_book
+2 -2
View File
@@ -45,7 +45,7 @@
---
- [Contributing](contributing.md)
- [FAQ](frequently-asked-questions.md)
- [Roadmap](roadmap.md)
- [Contributing](contributing.md)
- [Browser Support](browser-support.md)
- [Help](help.md)
+47
View File
@@ -0,0 +1,47 @@
# Browser Support
The browsers that we support are specified in the `.browserlistrc` file located
in the `platform/viewer` project. While we leverage the latest language features
when writing code, we rely on `babel` to _transpile_ our code so that it can run
in the browsers that we support.
## In Practice
The OHIF Viewer is capable of _running_ on:
- IE 11
- FireFox
- Chrome
- Safari
- Edge
However, we do not have the resources to adequately test and maintain bug free
functionality across all of these. In order to push web based medical imaging
forward, we focus our development efforts on recent version of modern evergreen
browsers.
Our support of older browsers equates to our willingness to review PRs for bug
fixes, and target their minimum JS support whenever possible.
### Polyfills
> A polyfill, or polyfiller, is a piece of code (or plugin) that provides the
> technology that you, the developer, expect the browser to provide natively.
An example of a polyfill is that you expect `Array.prototype.filter` to exist,
but for some reason, the browser that's being used has not implemented that
language feature yet. Our earlier transpilation will rectify _syntax_
discrepencies, but unimplemented features require a "temporary" implementation.
That's where polyfills step in.
You can utilize a service like [polyfill.io](https://polyfill.io/v3/) to
auto-detect and apply polyfills as needed, or you can update the PWA build to
include polyfill's in your bundle by incorporating [core-js][core-js]
<!--
Links
-->
<!-- prettier-ignore-start -->
[core-js]: https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md
<!-- prettier-ignore-end -->
@@ -35,10 +35,10 @@ Images can even be transcoded on the fly if this is desired.
- Choose the "Web Application" type
- Set up an
[OAuth 2.0 Client ID](https://support.google.com/cloud/answer/6158849?hl=en)
- Add your domain (e.g. `http://localhost:5000`) to Authorized JavaScript
- Add your domain (e.g. `http://localhost:3000`) to Authorized JavaScript
origins.
- Add your domain, plus `callback` (e.g.
`http://localhost:5000/callback`) to Authorized Redirect URIs.
- Add your domain, plus `callback` (e.g. `http://localhost:3000/callback`) to
Authorized Redirect URIs.
- Save your Client ID for later.
- (Optional): Enable Public Datasets that are being hosted by Google:
@@ -46,8 +46,8 @@ Images can even be transcoded on the fly if this is desired.
## Run the viewer with your OAuth Client ID
1. Open the `config/google.js` file and change `YOURCLIENTID` to
your Client ID value.
1. Open the `config/google.js` file and change `YOURCLIENTID` to your Client ID
value.
1. Run the OHIF Viewer using the config/google.js configuration file
```bash
@@ -58,9 +58,9 @@ APP_CONFIG=config/google.js yarn run dev
## Running via Docker
The OHIF Viewer Docker container can be connected to Google Cloud
Healthcare by providing a Client ID at runtime. This is a very simple
method to get up and running.
The OHIF Viewer Docker container can be connected to Google Cloud Healthcare by
providing a Client ID at runtime. This is a very simple method to get up and
running.
1. Install Docker (https://www.docker.com/)
1. Run the Docker container, providing a Client ID as an environment variable.
+145
View File
@@ -0,0 +1,145 @@
# Contributing: Tests
> Testing is an opinionated topic. Here is a rough overview of our testing
> philosiphy. See something you want to discuss or think should be changed? Open
> a PR and let's discuss.
You're an engineer. You know how to write code, and writing tests isn't all that
different. But do you know why we write tests? Do you know when to write one, or
what kind of test to write? How do you know if a test is a _"good"_ test? This
document's goal is to give you the tools you need to make those determinations.
Okay. So why do we write tests? To increase our... **CONFIDENCE**
- If I do a large refactor, does everything still work?
- If I changed some critical piece of code, is it safe to push to production?
Gaining the confidence we need to answer these questions after every change is
costly. Good tests allow us to answer them without manual regression testing.
What and how we choose to test to increase that confidence is nuanced.
## Kinds of Tests
Test's buy us confidence, but not all tests are created equal. Each kind of test
has a different cost to write and maintain. An expensive test is worth it if it
gives us confidence that a payment is processed, but it may not be the best
choice for asserting an element's border color.
| Test Type | Example | Speed | Cost |
| ----------- | ------------------------------------------------------------------------ | ---------------- | ------------------------------------------------------------------------ |
| Static | `addNums(1, '2')` called with `string`, expected `int`. | :rocket: Instant | :money_with_wings: |
| Unit | `addNums(1, 2)` returns expected result `3` | :airplane: Fast | :money_with_wings::money_with_wings: |
| Integration | Clicking "Sign In", navigates to the dashboard (mocked network requests) | :running: Okay | :money_with_wings::money_with_wings::money_with_wings: |
| End-to-end | Clicking "Sign In", navigates to the dashboard (no mocks) | :turtle: Slow | :money_with_wings::money_with_wings::money_with_wings::money_with_wings: |
- :rocket: Speed: How quickly tests run
- :money_with_wings: Cost: Time to write, and to debug when broken (more points
of failure)
### Static Code Analysis
Modern tooling gives us this "for free". It can catch invalid regular
expressions, unused variables, and guarantee we're calling methods/functions
with the expected paramater types.
Example Tooling:
- [ESLint][eslint-rules]
- [TypeScript][typescript-docs] or [Flow][flow-org]
### Unit Tests
The building blocks of our libraries and applications. For these, you'll often
be testing a single function or method. Conceptually, this equates to:
_Pure Function Test:_
- If I call `sum(2, 2)`, I expect the output to be `4`
_Side Effect Test:_
- If I call `resetViewport(viewport)`, I expect `cornerstone.reset` to be called
with `viewport`
#### When to use
Anything that is exposed as public API should have unit tests.
#### When to avoid
You're actually testing implementation details. You're testing implementation
details if:
- Your test does something that the consumer of your code would never do.
- IE. Using a private function
- A refactor can break your tests
### Integration Tests
We write integration tests to gain confidence that several units work together.
Generally, we want to mock as little as possible for these tests. In practice,
this means only mocking network requests.
#### When to use
...
### End-to-End Tests
These are the most expensive tests to write and maintain. Largely because, when
they fail, they have the largest number of potential points of failure. So why
do we write them? Because they also buy us the most confidence.
#### When to use
Mission critical features and functionality, or to cover a large breadth of
functionality until unit tests catch up. Unsure if we should have a test for
feature `X` or scenario `Y`? Open an issue and let's discuss.
## Summary
- Does your test increase confidence?
- Does the test type chosen balance the cost-to-confidence ratio?
## Further Reading
### General
- [Assert(js) Conf 2018 Talks][assert-js-talks]
- [Write tests. Not too many. Mostly integration.][kent-talk] - Kent C. Dodds
- [I see your point, but…][gleb-talk] - Gleb Bahmutov
- [Static vs Unit vs Integration vs E2E Testing][kent-blog] - Kent C. Dodds
(Blog)
### End-to-end Testing w/ Cypress
- [Getting Started](https://docs.cypress.io/guides/overview/why-cypress.html)
- Be sure to check out `Getting Started` and `Core Concepts`
- [Best Practices](https://docs.cypress.io/guides/references/best-practices.html)
- [Example Recipes](https://docs.cypress.io/examples/examples/recipes.html)
## Testing Dorito
[![testing dorito][testing-dorito-img]][testing-dorito]
<!--
Links
-->
<!-- prettier-ignore-start -->
[eslint-rules]: https://eslint.org/docs/rules/
[typescript-docs]: https://www.typescriptlang.org/docs/home.html
[flow-org]: https://flow.org/
<!-- Talks -->
[assert-js-talks]: https://www.youtube.com/playlist?list=PLZ66c9_z3umNSrKSb5cmpxdXZcIPNvKGw
[kent-talk]: https://www.youtube.com/watch?list=PLV5CVI1eNcJgNqzNwcs4UKrlJdhfDjshf
[gleb-talk]: https://www.youtube.com/watch?v=5FnalKRjpZk
[kent-blog]: https://kentcdodds.com/blog/unit-vs-integration-vs-e2e-tests
<!-- Images -->
[testing-trophy]: https://twitter.com/kentcdodds/status/960723172591992832?ref_src=twsrc%5Etfw%7Ctwcamp%5Etweetembed%7Ctwterm%5E960723172591992832&ref_url=https%3A%2F%2Fkentcdodds.com%2Fblog%2Fwrite-tests
[aaron-square]: https://twitter.com/Carofine247/status/966727489274961920
[gleb-pyramid]: https://twitter.com/Carofine247/status/966764532046684160/photo/3
[testing-pyramid]: https://dojo.ministryoftesting.com/dojo/lessons/the-mobile-test-pyramid
[testing-dorito]: https://twitter.com/denvercoder/status/960752578198843392
[testing-dorito-img]: https://pbs.twimg.com/media/DVVHXycUMAAcN-F?format=jpg&name=4096x4096
<!-- prettier-ignore-end -->
+2 -2
View File
@@ -60,8 +60,8 @@ Compiled successfully!
You can now view ohif-viewer in the browser.
Local: http://localhost:5000/
On Your Network: http://10.74.20.83:5000/
Local: http://localhost:3000/
On Your Network: http://10.74.20.83:3000/
Note that the development build is not optimized.
To create a production build, use yarn build.
+32 -46
View File
@@ -1,36 +1,18 @@
# Frequently Asked Questions
## How do I file a bug?
## Index
We accept and triage bug reports through Github primarily.
- [Report a bug][report-bug]
- [Request a feature][new-feature]
- [Commercial Support & Consulting][commercial-support]
- [Academic collaborations][academic]
- [FDA Clearance or CE Marking][fda-clearance]
- [HIPAA Compliance][hipaa]
- [Create a Github account](https://github.com/join)
- Search the current [Issue List](https://github.com/OHIF/Viewers/issues) to
ensure you are not creating a duplicate issue.
- If your issue already exists, post a comment to show us that this issue also
affects you.
- If no prior issue exists,
[Create a New Issue](https://github.com/OHIF/Viewers/issues/new) on the
repository.
### How do I report a bug?
Some tips for filing a new issue:
- **Make sure your issue is reproducible**: If we try to reproduce your issue
given your provided steps and we cannot reproduce it, we will not be able to
fix it. _Nobody wants to spend time guessing how to reproduce your issue!_
Before filing, please reproduce your issue more than once and clearly describe
the steps taken.
- **If you are reporting a user interface issue, provide screenshots**: A
picture is worth a thousand words. If your issue concerns the UI, screenshots
will help us identify the issue dramatically faster since it can be extremely
challenging to describe UI bugs with text. _You should still clearly describe
the steps that you took to produce the issue_.
- **Include platform & environment**: Your operating system, web browser, and
web browser version are highly relevant for many bugs. Please provide these
with all bug reports.
- **Include expected and actual result**: Tell us what you expected to happen,
and what actually happened. If you don't do this, we might not consider it a
bug.
Navigate to our [GitHub Repository][new-issue], and submit a new bug report.
Follow the steps outlined in the [Bug Report Template][bug-report-template].
### How can I request a new feature?
@@ -39,7 +21,8 @@ to communicate this to the community. If your requested feature is on the
roadmap, then it will most likely be built at some point. If it is not, you are
welcome to build it yourself and [contribute it](contributing.md). If you have
resources and would like to fund the development of a feature, please
[contact us](http://www.ohif.org).
[contact us](http://www.ohif.org) or work with community members that offer
[consulting services][commercial-support].
### Who should I contact about Academic Collaborations?
@@ -49,7 +32,7 @@ collaborators. We are always happy to hear about new groups interested in using
the OHIF framework, and may be able to provide development support if the
proposed collaboration has an impact on cancer research.
### Do you offer commercial support?
### Does OHIF offer commercial support?
The Open Health Imaging Foundation does not offer commercial support, however,
some community members do offer consulting services. The following contacts may
@@ -60,36 +43,39 @@ be useful:
**Please file a Pull Request if you wish to add your name or organization to
this list.**
### I emailed my question to you directly and you did not respond. Why not?
### Does The OHIF Viewer have [510(k) Clearance][501k-clearance] from the U.S. F.D.A or [CE Marking][ce-marking] from the European Commission?
Emailing developers directly is not a shortcut to faster support. Please file
your issues and questions on Github so that everyone can benefit from the
discussion and solutions.
### Do your Viewers have [510(k) Clearance][501k-clearance] from the U.S. F.D.A or [CE Marking][ce-marking] from the European Commission?
**NO.** The OHIF Viewer, Lesion Tracker, and Standalone Viewer, **NOT** F.D.A.
cleared or CE Marked. It is the users responsibility to ensure compliance with
applicable rules and regulations. The
**NO.** The OHIF Viewer is **NOT** F.D.A. cleared or CE Marked. It is the users
responsibility to ensure compliance with applicable rules and regulations. The
[License](https://github.com/OHIF/Viewers/blob/master/LICENSE) for the OHIF
Framework does not prevent your company or group from seeking F.D.A. clearance
for a product built using the framework.
Platform does not prevent your company or group from seeking F.D.A. clearance
for a product built using the platform.
If you have gone this route (or are going there), please let us know because we
would be interested to hear about your experience.
### Are your Viewers [HIPAA][hipaa] Compliant?
### Is The OHIF Viewer [HIPAA][hipaa] Compliant?
**NO.** The OHIF Viewer, Lesion Tracker, and Standalone Viewer **DO NOT**
fulfill all of the criteria to become HIPAA Compliant. It is the users
responsibility to ensure compliance with applicable rules and regulations.
**NO.** The OHIF Viewer **DOES NOT** fulfill all of the criteria to become HIPAA
Compliant. It is the users responsibility to ensure compliance with applicable
rules and regulations.
<!--
Links
-->
<!-- prettier-ignore-start -->
<!-- INDEX -->
[report-bug]: #how-do-i-report-a-bug
[new-feature]: #how-can-i-request-a-new-feature
[commercial-support]: #does-ohif-offer-commercial-support
[academic]: #who-should-i-contact-about-academic-collaborations
[fda-clearance]: #does-the-ohif-viewer-have-510k-clearance-from-the-us-fda-or-ce-marking-from-the-european-commission
[hipaa]: #is-the-ohif-viewer-hipaa-compliant
<!-- OTHER -->
[501k-clearance]: https://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/HowtoMarketYourDevice/PremarketSubmissions/PremarketNotification510k/
[ce-marking]: https://ec.europa.eu/growth/single-market/ce-marking_en
[hipaa]: https://en.wikipedia.org/wiki/Health_Insurance_Portability_and_Accountability_Act
[new-issue]: https://github.com/OHIF/Viewers/issues/new/choose
[bug-report-template]: https://github.com/OHIF/Viewers/issues/new?assignees=&labels=Bug+Report+%3Abug%3A&template=---bug-report.md&title=
<!-- prettier-ignore-end -->
-25
View File
@@ -1,25 +0,0 @@
# Roadmap
If you want to know what's planned for the very near future,
[check out our roadmap](https://ohif.canny.io/). The best way to influence when
and what is worked on is to contribute to the conversation by creating GitHub
issues, and contributing code through pull requests. OHIF's high level
priorities for the near future are:
- Feature parity with version 1
- Extension and configuration improvements with key integration partners
- Continued Developer Experience Improvements
- Segmentation Tools, and improved VTK.js support
More granular information will make it's way to the backlog as these items
become scoped for development by core maintainers.
> Don't hesitate to ask questions, propose features, or create pull requests.
> We're here, we're listening, and we're ready to build the best open source
> medical imaging viewer on the web.
### Roadmap Generously Powered by Canny.io
<a href="https://ohif.canny.io/">
<img height="30" src="assets/img/canny-full.png" />
</a>
+63 -17
View File
@@ -1,47 +1,93 @@
# Frequently Asked Questions - General
### How do I file a bug?
We accept and triage bug reports through Github primarily.
1. [Create a Github account](https://github.com/join)
2. Search the current [Issue List](https://github.com/OHIF/Viewers/issues) to ensure you are not creating a duplicate issue.
2. Search the current [Issue List](https://github.com/OHIF/Viewers/issues) to
ensure you are not creating a duplicate issue.
If your issue already exists, post a comment to show us that this issue also affects you.
If your issue already exists, post a comment to show us that this issue also
affects you.
3. If no prior issue exists, [Create a New Issue](https://github.com/OHIF/Viewers/issues/new) on the repository.
3. If no prior issue exists,
[Create a New Issue](https://github.com/OHIF/Viewers/issues/new) on the
repository.
Some tips for filing a new issue:
* **Make sure your issue is reproducible**: If we try to reproduce your issue given your provided steps and we cannot reproduce it, we will not be able to fix it. *Nobody wants to spend time guessing how to reproduce your issue!* Before filing, please reproduce your issue more than once and clearly describe the steps taken.
* **If you are reporting a user interface issue, provide screenshots**: A picture is worth a thousand words. If your issue concerns the UI, screenshots will help us identify the issue dramatically faster since it can be extremely challenging to describe UI bugs with text. *You should still clearly describe the steps that you took to produce the issue*.
* **Include platform & environment**: Your operating system, web browser, and web browser version are highly relevant for many bugs. Please provide these with all bug reports.
* **Include expected and actual result**: Tell us what you expected to happen, and what actually happened. If you don't do this, we might not consider it a bug.
- **Make sure your issue is reproducible**: If we try to reproduce your issue
given your provided steps and we cannot reproduce it, we will not be able to
fix it. _Nobody wants to spend time guessing how to reproduce your issue!_
Before filing, please reproduce your issue more than once and clearly describe
the steps taken.
- **If you are reporting a user interface issue, provide screenshots**: A
picture is worth a thousand words. If your issue concerns the UI, screenshots
will help us identify the issue dramatically faster since it can be extremely
challenging to describe UI bugs with text. _You should still clearly describe
the steps that you took to produce the issue_.
- **Include platform & environment**: Your operating system, web browser, and
web browser version are highly relevant for many bugs. Please provide these
with all bug reports.
- **Include expected and actual result**: Tell us what you expected to happen,
and what actually happened. If you don't do this, we might not consider it a
bug.
### How can I request a new feature?
At the moment we are in the process of defining our roadmap and will do our best to communicate this to the community. If your requested feature is on the roadmap, then it will most likely be built at some point. If it is not, you are welcome to build it yourself and [contribute it](../contributing.md). If you have resources and would like to fund the development of a feature, please [contact us](http://www.ohif.org).
At the moment we are in the process of defining our roadmap and will do our best
to communicate this to the community. If your requested feature is on the
roadmap, then it will most likely be built at some point. If it is not, you are
welcome to build it yourself and [contribute it](../contributing.md). If you
have resources and would like to fund the development of a feature, please
[contact us](http://www.ohif.org).
### Who should I contact about Academic Collaborations?
[Gordon J. Harris](http://www.dfhcc.harvard.edu/insider/member-detail/member/gordon-j-harris-phd/) at Massachusetts General Hospital is the primary contact for any academic collaborators. We are always happy to hear about new groups interested in using the OHIF framework, and may be able to provide development support if the proposed collaboration has an impact on cancer research.
[Gordon J. Harris](http://www.dfhcc.harvard.edu/insider/member-detail/member/gordon-j-harris-phd/)
at Massachusetts General Hospital is the primary contact for any academic
collaborators. We are always happy to hear about new groups interested in using
the OHIF framework, and may be able to provide development support if the
proposed collaboration has an impact on cancer research.
### Do you offer commercial support?
The Open Health Imaging Foundation does not offer commercial support, however, some community members do offer consulting services. The following contacts may be useful:
The Open Health Imaging Foundation does not offer commercial support, however,
some community members do offer consulting services. The following contacts may
be useful:
* Rob Lewis ([Radical Imaging](http://radicalimaging.com/))
- Rob Lewis ([Radical Imaging](http://radicalimaging.com/))
**Please file a Pull Request if you wish to add your name or organization to this list.**
**Please file a Pull Request if you wish to add your name or organization to
this list.**
### I emailed my question to you directly and you did not respond. Why not?
Emailing developers directly is not a shortcut to faster support. Please file your issues and questions on Github so that everyone can benefit from the discussion and solutions.
Emailing developers directly is not a shortcut to faster support. Please file
your issues and questions on Github so that everyone can benefit from the
discussion and solutions.
### Do your Viewers have [510(k) Clearance](https://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/HowtoMarketYourDevice/PremarketSubmissions/PremarketNotification510k/) from the U.S. F.D.A or [CE Marking](https://ec.europa.eu/growth/single-market/ce-marking_en) from the European Commission?
**NO.** The OHIF Viewer, Lesion Tracker, and Standalone Viewer, **NOT** F.D.A. cleared or CE Marked. It is the users responsibility to ensure compliance with applicable rules and regulations. The [License](https://github.com/OHIF/Viewers/blob/master/LICENSE) for the OHIF Framework does not prevent your company or group from seeking F.D.A. clearance for a product built using the framework.
**NO.** The OHIF Viewer, Lesion Tracker, and Standalone Viewer, **NOT** F.D.A.
cleared or CE Marked. It is the users responsibility to ensure compliance with
applicable rules and regulations. The
[License](https://github.com/OHIF/Viewers/blob/master/LICENSE) for the OHIF
Framework does not prevent your company or group from seeking F.D.A. clearance
for a product built using the framework.
If you have gone this route (or are going there), please let us know because we would be interested to hear about your experience.
If you have gone this route (or are going there), please let us know because we
would be interested to hear about your experience.
### Are your Viewers [HIPAA](https://en.wikipedia.org/wiki/Health_Insurance_Portability_and_Accountability_Act) Compliant?
**NO.** The OHIF Viewer, Lesion Tracker, and Standalone Viewer **DO NOT** fulfill all of the criteria to become HIPAA Compliant. It is the users responsibility to ensure compliance with applicable rules and regulations.
**NO.** The OHIF Viewer, Lesion Tracker, and Standalone Viewer **DO NOT**
fulfill all of the criteria to become HIPAA Compliant. It is the users
responsibility to ensure compliance with applicable rules and regulations.
The Lesion Tracker application demonstrates some available components and features (e.g. [Audit Trail](../lesion-tracker/audit-trail.md), automatic logoff, and unique user identification for [User Accounts](../lesion-tracker/user-accounts.md)) which could be used by third parties seeking HIPAA compliance.
The Lesion Tracker application demonstrates some available components and
features (e.g. [Audit Trail](../lesion-tracker/audit-trail.md), automatic
logoff, and unique user identification for
[User Accounts](../lesion-tracker/user-accounts.md)) which could be used by
third parties seeking HIPAA compliance.
+2 -10
View File
@@ -1,16 +1,8 @@
const path = require('path');
const merge = require('webpack-merge');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
//
const webpackCommon = require('./../../../.webpack/webpack.commonjs.js');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-development
mode: 'development',
});
return webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
};
@@ -1,6 +1,6 @@
const merge = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
const webpackCommon = require('./../../../.webpack/webpack.commonjs.js');
const pkg = require('./../package.json');
const ROOT_DIR = path.join(__dirname, './..');
@@ -11,8 +11,6 @@ module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-production
mode: 'production',
devtool: 'source-map',
stats: {
colors: true,
+27
View File
@@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.50.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@0.50.3...@ohif/extension-cornerstone@0.50.4) (2019-09-04)
**Note:** Version bump only for package @ohif/extension-cornerstone
## [0.50.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@0.50.2...@ohif/extension-cornerstone@0.50.3) (2019-09-04)
**Note:** Version bump only for package @ohif/extension-cornerstone
## [0.50.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@0.50.1...@ohif/extension-cornerstone@0.50.2) (2019-09-04)
### Bug Fixes
* measurementsAPI issue caused by production build ([#842](https://github.com/OHIF/Viewers/issues/842)) ([49d3439](https://github.com/OHIF/Viewers/commit/49d3439))
## [0.50.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@0.50.0-alpha.10...@ohif/extension-cornerstone@0.50.1) (2019-08-14)
**Note:** Version bump only for package @ohif/extension-cornerstone
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone",
"version": "0.50.1",
"version": "0.50.4",
"description": "OHIF extension for Cornerstone",
"author": "OHIF",
"license": "MIT",
@@ -20,9 +20,9 @@
"access": "public"
},
"scripts": {
"dev": "webpack --config .webpack/webpack.dev.js --watch --debug --output-pathinfo",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --debug --output-pathinfo",
"dev:cornerstone": "yarn run dev",
"build": "webpack --config .webpack/webpack.prod.js",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"prepublishOnly": "yarn run build",
"start": "yarn run dev"
+2 -10
View File
@@ -1,16 +1,8 @@
const path = require('path');
const merge = require('webpack-merge');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
//
const webpackCommon = require('./../../../.webpack/webpack.commonjs.js');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-development
mode: 'development',
});
return webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
};
@@ -1,6 +1,6 @@
const merge = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
const webpackCommon = require('./../../../.webpack/webpack.commonjs.js');
const pkg = require('./../package.json');
const ROOT_DIR = path.join(__dirname, './..');
@@ -11,8 +11,6 @@ module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-production
mode: 'production',
devtool: 'source-map',
stats: {
colors: true,
+19
View File
@@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.50.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@0.50.2...@ohif/extension-dicom-html@0.50.3) (2019-09-04)
**Note:** Version bump only for package @ohif/extension-dicom-html
## [0.50.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@0.50.1...@ohif/extension-dicom-html@0.50.2) (2019-09-04)
### Bug Fixes
* measurementsAPI issue caused by production build ([#842](https://github.com/OHIF/Viewers/issues/842)) ([49d3439](https://github.com/OHIF/Viewers/commit/49d3439))
## [0.50.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@0.50.0-alpha.10...@ohif/extension-dicom-html@0.50.1) (2019-08-14)
**Note:** Version bump only for package @ohif/extension-dicom-html
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-html",
"version": "0.50.1",
"version": "0.50.3",
"description": "OHIF extension for rendering structured reports to HTML",
"author": "OHIF",
"license": "MIT",
@@ -20,7 +20,7 @@
"access": "public"
},
"scripts": {
"dev": "webpack --config .webpack/webpack.dev.js --watch --debug --output-pathinfo",
"dev": "cross-env NODE_ENV=production webpack --config .webpack/webpack.dev.js --watch --debug --output-pathinfo",
"dev:dicom-html": "yarn run dev",
"build": "webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
@@ -1,16 +1,8 @@
const path = require('path');
const merge = require('webpack-merge');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
//
const webpackCommon = require('./../../../.webpack/webpack.commonjs.js');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-development
mode: 'development',
});
return webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
};
@@ -1,6 +1,6 @@
const merge = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
const webpackCommon = require('./../../../.webpack/webpack.commonjs.js');
const pkg = require('./../package.json');
const ROOT_DIR = path.join(__dirname, './..');
@@ -11,8 +11,6 @@ module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-production
mode: 'production',
devtool: 'source-map',
stats: {
colors: true,
+30
View File
@@ -3,6 +3,36 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.50.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-microscopy@0.50.3...@ohif/extension-dicom-microscopy@0.50.4) (2019-09-04)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
## [0.50.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-microscopy@0.50.2...@ohif/extension-dicom-microscopy@0.50.3) (2019-09-04)
### Bug Fixes
* measurementsAPI issue caused by production build ([#842](https://github.com/OHIF/Viewers/issues/842)) ([49d3439](https://github.com/OHIF/Viewers/commit/49d3439))
## [0.50.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-microscopy@0.50.1...@ohif/extension-dicom-microscopy@0.50.2) (2019-09-03)
### Bug Fixes
* **dicom-microscopy:** Update dicom-microscopy-viewer to 0.6.1 to fix Google Cloud usage with WSI images ([#843](https://github.com/OHIF/Viewers/issues/843)) ([dbaf5c5](https://github.com/OHIF/Viewers/commit/dbaf5c5))
## [0.50.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-microscopy@0.50.0-alpha.10...@ohif/extension-dicom-microscopy@0.50.1) (2019-08-14)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-microscopy",
"version": "0.50.1",
"version": "0.50.4",
"description": "OHIF extension for Dicom Microscopy",
"author": "OHIF",
"license": "MIT",
@@ -20,9 +20,9 @@
"yarn": ">=1.16.0"
},
"scripts": {
"dev": "webpack --config .webpack/webpack.dev.js --watch --debug --output-pathinfo",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --debug --output-pathinfo",
"dev:dicom-microscopy": "yarn run dev",
"build": "webpack --config .webpack/webpack.prod.js",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"prepublishOnly": "yarn run build",
"start": "yarn run dev"
@@ -35,6 +35,6 @@
"dependencies": {
"@babel/runtime": "^7.5.5",
"classnames": "^2.2.6",
"dicom-microscopy-viewer": "^0.4.3"
"dicom-microscopy-viewer": "^0.6.1"
}
}
+2 -10
View File
@@ -1,16 +1,8 @@
const path = require('path');
const merge = require('webpack-merge');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
//
const webpackCommon = require('./../../../.webpack/webpack.commonjs.js');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-development
mode: 'development',
});
return webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
};
@@ -1,6 +1,6 @@
const merge = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
const webpackCommon = require('./../../../.webpack/webpack.commonjs.js');
const pkg = require('./../package.json');
const ROOT_DIR = path.join(__dirname, './..');
@@ -11,8 +11,6 @@ module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-production
mode: 'production',
devtool: 'source-map',
stats: {
colors: true,
+19
View File
@@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.50.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@0.50.2...@ohif/extension-dicom-pdf@0.50.3) (2019-09-04)
**Note:** Version bump only for package @ohif/extension-dicom-pdf
## [0.50.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@0.50.1...@ohif/extension-dicom-pdf@0.50.2) (2019-09-04)
### Bug Fixes
* measurementsAPI issue caused by production build ([#842](https://github.com/OHIF/Viewers/issues/842)) ([49d3439](https://github.com/OHIF/Viewers/commit/49d3439))
## [0.50.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@0.50.0-alpha.10...@ohif/extension-dicom-pdf@0.50.1) (2019-08-14)
**Note:** Version bump only for package @ohif/extension-dicom-pdf
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-pdf",
"version": "0.50.1",
"version": "0.50.3",
"description": "OHIF extension for Dicom PDF",
"author": "OHIF",
"license": "MIT",
@@ -20,9 +20,9 @@
"README.md"
],
"scripts": {
"dev": "webpack --config .webpack/webpack.dev.js --watch --debug --output-pathinfo",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --debug --output-pathinfo",
"dev:dicom-pdf": "yarn run dev",
"build": "webpack --config .webpack/webpack.prod.js",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"prepublishOnly": "yarn run build",
"start": "yarn run dev"
+2 -10
View File
@@ -1,16 +1,8 @@
const path = require('path');
const merge = require('webpack-merge');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
//
const webpackCommon = require('./../../../.webpack/webpack.commonjs.js');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-development
mode: 'development',
});
return webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
};
+1 -3
View File
@@ -1,6 +1,6 @@
const merge = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
const webpackCommon = require('./../../../.webpack/webpack.commonjs.js');
const pkg = require('./../package.json');
const ROOT_DIR = path.join(__dirname, './..');
@@ -11,8 +11,6 @@ module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-production
mode: 'production',
devtool: 'source-map',
stats: {
colors: true,
+35
View File
@@ -3,6 +3,41 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.50.6](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.50.5...@ohif/extension-vtk@0.50.6) (2019-09-04)
**Note:** Version bump only for package @ohif/extension-vtk
## [0.50.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.50.4...@ohif/extension-vtk@0.50.5) (2019-09-04)
### Bug Fixes
* measurementsAPI issue caused by production build ([#842](https://github.com/OHIF/Viewers/issues/842)) ([49d3439](https://github.com/OHIF/Viewers/commit/49d3439))
## [0.50.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.50.3...@ohif/extension-vtk@0.50.4) (2019-08-26)
**Note:** Version bump only for package @ohif/extension-vtk
## [0.50.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.50.2...@ohif/extension-vtk@0.50.3) (2019-08-22)
**Note:** Version bump only for package @ohif/extension-vtk
## [0.50.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.50.1...@ohif/extension-vtk@0.50.2) (2019-08-15)
+6 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-vtk",
"version": "0.50.2",
"version": "0.50.6",
"description": "OHIF extension for VTK.js",
"author": "OHIF",
"license": "MIT",
@@ -21,9 +21,9 @@
"yarn": ">=1.16.0"
},
"scripts": {
"dev": "webpack --config .webpack/webpack.dev.js --watch --debug --output-pathinfo",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --debug --output-pathinfo",
"dev:dicom-vtk": "yarn run dev",
"build": "webpack --config .webpack/webpack.prod.js",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"prepublishOnly": "yarn run build",
"start": "yarn run dev"
@@ -48,12 +48,11 @@
},
"dependencies": {
"@babel/runtime": "^7.5.5",
"react-vtkjs-viewport": "0.0.11",
"vtk.js": "^9.5.0"
"react-vtkjs-viewport": "0.0.11"
},
"devDependencies": {
"@ohif/core": "^0.50.1",
"@ohif/ui": "^0.50.1",
"@ohif/core": "^0.50.5",
"@ohif/ui": "^0.50.3",
"cornerstone-tools": "^3.13.0",
"cornerstone-wado-image-loader": "^3.0.0",
"dcmjs": "^0.5.1",
@@ -1,4 +1,4 @@
import { redux } from "@ohif/core";
import { redux } from '@ohif/core';
const { setViewportLayoutAndData } = redux.actions;
-20
View File
@@ -17,13 +17,7 @@ yarn add --dev -W package-name
project
- Remove all-contributors bot; install CLI per project and add per project
commands
- Verify all have "dev:package-name" command
- Should we include `package.json` and `src` as output? (build from ESM)
- Should we remove `dev:package-name` commands and suggest navigating to
package root?
- Fix broken peer dependencies?
- Lingering core-js resolution issues when building for Viewer PWA (from project
directory)
## ORBS
@@ -35,20 +29,6 @@ yarn add --dev -W package-name
Debug Note: `http://localhost:3000/webpack-dev-server`
NOTES:
# bumps pre-release version of all packages if any changes
- `npx lerna version prerelease`
# Releases based on package.json differences from NPM
- `npx lerna publish from-package --dist-tag canary`
Use Env options to set config:
- https://webpack.js.org/api/cli/#environment-options
## Bundling
- Extensions must bundle all assets into a single file for UMD
+9 -10
View File
@@ -16,13 +16,14 @@
"dev:project": ".scripts/dev.sh",
"build": "lerna run build:viewer --stream",
"build:ci": "lerna run build:viewer:ci --stream",
"build:demo": "lerna run build:viewer:demo --stream",
"build:package": "lerna run build:viewer:package --stream",
"build:package-all": "lerna run build:package --parallel --stream",
"test": "yarn run test:unit && yarn run test:e2e:ci",
"test": "yarn run test:unit",
"test:unit": "jest --collectCoverage",
"test:unit:ci": "lerna run test:unit:ci --parallel --stream",
"test:e2e:ci": "cd platform/viewer && yarn run test:e2e:ci",
"see-changed": "lerna changed",
"docs:publish": "chmod +x ./build-and-publish-docs.sh && ./build-and-publish-docs.sh",
"release": "yarn run lerna:version && yarn run lerna:publish",
"lerna:version": "npx lerna version prerelease --force-publish",
"lerna:publish": "lerna publish from-package --canary --dist-tag canary"
@@ -34,8 +35,10 @@
"devDependencies": {
"@babel/core": "^7.5.0",
"@babel/plugin-proposal-class-properties": "^7.5.0",
"@babel/plugin-proposal-object-rest-spread": "^7.5.0",
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-transform-arrow-functions": "^7.2.0",
"@babel/plugin-transform-regenerator": "^7.4.5",
"@babel/plugin-transform-runtime": "^7.5.0",
"@babel/preset-env": "^7.5.0",
"@babel/preset-react": "^7.0.0",
@@ -64,6 +67,7 @@
"jest-junit": "^6.4.0",
"lerna": "^3.15.0",
"lint-staged": "^9.0.2",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"postcss-import": "^12.0.1",
"postcss-loader": "^3.0.0",
"postcss-preset-env": "^6.6.0",
@@ -78,6 +82,7 @@
"stylelint-config-recommended": "^2.2.0",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",
"terser-webpack-plugin": "^1.4.1",
"webpack": "^4.35.2",
"webpack-cli": "^3.3.5",
"webpack-dev-server": "^3.7.2",
@@ -88,11 +93,5 @@
},
"resolutions": {
"**/@babel/runtime": "7.5.5"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
}
+8
View File
@@ -0,0 +1,8 @@
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.commonjs.js');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
return webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
};
+1 -3
View File
@@ -1,6 +1,6 @@
const merge = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
const webpackCommon = require('./../../../.webpack/webpack.commonjs.js');
const pkg = require('./../package.json');
const ROOT_DIR = path.join(__dirname, './..');
@@ -11,8 +11,6 @@ module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-production
mode: 'production',
devtool: 'source-map',
stats: {
colors: true,
+38
View File
@@ -3,6 +3,44 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.50.5](https://github.com/OHIF/Viewers/compare/@ohif/core@0.50.4...@ohif/core@0.50.5) (2019-09-04)
**Note:** Version bump only for package @ohif/core
## [0.50.4](https://github.com/OHIF/Viewers/compare/@ohif/core@0.50.3...@ohif/core@0.50.4) (2019-09-04)
### Bug Fixes
* measurementsAPI issue caused by production build ([#842](https://github.com/OHIF/Viewers/issues/842)) ([49d3439](https://github.com/OHIF/Viewers/commit/49d3439))
## [0.50.3](https://github.com/OHIF/Viewers/compare/@ohif/core@0.50.2...@ohif/core@0.50.3) (2019-08-26)
### Bug Fixes
* **Studies:** Qidosupportsincludefield should be true by default ([#801](https://github.com/OHIF/Viewers/issues/801)) ([a88d865](https://github.com/OHIF/Viewers/commit/a88d865))
## [0.50.2](https://github.com/OHIF/Viewers/compare/@ohif/core@0.50.1...@ohif/core@0.50.2) (2019-08-22)
**Note:** Version bump only for package @ohif/core
## [0.50.1](https://github.com/OHIF/Viewers/compare/@ohif/core@0.50.0-alpha.10...@ohif/core@0.50.1) (2019-08-14)
**Note:** Version bump only for package @ohif/core
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/core",
"version": "0.50.1",
"version": "0.50.5",
"description": "Generic business logic for web-based medical imaging applications",
"author": "OHIF Core Team",
"license": "MIT",
@@ -23,7 +23,7 @@
"scripts": {
"dev": "jest --watchAll",
"dev:core": "yarn run dev",
"build": "webpack --config .webpack/webpack.prod.js",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"prepublishOnly": "yarn run build",
"start": "yarn run dev",
+1 -3
View File
@@ -18,8 +18,6 @@ import { StudyMetadataSource } from './StudyMetadataSource';
import { StudyPrefetcher } from './StudyPrefetcher';
import { TypeSafeCollection } from './TypeSafeCollection';
//import { StudySummary } from './metadata/StudySummary';
export {
OHIFStudyMetadataSource,
MetadataProvider,
@@ -27,7 +25,7 @@ export {
HotkeysManager,
ImageSet,
StudyPrefetcher,
//StudyLoadingListener,
StudyLoadingListener,
StackLoadingListener,
DICOMFileLoadingListener,
StudyMetadata,
@@ -1,458 +0,0 @@
var dialogPolyfill = (function() {
var supportCustomEvent = window.CustomEvent;
if (!supportCustomEvent || typeof supportCustomEvent == 'object') {
supportCustomEvent = function CustomEvent(event, x) {
x = x || {};
var ev = document.createEvent('CustomEvent');
ev.initCustomEvent(event, !!x.bubbles, !!x.cancelable, x.detail || null);
return ev;
};
supportCustomEvent.prototype = window.Event.prototype;
}
/**
* Finds the nearest <dialog> from the passed element.
*
* @param {Element} el to search from
* @param {HTMLDialogElement} dialog found
*/
function findNearestDialog(el) {
while (el) {
if (el.nodeName == 'DIALOG') {
return el;
}
el = el.parentElement;
}
return null;
}
var dialogPolyfill = {};
dialogPolyfill.reposition = function(element) {
var scrollTop =
document.body.scrollTop || document.documentElement.scrollTop;
var topValue = scrollTop + (window.innerHeight - element.offsetHeight) / 2;
element.style.top = Math.max(0, topValue) + 'px';
element.dialogPolyfillInfo.isTopOverridden = true;
};
dialogPolyfill.inNodeList = function(nodeList, node) {
for (var i = 0; i < nodeList.length; ++i) {
if (nodeList[i] == node) return true;
}
return false;
};
dialogPolyfill.isInlinePositionSetByStylesheet = function(element) {
for (var i = 0; i < document.styleSheets.length; ++i) {
var styleSheet = document.styleSheets[i];
var cssRules = null;
// Some browsers throw on cssRules.
try {
cssRules = styleSheet.cssRules;
} catch (e) {}
if (!cssRules) continue;
for (var j = 0; j < cssRules.length; ++j) {
var rule = cssRules[j];
var selectedNodes = null;
// Ignore errors on invalid selector texts.
try {
selectedNodes = document.querySelectorAll(rule.selectorText);
} catch (e) {}
if (
!selectedNodes ||
!dialogPolyfill.inNodeList(selectedNodes, element)
)
continue;
var cssTop = rule.style.getPropertyValue('top');
var cssBottom = rule.style.getPropertyValue('bottom');
if ((cssTop && cssTop != 'auto') || (cssBottom && cssBottom != 'auto'))
return true;
}
}
return false;
};
dialogPolyfill.needsCentering = function(dialog) {
var computedStyle = window.getComputedStyle(dialog);
if (computedStyle.position != 'absolute') {
return false;
}
// We must determine whether the top/bottom specified value is non-auto. In
// WebKit/Blink, checking computedStyle.top == 'auto' is sufficient, but
// Firefox returns the used value. So we do this crazy thing instead: check
// the inline style and then go through CSS rules.
if (
(dialog.style.top != 'auto' && dialog.style.top != '') ||
(dialog.style.bottom != 'auto' && dialog.style.bottom != '')
)
return false;
return !dialogPolyfill.isInlinePositionSetByStylesheet(dialog);
};
dialogPolyfill.showDialog = function(isModal) {
if (this.open) {
throw 'InvalidStateError: showDialog called on open dialog';
}
this.open = true; // TODO: should be a getter mapped to attribute
this.setAttribute('open', 'open');
if (isModal) {
// Find element with `autofocus` attribute or first form control
var first_form_ctrl = null;
var autofocus = null;
var findElementToFocus = function(root) {
if (!root.children) {
return;
}
for (var i = 0; i < root.children.length; i++) {
var elem = root.children[i];
if (
first_form_ctrl === null &&
!elem.disabled &&
(elem.nodeName == 'BUTTON' ||
elem.nodeName == 'INPUT' ||
elem.nodeName == 'KEYGEN' ||
elem.nodeName == 'SELECT' ||
elem.nodeName == 'TEXTAREA')
) {
first_form_ctrl = elem;
}
if (elem.autofocus) {
autofocus = elem;
return;
}
findElementToFocus(elem);
if (autofocus !== null) return;
}
};
findElementToFocus(this);
if (autofocus !== null) {
autofocus.focus();
} else if (first_form_ctrl !== null) {
first_form_ctrl.focus();
}
}
if (dialogPolyfill.needsCentering(this)) dialogPolyfill.reposition(this);
if (isModal) {
this.dialogPolyfillInfo.modal = true;
dialogPolyfill.dm.pushDialog(this);
}
// IE sometimes complains when calling .focus() that it
// "Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus."
try {
if (autofocus !== null) {
autofocus.focus();
} else if (first_form_ctrl !== null) {
first_form_ctrl.focus();
}
} catch (e) {}
this.style.zoom = 1;
};
dialogPolyfill.close = function(retval) {
if (!this.open && !window.HTMLDialogElement) {
// Native implementations will set .open to false, so ignore this error.
throw 'InvalidStateError: close called on closed dialog';
}
this.open = false;
this.removeAttribute('open');
// Leave returnValue untouched in case it was set directly on the element
if (typeof retval != 'undefined') {
this.returnValue = retval;
}
// This won't match the native <dialog> exactly because if the user sets top
// on a centered polyfill dialog, that top gets thrown away when the dialog is
// closed. Not sure it's possible to polyfill this perfectly.
if (this.dialogPolyfillInfo.isTopOverridden) {
this.style.top = 'auto';
}
if (this.dialogPolyfillInfo.modal) {
dialogPolyfill.dm.removeDialog(this);
}
// Triggering "close" event for any attached listeners on the <dialog>
var event;
if (document.createEvent) {
event = document.createEvent('HTMLEvents');
event.initEvent('close', true, true);
} else {
event = new Event('close');
}
this.dispatchEvent(event);
return this.returnValue;
};
dialogPolyfill.registerDialog = function(element) {
if (element.show) {
// console.warn("This browser already supports <dialog>, the polyfill " +
// "may not work correctly.");
}
element.show = dialogPolyfill.showDialog.bind(element, false);
element.showModal = dialogPolyfill.showDialog.bind(element, true);
element.close = dialogPolyfill.close.bind(element);
element.dialogPolyfillInfo = {};
element.open = false;
};
// The overlay is used to simulate how a modal dialog blocks the document. The
// blocking dialog is positioned on top of the overlay, and the rest of the
// dialogs on the pending dialog stack are positioned below it. In the actual
// implementation, the modal dialog stacking is controlled by the top layer,
// where z-index has no effect.
var TOP_LAYER_ZINDEX = 100000;
var MAX_PENDING_DIALOGS = 100000;
dialogPolyfill.DialogManager = function() {
this.pendingDialogStack = [];
this.overlay = document.createElement('div');
this.overlay.style.width = '100%';
this.overlay.style.height = '100%';
this.overlay.style.position = 'fixed';
this.overlay.style.left = '0px';
this.overlay.style.top = '0px';
this.overlay.style.backgroundColor = 'rgba(0,0,0,0.0)';
this.focusPageLast = this.createFocusable();
this.overlay.appendChild(this.focusPageLast);
this.overlay.addEventListener('click', function(e) {
var redirectedEvent = document.createEvent('MouseEvents');
redirectedEvent.initMouseEvent(
e.type,
e.bubbles,
e.cancelable,
window,
e.detail,
e.screenX,
e.screenY,
e.clientX,
e.clientY,
e.ctrlKey,
e.altKey,
e.shiftKey,
e.metaKey,
e.button,
e.relatedTarget
);
document.body.dispatchEvent(redirectedEvent);
});
// TODO: Only install when any dialogs are open.
document.addEventListener(
'submit',
function(ev) {
var method = ev.target.getAttribute('method');
method = method ? method.toLowerCase() : '';
if (method != 'dialog') {
return;
}
ev.preventDefault();
var dialog = findNearestDialog(ev.target);
if (!dialog) {
return;
}
// FIXME: The original event doesn't contain the INPUT element used to
// submit the form (if any). Look in some possible places.
var returnValue;
var cands = [document.activeElement, ev.explicitOriginalTarget];
cands.some(function(cand) {
if (cand && cand.nodeName == 'INPUT' && cand.form == ev.target) {
returnValue = cand.value;
return true;
}
});
dialog.close(returnValue);
},
true
);
};
dialogPolyfill.DialogManager.prototype.createFocusable = function(tabIndex) {
var span = document.createElement('span');
span.tabIndex = tabIndex || 0;
span.style.opacity = 0;
span.style.position = 'static';
return span;
};
dialogPolyfill.DialogManager.prototype.blockDocument = function() {
if (!document.body.contains(this.overlay)) {
document.body.appendChild(this.overlay);
// On Safari/Mac (and possibly other browsers), the documentElement is
// not focusable. This is required for modal dialogs as it is the first
// element to be hit by a tab event, and further tabs are redirected to
// the most visible dialog.
if (this.needsDocumentElementFocus === undefined) {
document.documentElement.focus();
this.needsDocumentElementFocus =
document.activeElement != document.documentElement;
}
if (this.needsDocumentElementFocus) {
document.documentElement.tabIndex = 1;
}
}
};
dialogPolyfill.DialogManager.prototype.unblockDocument = function() {
document.body.removeChild(this.overlay);
if (this.needsDocumentElementFocus) {
// TODO: Restore the previous tabIndex, rather than clearing it.
document.documentElement.tabIndex = '';
}
};
dialogPolyfill.DialogManager.prototype.updateStacking = function() {
if (this.pendingDialogStack.length == 0) {
this.unblockDocument();
return;
}
this.blockDocument();
var zIndex = TOP_LAYER_ZINDEX;
for (var i = 0; i < this.pendingDialogStack.length; i++) {
if (i == this.pendingDialogStack.length - 1)
this.overlay.style.zIndex = zIndex++;
var dialog = this.pendingDialogStack[i];
dialog.dialogPolyfillInfo.backdrop.style.zIndex = zIndex++;
dialog.style.zIndex = zIndex++;
}
};
dialogPolyfill.DialogManager.prototype.handleKey = function(event) {
var dialogCount = this.pendingDialogStack.length;
if (dialogCount == 0) {
return;
}
var dialog = this.pendingDialogStack[dialogCount - 1];
var pfi = dialog.dialogPolyfillInfo;
switch (event.keyCode) {
case 9 /* tab */:
var activeElement = document.activeElement;
var forward = !event.shiftKey;
if (forward) {
// Tab forward, so look for document or fake last focus element.
if (
activeElement == document.documentElement ||
activeElement == document.body ||
activeElement == pfi.backdrop
) {
pfi.focusFirst.focus();
} else if (activeElement == pfi.focusLast) {
// TODO: Instead of wrapping to focusFirst, escape to browser chrome.
pfi.focusFirst.focus();
}
} else {
// Tab backwards, so look for fake first focus element.
if (activeElement == pfi.focusFirst) {
// TODO: Instead of wrapping to focusLast, escape to browser chrome.
pfi.focusLast.focus();
} else if (activeElement == this.focusPageLast) {
// The focus element is at the end of the page (e.g., shift-tab from
// the window chrome): move current focus to the last element in the
// dialog instead.
pfi.focusLast.focus();
}
}
break;
case 27 /* esc */:
event.preventDefault();
event.stopPropagation();
var cancelEvent = new supportCustomEvent('cancel', {
bubbles: false,
cancelable: true,
});
if (dialog.dispatchEvent(cancelEvent)) {
dialog.close();
}
break;
}
};
dialogPolyfill.DialogManager.prototype.pushDialog = function(dialog) {
if (this.pendingDialogStack.length >= MAX_PENDING_DIALOGS) {
throw 'Too many modal dialogs';
}
var backdrop = document.createElement('div');
backdrop.className = 'backdrop';
var clickEventListener = function(e) {
var redirectedEvent = document.createEvent('MouseEvents');
redirectedEvent.initMouseEvent(
e.type,
e.bubbles,
e.cancelable,
window,
e.detail,
e.screenX,
e.screenY,
e.clientX,
e.clientY,
e.ctrlKey,
e.altKey,
e.shiftKey,
e.metaKey,
e.button,
e.relatedTarget
);
dialog.dispatchEvent(redirectedEvent);
};
backdrop.addEventListener('click', clickEventListener);
dialog.parentNode.insertBefore(backdrop, dialog.nextSibling);
dialog.dialogPolyfillInfo.backdrop = backdrop;
dialog.dialogPolyfillInfo.clickEventListener = clickEventListener;
this.pendingDialogStack.push(dialog);
this.updateStacking();
dialog.dialogPolyfillInfo.focusFirst = this.createFocusable();
dialog.dialogPolyfillInfo.focusLast = this.createFocusable();
dialog.appendChild(dialog.dialogPolyfillInfo.focusLast);
dialog.insertBefore(
dialog.dialogPolyfillInfo.focusFirst,
dialog.firstChild
);
};
dialogPolyfill.DialogManager.prototype.removeDialog = function(dialog) {
var index = this.pendingDialogStack.indexOf(dialog);
if (index == -1) {
return;
}
this.pendingDialogStack.splice(index, 1);
var backdrop = dialog.dialogPolyfillInfo.backdrop;
var clickEventListener = dialog.dialogPolyfillInfo.clickEventListener;
backdrop.removeEventListener('click', clickEventListener);
backdrop.parentNode.removeChild(backdrop);
dialog.dialogPolyfillInfo.backdrop = null;
dialog.dialogPolyfillInfo.clickEventListener = null;
this.updateStacking();
dialog.removeChild(dialog.dialogPolyfillInfo.focusFirst);
dialog.removeChild(dialog.dialogPolyfillInfo.focusLast);
dialog.dialogPolyfillInfo.focusFirst = null;
dialog.dialogPolyfillInfo.focusLast = null;
};
dialogPolyfill.dm = new dialogPolyfill.DialogManager();
document.addEventListener(
'keydown',
dialogPolyfill.dm.handleKey.bind(dialogPolyfill.dm)
);
return dialogPolyfill;
})();
@@ -1,34 +0,0 @@
dialog
position: absolute
left: 0
right: 0
width: -moz-fit-content
width: -webkit-fit-content
width: fit-content
height: -moz-fit-content
height: -webkit-fit-content
height: fit-content
margin: auto
border: solid
padding: 1em
background: white
color: black
display: none
dialog[open]
display: block
dialog + .backdrop
position: fixed
top: 0
right: 0
bottom: 0
left: 0
background: rgba(0,0,0,0.1)
/* for small devices, modal dialogs go full-screen */
@media screen and (max-width: 540px)
dialog[_polyfill_modal]
top: 0
width: auto
margin: 1em
-1
View File
@@ -1 +0,0 @@
import './styleProperty.js';
@@ -1,66 +0,0 @@
/*
* https://github.com/swederik/dragula/blob/ccc15d75186f5168e7abadbe3077cf12dab09f8b/styleProperty.js
*/
(function() {
'use strict';
const browserProps = {};
function eachVendor(prop, fn) {
const prefixes = ['Webkit', 'Moz', 'ms', 'O'];
fn(prop);
for (let i = 0; i < prefixes.length; i++) {
fn(prefixes[i] + prop.charAt(0).toUpperCase() + prop.slice(1));
}
}
function check(property, testValue) {
const sandbox = document.createElement('iframe');
const element = document.createElement('p');
document.body.appendChild(sandbox);
sandbox.contentDocument.body.appendChild(element);
const support = set(element, property, testValue);
// We have to do this because remove() is not supported by IE11 and below
sandbox.parentElement.removeChild(sandbox);
return support;
}
function checkComputed(el, prop) {
const computed = window.getComputedStyle(el).getPropertyValue(prop);
return computed !== void 0 && computed.length > 0 && computed !== 'none';
}
function set(el, prop, value) {
let match = false;
if (browserProps[prop] === void 0) {
eachVendor(prop, function(vendorProp) {
if (el.style[vendorProp] !== void 0 && match === false) {
el.style[vendorProp] = value;
if (checkComputed(el, vendorProp)) {
match = true;
browserProps[prop] = vendorProp;
}
}
});
} else {
el.style[browserProps[prop]] = value;
return true;
}
return match;
}
const styleProperty = {
check,
set,
};
OHIF.ui.styleProperty = styleProperty;
})();
const { styleProperty } = OHIF.ui;
export { styleProperty };
@@ -1,150 +0,0 @@
/*!
* transition-to-from-auto 0.5.2
* https://github.com/75lb/transition-to-from-auto
* Copyright 2015 Lloyd Brookes <75pound@gmail.com>
*/
/**
@module
@alias transition
*/
(function(window, document) {
'use strict';
var getComputedStyle = window.getComputedStyle;
var isTransition = 'data-ttfaInTransition';
var elements = [];
var data = [];
// Transition detecting
var transitionProp = false;
var transitionEnd = false;
var testStyle = document.createElement('a').style;
var testProp;
if (testStyle[(testProp = 'webkitTransition')] !== undefined) {
transitionProp = testProp;
transitionEnd = testProp + 'End';
}
if (testStyle[(testProp = 'transition')] !== undefined) {
transitionProp = testProp;
transitionEnd = testProp + 'end';
}
function process(options, data) {
var el = options.element;
var val = options.val;
var prop = options.prop;
var style = el.style;
var startVal;
var autoVal;
if (!transitionProp) {
return (style[prop] = val);
}
if (el.hasAttribute(isTransition)) {
el.removeEventListener(transitionEnd, data.l);
} else {
style[transitionProp] = 'none';
startVal = getComputedStyle(el)[prop];
style[prop] = 'auto';
autoVal = getComputedStyle(el)[prop];
// Interrupt
if (startVal === val || (val === 'auto' && startVal === autoVal)) {
return;
}
data.auto = autoVal;
el.setAttribute(isTransition, 1);
// Transition
style[prop] = startVal;
el.offsetWidth;
style[transitionProp] = options.style;
}
style[prop] = val === 'auto' ? data.auto : val;
data.l = function(e) {
if (e.propertyName === prop) {
el.removeAttribute(isTransition);
el.removeEventListener(transitionEnd, data.l);
if (val === 'auto') {
/* avoid transition flashes in Safari */
style[transitionProp] = 'none';
style[prop] = val;
}
}
};
el.addEventListener(transitionEnd, data.l);
}
/**
@param options {Object}
@param options.element {string | element} - The DOM element or selector to transition
@param options.val {string} - The value you want to transition to
@param [options.prop] {string} - The CSS property to transition, defaults to `"height"`
@param [options.style] {string} - The desired value for the `transition` CSS property (e.g. `"height 1s"`). If specified, this value is added inline and will override your CSS. Leave this value blank if you already have it defined in your stylesheet.
@alias module:transition-to-from-auto
*/
function transition(options) {
var element = options.element;
var datum;
var index;
if (typeof element === 'string') {
element = document.querySelector(element);
}
element = options.element = element instanceof Node ? element : false;
options.prop = options.prop || 'height';
options.style = options.style || '';
if (element) {
index = elements.indexOf(element);
if (~index) {
datum = data[index];
} else {
datum = {};
elements.push(element);
data.push(datum);
}
process(options, datum);
}
}
/**
The name of the vendor-specific transition CSS property
@type {string}
@example
el.style[transition.prop + 'Duration'] = '1s';
*/
transition.prop = transitionProp;
/**
* The name of the [transition end event](https://developer.mozilla.org/en-US/docs/Web/Events/transitionend) in the current browser (typically `"transitionend"` or `"webkitTransitionEnd"`)
* @type {string}
* @example
* el.addEventListener(transition.end, function(){
* // the transition ended..
* });
*/
transition.end = transitionEnd;
if (typeof module === 'object' && module.exports) {
module.exports = transition;
} else if (typeof define === 'function' && define.amd) {
define(function() {
return transition;
});
} else {
window.transition = transition;
}
})(window, document);
-1
View File
@@ -13,7 +13,6 @@ import metadata from './classes/metadata/';
import object from './object.js';
import redux from './redux/';
import string from './string.js';
//import './schema.js';
import studies from './studies/';
import ui from './ui';
import user from './user.js';
@@ -5,9 +5,10 @@ import getDescription from '../lib/getDescription';
import getImageIdForImagePath from '../lib/getImageIdForImagePath';
import guid from '../../utils/guid';
import studyMetadataManager from '../../utils/studyMetadataManager';
import { measurementApiDefaultConfig } from './../configuration.js';
const configuration = {
measurementTools: [],
...measurementApiDefaultConfig,
};
export default class MeasurementApi {
@@ -1,6 +1,9 @@
import log from '../../log';
import { timepointApiDefaultConfig } from './../configuration.js';
const configuration = {};
const configuration = {
...timepointApiDefaultConfig,
};
const TIMEPOINT_TYPE_NAMES = {
prebaseline: 'Pre-Baseline',
@@ -1,4 +1,3 @@
import { TimepointApi, MeasurementApi } from './classes';
import { allTools } from './toolGroups/allTools';
import {
retrieveMeasurements,
@@ -10,7 +9,7 @@ import {
disassociateStudy,
} from './dataExchange';
MeasurementApi.setConfiguration({
const measurementApiDefaultConfig = {
measurementTools: [allTools],
newLesions: [
{
@@ -28,9 +27,9 @@ MeasurementApi.setConfiguration({
retrieve: retrieveMeasurements,
store: storeMeasurements,
},
});
};
TimepointApi.setConfiguration({
const timepointApiDefaultConfig = {
dataExchange: {
retrieve: retrieveTimepoints,
store: storeTimepoints,
@@ -38,4 +37,6 @@ TimepointApi.setConfiguration({
update: updateTimepoint,
disassociate: disassociateStudy,
},
});
};
export { measurementApiDefaultConfig, timepointApiDefaultConfig };
-3
View File
@@ -1,9 +1,6 @@
import './configuration';
import * as tools from './tools';
import { MeasurementApi, TimepointApi } from './classes';
import { ConformanceCriteria } from './conformance';
import MeasurementHandlers from './measurementHandlers';
import getDescription from './lib/getDescription';
-34
View File
@@ -1,34 +0,0 @@
//import SimpleSchema from 'simpl-schema'
/*
Extend the available options on schema definitions:
* valuesLabels: Used in conjunction with allowedValues to define the text
label for each value (used on forms)
* textOptional: Used to allow empty strings
*/
/*SimpleSchema.extendOptions({
valuesLabels: Match.Optional([String]),
textOptional: Match.Optional(Boolean)
});
// Add default required validation for empty strings which can be bypassed
// using textOptional=true definition
SimpleSchema.addValidator(function() {
if (
this.definition.optional !== true &&
this.definition.textOptional !== true &&
this.value === ''
) {
return 'required';
}
});*/
// Including [label] for some messages
/*SimpleSchema.messages({
maxCount: '[label] can not have more than [maxCount] values',
minCount: '[label] must have at least [minCount] values',
notAllowed: '[label] has an invalid value: "[value]"'
});*/
-320
View File
@@ -1,320 +0,0 @@
/*import SimpleSchema from 'simpl-schema';
const serverNameDefinitions = {
type: String,
label: 'Server Name',
max: 100
};
const serverTypeDefinitions = {
type: String,
label: 'Server Type',
allowedValues: ['dicomWeb', 'dimse'],
valuesLabels: ['DICOM Web', 'DIMSE'],
optional: true
};
const wadoUriRootDefinitions = {
type: String,
label: 'WADO URI root',
max: 1000
};
const availableMouseButtonTools = ['wwwc', 'zoom', 'pan', 'stackScroll'];
export const DICOMWebRequestOptions = new SimpleSchema({
auth: {
type: String,
label: 'Authentication',
defaultValue: 'orthanc:orthanc',
optional: true
},
requestFromBrowser: {
type: Boolean,
label: 'Make DICOMWeb requests from the Browser',
defaultValue: false,
optional: true
},
logRequests: {
type: Boolean,
defaultValue: true,
label: 'Requests'
},
logResponses: {
type: Boolean,
defaultValue: false,
label: 'Responses'
},
logTiming: {
type: Boolean,
defaultValue: true,
label: 'Timing'
}
});
export const DICOMWebServer = new SimpleSchema({
name: serverNameDefinitions,
type: serverTypeDefinitions,
wadoUriRoot: wadoUriRootDefinitions,
wadoRoot: {
type: String,
label: 'WADO root',
max: 1000
},
imageRendering: {
type: String,
label: 'Image rendering',
allowedValues: ['wadouri', 'wadors'],
valuesLabels: ['WADO URI', 'WADO RS'],
defaultValue: 'wadouri'
},
thumbnailRendering: {
type: String,
label: 'Thumbnail rendering',
allowedValues: ['wadouri', 'wadors'],
valuesLabels: ['WADO URI', 'WADO RS'],
defaultValue: 'wadouri'
},
qidoRoot: {
type: String,
label: 'QIDO root',
max: 1000
},
qidoSupportsIncludeField: {
type: Boolean,
label: 'QIDO supports "includefield" query key',
defaultValue: false
},
requestOptions: {
type: DICOMWebRequestOptions,
label: 'Request Options'
}
});
export const DIMSEPeer = new SimpleSchema({
aeTitle: {
type: String,
label: 'AE Title'
},
hostAE: {
type: String,
label: 'AE Host',
optional: true
},
host: {
type: String,
label: 'Host Domain/IP',
regEx: SimpleSchema.RegEx.WeakDomain
},
port: {
type: Number,
label: 'Port',
min: 1,
defaultValue: 11112,
max: 65535
},
default: {
type: Boolean,
label: 'Default',
defaultValue: false
},
server: {
type: Boolean,
label: 'Server',
defaultValue: false
},
supportsInstanceRetrievalByStudyUid: {
type: Boolean,
label: 'Supports instance retrieval by StudyUid',
defaultValue: true
}
});
export const DIMSEServer = new SimpleSchema({
name: serverNameDefinitions,
type: serverTypeDefinitions,
wadoUriRoot: wadoUriRootDefinitions,
requestOptions: {
type: DICOMWebRequestOptions,
label: 'Request Options'
},
peers: {
type: [DIMSEPeer],
label: 'Peer List',
minCount: 1
}
});
export const UISettings = new SimpleSchema({
studyListFunctionsEnabled: {
type: Boolean,
label: 'Study List Functions Enabled?',
defaultValue: true
},
leftSidebarOpen: {
type: Boolean,
label: 'Left sidebar open by default?',
defaultValue: false
},
leftSidebarDragAndDrop: {
type: Boolean,
label:
'Left sidebar allows thumbnail drag and drop. If false, images will be loaded on single click.',
defaultValue: true
},
displaySetNavigationLoopOverSeries: {
type: Boolean,
label:
'The UP/DOWN display set navigation buttons will start over when reach the last display set in viewport?',
defaultValue: true
},
displaySetNavigationMultipleViewports: {
type: Boolean,
label:
'The UP/DOWN display set navigation buttons will iterate over all the viewports at once?',
defaultValue: false
},
displayEchoUltrasoundWorkflow: {
type: Boolean,
label: 'Enable cine dialog enhancements for multiframe images.',
defaultValue: false
},
autoPositionMeasurementsTextCallOuts: {
type: String,
label: 'Auto position text call-outs for measurements when creating them.',
defaultValue: 'TRBL'
},
studyListDateFilterNumDays: {
type: Number,
label: 'Number of days to be used on Study List date filter',
min: 1
},
showStackLoadingProgressBar: {
type: Boolean,
label:
'Show a progress bar closest to the thumbnail showing how much the stack has loaded',
defaultValue: true
},
cornerstoneRenderer: {
type: String,
label: 'Cornerstone default image renderer',
defaultValue: 'webgl'
},
sortSeriesByIncomingOrder: {
type: Boolean,
label:
"Define if the series' images shall be sorted by incoming order. Sort by Instance Number by default.",
defaultValue: false
},
useMiddleSeriesInstanceAsThumbnail: {
type: Boolean,
label:
'Define if the middle instance of a series will be used as thumbnail. If not, the first instance will be used.',
defaultValue: true
}
});
export const PrefetchSchema = new SimpleSchema({
order: {
type: String,
label: 'Prefetch Order',
allowedValues: ['topdown', 'downward', 'closest'],
optional: false
},
displaySetCount: {
type: Number,
label: 'Display Set Count',
min: 1,
defaultValue: 1
}
});
export const MouseButtonToolSchema = new SimpleSchema({
left: {
type: String,
label: 'Left Mouse Button',
allowedValues: availableMouseButtonTools,
optional: true
},
right: {
type: String,
label: 'Right Mouse Button',
allowedValues: availableMouseButtonTools,
optional: true
},
middle: {
type: String,
label: 'Middle Mouse Button',
allowedValues: availableMouseButtonTools,
optional: true
}
});
export const PublicServerConfig = new SimpleSchema({
verifyEmail: {
type: Boolean,
label: 'Verify Email',
defaultValue: false
},
demoUserEnabled: {
type: Boolean,
label: 'Creates demo user on startup and show TestDrive button',
defaultValue: true
},
userAuthenticationRoutesEnabled: {
type: Boolean,
label: 'Enables routing to /login page.',
defaultValue: false
},
ui: {
type: UISettings,
label: 'UI Settings'
},
prefetch: {
type: PrefetchSchema,
label: 'Prefetch settings'
},
defaultMouseButtonTools: {
type: MouseButtonToolSchema,
label: 'Default Mouse Button Tools'
}
});
export const Servers = new SimpleSchema({
dicomWeb: {
type: [DICOMWebServer],
label: 'DICOMWeb Servers',
optional: true
},
dimse: {
type: [DIMSEServer],
label: 'DIMSE Servers',
optional: true
}
});
export const ServerConfiguration = new SimpleSchema({
servers: {
type: Servers,
label: 'Servers'
},
defaultServiceType: {
type: String,
label: 'Default Service Type',
defaultValue: 'dicomWeb'
},
dropCollections: {
type: Boolean,
label: 'Drop database collections',
defaultValue: false
},
public: {
type: PublicServerConfig,
label: 'Public Server Configuration'
},
origin: {
type: String,
label: 'Origin',
optional: true
}
});*/
@@ -118,6 +118,10 @@ export default function Studies(server, filter) {
};
const dicomWeb = new api.DICOMwebClient(config);
server.qidoSupportsIncludeField =
server.qidoSupportsIncludeField === undefined
? true
: server.qidoSupportsIncludeField;
const queryParams = getQIDOQueryParams(
filter,
server.qidoSupportsIncludeField
+2 -10
View File
@@ -1,16 +1,8 @@
const path = require('path');
const merge = require('webpack-merge');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
//
const webpackCommon = require('./../../../.webpack/webpack.commonjs.js');
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-development
mode: 'development',
});
return webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
};
+1 -3
View File
@@ -1,6 +1,6 @@
const merge = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
const webpackCommon = require('./../../../.webpack/webpack.commonjs.js');
const pkg = require('./../package.json');
const ROOT_DIR = path.join(__dirname, './..');
@@ -11,8 +11,6 @@ module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-production
mode: 'production',
devtool: 'source-map',
stats: {
colors: true,
+19
View File
@@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.50.3](https://github.com/OHIF/Viewers/compare/@ohif/i18n@0.50.2...@ohif/i18n@0.50.3) (2019-09-04)
**Note:** Version bump only for package @ohif/i18n
## [0.50.2](https://github.com/OHIF/Viewers/compare/@ohif/i18n@0.50.1...@ohif/i18n@0.50.2) (2019-09-04)
### Bug Fixes
* measurementsAPI issue caused by production build ([#842](https://github.com/OHIF/Viewers/issues/842)) ([49d3439](https://github.com/OHIF/Viewers/commit/49d3439))
## [0.50.1](https://github.com/OHIF/Viewers/compare/@ohif/i18n@0.50.0-alpha.11...@ohif/i18n@0.50.1) (2019-08-14)
**Note:** Version bump only for package @ohif/i18n
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/i18n",
"version": "0.50.1",
"version": "0.50.3",
"description": "Internationalization library for The OHIF Viewer",
"author": "OHIF",
"license": "MIT",
@@ -20,9 +20,9 @@
"access": "public"
},
"scripts": {
"dev": "webpack --config .webpack/webpack.dev.js --watch --debug --output-pathinfo",
"dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --debug --output-pathinfo",
"dev:i18n": "yarn run dev",
"build": "webpack --config .webpack/webpack.prod.js",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"prepublishOnly": "yarn run build",
"pullTranslations": "./pullTranslations.sh",
+1 -3
View File
@@ -1,6 +1,6 @@
const merge = require('webpack-merge');
const path = require('path');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
const webpackCommon = require('./../../../.webpack/webpack.commonjs.js');
const pkg = require('./../package.json');
const ROOT_DIR = path.join(__dirname, './..');
@@ -11,8 +11,6 @@ module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-production
mode: 'production',
devtool: 'source-map',
stats: {
colors: true,
+19
View File
@@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.50.3](https://github.com/OHIF/Viewers/compare/@ohif/ui@0.50.2...@ohif/ui@0.50.3) (2019-09-04)
**Note:** Version bump only for package @ohif/ui
## [0.50.2](https://github.com/OHIF/Viewers/compare/@ohif/ui@0.50.1...@ohif/ui@0.50.2) (2019-09-04)
### Bug Fixes
* measurementsAPI issue caused by production build ([#842](https://github.com/OHIF/Viewers/issues/842)) ([49d3439](https://github.com/OHIF/Viewers/commit/49d3439))
## [0.50.1](https://github.com/OHIF/Viewers/compare/@ohif/ui@0.50.0-alpha.10...@ohif/ui@0.50.1) (2019-08-14)
**Note:** Version bump only for package @ohif/ui
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/ui",
"version": "0.50.1",
"version": "0.50.3",
"description": "A set of React components for Medical Imaging Viewers",
"author": "OHIF Contributors",
"license": "MIT",
@@ -23,7 +23,7 @@
"dev": "docz dev",
"dev:ui": "yarn run dev",
"docs": "docz build",
"build": "webpack --config .webpack/webpack.prod.js",
"build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js",
"build:package": "yarn run build",
"prepublishOnly": "yarn run build",
"test:unit": "jest --watchAll",
+7
View File
@@ -0,0 +1,7 @@
# Browsers that we support
> 1%
IE 11
not IE < 11
not dead
not op_mini all
+1 -1
View File
@@ -5,5 +5,5 @@
# https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#adding-development-environment-variables-in-env
#
PUBLIC_URL=/demo
PUBLIC_URL=/demo/
APP_CONFIG=config/netlify.js
-68
View File
@@ -1,68 +0,0 @@
/**
* Notice that we're not extracting CSS or generating a service-worker. This
* may create a slightly inconsistent experience, but should allow for faster/
* easier development.
*
* We do still need to generate the "index.html" and copy over files from
* "public/" so our `webpack-dev-server` can _serve_ them for us :+1:
*/
const path = require('path');
const merge = require('webpack-merge');
const webpack = require('webpack');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
// Plugins
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
// Const
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
const PUBLIC_DIR = path.join(__dirname, '../public');
const ASSET_PATH = process.env.ASSET_PATH || '/';
// Env Vars
const PUBLIC_URL = process.env.PUBLIC_URL || '';
const APP_CONFIG = process.env.APP_CONFIG || 'config/default.js';
module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-development
mode: 'development',
output: {
path: DIST_DIR, // push to common?
publicPath: ASSET_PATH,
// filename: '[name].bundle.js',
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
// Copy "Public" Folder to Dist
new CopyWebpackPlugin([
{
from: PUBLIC_DIR,
to: DIST_DIR,
toType: 'dir',
// Ignore our HtmlWebpackPlugin template file
ignore: ['index.html', '.DS_Store'],
},
]),
// Generate "index.html" w/ correct includes/imports
new HtmlWebpackPlugin({
template: `${PUBLIC_DIR}/index.html`,
filename: 'index.html',
templateParameters: {
PUBLIC_URL: PUBLIC_URL,
APP_CONFIG: APP_CONFIG,
},
}),
],
// https://webpack.js.org/configuration/dev-server/
devServer: {
hot: true,
open: true,
port: 3000,
historyApiFallback: {
disableDotRule: true,
},
},
});
};
-87
View File
@@ -1,87 +0,0 @@
const path = require('path');
const merge = require('webpack-merge');
const webpack = require('webpack');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
// Plugins
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const ExtractCssChunksPlugin = require('extract-css-chunks-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const workboxPlugin = require('workbox-webpack-plugin');
//
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
const PUBLIC_DIR = path.join(__dirname, '../public');
// Env Vars
const PUBLIC_URL = process.env.PUBLIC_URL || '';
const APP_CONFIG = process.env.APP_CONFIG || 'config/default.js';
module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-production
mode: 'production',
stats: {
colors: true,
hash: true,
timings: true,
assets: true,
chunks: false,
chunkModules: false,
modules: false,
children: false,
warnings: true,
},
optimization: {
minimize: true,
sideEffects: true,
},
output: {
path: DIST_DIR,
filename: '[name].bundle.[chunkhash].js',
},
// TODO:
// Do we need to rip anything out of the more generic common.js we're
// merging with this?
plugins: [
// Longer build. Let's report progress
new webpack.ProgressPlugin(),
// Clean output.path
new CleanWebpackPlugin(),
// "Public" Folder
new CopyWebpackPlugin([
{
from: PUBLIC_DIR,
to: DIST_DIR,
toType: 'dir',
// Ignore our HtmlWebpackPlugin template file
ignore: ['index.html', '.DS_Store'],
},
]),
new ExtractCssChunksPlugin({
filename: '[name].css',
chunkFilename: '[id].css',
// hot: true /* only necessary if hot reloading not function*/
}),
/**
* This generates our index.html file from the specified template.
* This is the easiest way to inject custom configuration and extensions.
*/
new HtmlWebpackPlugin({
template: `${PUBLIC_DIR}/index.html`,
filename: 'index.html',
templateParameters: {
PUBLIC_URL: PUBLIC_URL,
APP_CONFIG: APP_CONFIG,
},
// favicon: `${PUBLIC_DIR}/favicon.ico`,
}),
new workboxPlugin.GenerateSW({
swDest: 'sw.js',
clientsClaim: true,
skipWaiting: true,
}),
],
});
};
@@ -0,0 +1,35 @@
const ExtractCssChunksPlugin = require('extract-css-chunks-webpack-plugin');
function extractStyleChunks(isProdBuild) {
return [
{
test: /\.styl$/,
use: [
{
loader: ExtractCssChunksPlugin.loader,
options: {
hot: !isProdBuild,
},
},
{ loader: 'css-loader' },
{ loader: 'stylus-loader' },
],
},
{
test: /\.(sa|sc|c)ss$/,
use: [
{
loader: ExtractCssChunksPlugin.loader,
options: {
hot: !isProdBuild,
},
},
'css-loader',
'postcss-loader',
// 'sass-loader',
],
},
];
}
module.exports = extractStyleChunks;
@@ -0,0 +1,20 @@
/**
* For CommonJS, we want to bundle whatever font we've landed on. This allows
* us to reduce the number of script-tags we need to specify for simple use.
*
* PWA will grab these externally to reduce bundle size (think code split),
* and cache the grab using service-worker.
*/
const fontsToJavaScript = {
test: /\.(ttf|eot|woff|woff2)$/i,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
},
},
],
};
module.exports = fontsToJavaScript;
@@ -1,9 +1,9 @@
const path = require('path');
const merge = require('webpack-merge');
const webpack = require('webpack');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
const webpackCommon = require('./../../../.webpack/webpack.commonjs.js');
//
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const fontsToJavaScriptRule = require('./rules/fontsToJavaScript.js');
// const
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
@@ -12,8 +12,6 @@ module.exports = (env, argv) => {
const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR });
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-production
mode: 'production',
entry: {
bundle: `${SRC_DIR}/index-umd.js`,
},
@@ -39,31 +37,10 @@ module.exports = (env, argv) => {
libraryTarget: 'umd',
filename: 'index.umd.js',
},
/**
* For CommonJS, we want to bundle whatever font we've landed on. This allows
* us to reduce the number of script-tags we need to specify for simple use.
*
* PWA will grab these externally to reduce bundle size (think code split),
* and cache the grab using service-worker.
*/
module: {
rules: [
{
test: /\.(ttf|eot|woff|woff2)$/i,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
},
},
],
},
],
rules: [fontsToJavaScriptRule],
},
plugins: [
// Longer build. Let's report progress
new webpack.ProgressPlugin(),
// Clean output.path
new CleanWebpackPlugin(),
],
+128
View File
@@ -0,0 +1,128 @@
// ~~ WebPack
const path = require('path');
const merge = require('webpack-merge');
const webpack = require('webpack');
const webpackBase = require('./../../../.webpack/webpack.base.js');
// ~~ Plugins
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
.BundleAnalyzerPlugin;
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const ExtractCssChunksPlugin = require('extract-css-chunks-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const WorkboxPlugin = require('workbox-webpack-plugin');
const TerserJSPlugin = require('terser-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
// ~~ Rules
const extractStyleChunksRule = require('./rules/extractStyleChunks.js');
// ~~ Directories
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
const PUBLIC_DIR = path.join(__dirname, '../public');
// ~~ Env Vars
const HTML_TEMPLATE = process.env.HTML_TEMPLATE || 'index.html';
const PUBLIC_URL = process.env.PUBLIC_URL || '/';
const APP_CONFIG = process.env.APP_CONFIG || 'config/default.js';
module.exports = (env, argv) => {
const baseConfig = webpackBase(env, argv, { SRC_DIR, DIST_DIR });
const isProdBuild = process.env.NODE_ENV === 'production';
const mergedConfig = merge(baseConfig, {
devtool: isProdBuild ? 'source-map' : 'cheap-module-eval-source-map',
output: {
path: DIST_DIR,
filename: isProdBuild ? '[name].bundle.[chunkhash].js' : '[name].js',
publicPath: PUBLIC_URL, // Used by HtmlWebPackPlugin for asset prefix
},
stats: {
colors: true,
hash: true,
timings: true,
assets: true,
chunks: false,
chunkModules: false,
modules: false,
children: false,
warnings: true,
},
optimization: {
minimize: isProdBuild,
sideEffects: true,
},
module: {
rules: [...extractStyleChunksRule(isProdBuild)],
},
plugins: [
// Uncomment to generate bundle analyzer
// new BundleAnalyzerPlugin(),
// Clean output.path
new CleanWebpackPlugin(),
// Copy "Public" Folder to Dist
new CopyWebpackPlugin([
{
from: PUBLIC_DIR,
to: DIST_DIR,
toType: 'dir',
// Ignore our HtmlWebpackPlugin template file
// Ignore our configuration files
ignore: ['config/*', 'html-templates/*', '.DS_Store'],
},
// Copy over and rename our target app config file
{
from: `${PUBLIC_DIR}/${APP_CONFIG}`,
to: `${DIST_DIR}/app-config.js`,
},
]),
// https://github.com/faceyspacey/extract-css-chunks-webpack-plugin#webpack-4-standalone-installation
new ExtractCssChunksPlugin({
filename: '[name].css',
chunkFilename: '[id].css',
ignoreOrder: false, // Enable to remove warnings about conflicting order
}),
// Generate "index.html" w/ correct includes/imports
new HtmlWebpackPlugin({
template: `${PUBLIC_DIR}/html-templates/${HTML_TEMPLATE}`,
filename: 'index.html',
templateParameters: {
PUBLIC_URL: PUBLIC_URL,
},
// favicon: `${PUBLIC_DIR}/favicon.ico`,
}),
new WorkboxPlugin.GenerateSW({
swDest: 'sw.js',
clientsClaim: true,
skipWaiting: true,
}),
],
// https://webpack.js.org/configuration/dev-server/
devServer: {
// gzip compression of everything served
// Causes Cypress: `wait-on` issue in CI
// compress: true,
// http2: true,
// https: true,
hot: true,
open: true,
port: 3000,
historyApiFallback: {
disableDotRule: true,
},
},
});
if (!isProdBuild) {
mergedConfig.plugins.push(new webpack.HotModuleReplacementPlugin());
//
mergedConfig.optimization.minimizer = [
new TerserJSPlugin({
sourceMap: true,
parallel: true,
}),
new OptimizeCSSAssetsPlugin({}),
];
}
return mergedConfig;
};
+108
View File
@@ -3,6 +3,114 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.50.17](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.16...@ohif/viewer@0.50.17) (2019-09-04)
**Note:** Version bump only for package @ohif/viewer
## [0.50.16](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.15...@ohif/viewer@0.50.16) (2019-09-04)
**Note:** Version bump only for package @ohif/viewer
## [0.50.15](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.14...@ohif/viewer@0.50.15) (2019-09-04)
### Bug Fixes
* measurementsAPI issue caused by production build ([#842](https://github.com/OHIF/Viewers/issues/842)) ([49d3439](https://github.com/OHIF/Viewers/commit/49d3439))
## [0.50.14](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.13...@ohif/viewer@0.50.14) (2019-09-03)
**Note:** Version bump only for package @ohif/viewer
## [0.50.13](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.12...@ohif/viewer@0.50.13) (2019-09-03)
### Bug Fixes
* 🐛 Activating Pan and Zoom on right and middle click by def ([#841](https://github.com/OHIF/Viewers/issues/841)) ([7a9b477](https://github.com/OHIF/Viewers/commit/7a9b477))
## [0.50.12](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.11...@ohif/viewer@0.50.12) (2019-08-29)
### Bug Fixes
* asset resolution when at non-root route ([#828](https://github.com/OHIF/Viewers/issues/828)) ([d48b617](https://github.com/OHIF/Viewers/commit/d48b617))
## [0.50.11](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.10...@ohif/viewer@0.50.11) (2019-08-29)
**Note:** Version bump only for package @ohif/viewer
## [0.50.10](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.9...@ohif/viewer@0.50.10) (2019-08-27)
**Note:** Version bump only for package @ohif/viewer
## [0.50.9](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.8...@ohif/viewer@0.50.9) (2019-08-27)
**Note:** Version bump only for package @ohif/viewer
## [0.50.8](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.7...@ohif/viewer@0.50.8) (2019-08-26)
**Note:** Version bump only for package @ohif/viewer
## [0.50.7](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.6...@ohif/viewer@0.50.7) (2019-08-22)
### Bug Fixes
* 🐛 Update for changes in ExpandableToolMenu props ([e09670a](https://github.com/OHIF/Viewers/commit/e09670a))
## [0.50.6](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.5...@ohif/viewer@0.50.6) (2019-08-22)
**Note:** Version bump only for package @ohif/viewer
## [0.50.5](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.4...@ohif/viewer@0.50.5) (2019-08-21)
+5 -30
View File
@@ -12,7 +12,6 @@
</div>
<div align="center">
<a href="https://docs.ohif.org/demo">Demo</a> |
<a href="https://ohif.canny.io/">Roadmap</a> |
<a href="https://react.ohif.org/">Component Library</a>
</div>
@@ -95,7 +94,9 @@ guide.
### E2E Tests
Using [Cypress](https://www.cypress.io/) to create End-to-End tests and check whether the application flow is performing correctly, ensuring that the integrated components are working as expected.
Using [Cypress](https://www.cypress.io/) to create End-to-End tests and check
whether the application flow is performing correctly, ensuring that the
integrated components are working as expected.
#### Why Cypress?
@@ -146,10 +147,10 @@ When creating tests, place the test file "next to" the file you're testing.
```js
// File
index.js
index.js;
// Test for file
index.test.js
index.test.js;
```
As you add and modify code, `jest` will watch for uncommitted changes and run
@@ -157,32 +158,6 @@ your tests, reporting the results to your terminal. Make a pull request with
your changes to `master`, and a core team member will review your work. If you
have any questions, please don't hesitate to reach out via a GitHub issue.
## Roadmap
If you want to know what's planned for the very near future,
[check out our roadmap](https://ohif.canny.io/). The best way to influence when
and what is worked on is to contribute to the conversation by creating GitHub
issues, and contributing code through pull requests. OHIF's high level
priorities for the near future are:
- Feature parity with version 1
- Extension and configuration improvements with key integration partners
- Continued Developer Experience Improvements
- Segmentation Tools, and improved VTK.js support
More granular information will make it's way to the backlog as these items
become scoped for development by core maintainers.
> Don't hesitate to ask questions, propose features, or create pull requests.
> We're here, we're listening, and we're ready to build the best open source
> medical imaging viewer on the web.
#### Roadmap Generously Powered by Canny.io
<a href="https://ohif.canny.io/">
<img height="30" src="docs/latest/assets/img/canny-full.png" />
</a>
## Contributors
Thanks goes to these wonderful people
@@ -5,18 +5,18 @@ describe('ViewerRouting', () => {
cy.get('#studyListData > :nth-child(1) > .patientId').click();
});
it('thumbnails list has more than 2 items', () => {
cy.get('.scrollable-study-thumbnails div.ThumbnailEntryContainer')
.its('length')
.should('be.gte', 2);
});
// it('thumbnails list has more than 2 items', () => {
// cy.get('.scrollable-study-thumbnails div.ThumbnailEntryContainer')
// .its('length')
// .should('be.gte', 2);
// });
it('loads route with at least 2 thumbnails', () => {
cy.get(
':nth-child(1) > .ThumbnailEntry > .p-x-1 > .ImageThumbnail > .image-thumbnail-canvas > canvas'
).should('be.visible');
cy.get(
':nth-child(2) > .ThumbnailEntry > .p-x-1 > .ImageThumbnail > .image-thumbnail-canvas > canvas'
).should('be.visible');
});
// it('loads route with at least 2 thumbnails', () => {
// cy.get(
// ':nth-child(1) > .ThumbnailEntry > .p-x-1 > .ImageThumbnail > .image-thumbnail-canvas > canvas'
// ).should('be.visible');
// cy.get(
// ':nth-child(2) > .ThumbnailEntry > .p-x-1 > .ImageThumbnail > .image-thumbnail-canvas > canvas'
// ).should('be.visible');
// });
});
+19 -21
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/viewer",
"version": "0.50.5",
"version": "0.50.17",
"description": "OHIF Viewer",
"author": "OHIF Contributors",
"license": "MIT",
@@ -17,12 +17,13 @@
},
"proxy": "http://localhost:8042",
"scripts": {
"build:package": "webpack --config .webpack/commonjs.prod.js",
"build:viewer": "webpack --config .webpack/pwa.prod.js",
"build:viewer:ci": "cross-env PUBLIC_URL=/pwa APP_CONFIG=config/netlify.js webpack --config .webpack/pwa.prod.js",
"build:package": "cross-env NODE_ENV=production node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --config .webpack/webpack.commonjs.js",
"build:viewer": "cross-env NODE_ENV=production node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --config .webpack/webpack.pwa.js",
"build:viewer:ci": "cross-env NODE_ENV=production PUBLIC_URL=/pwa/ APP_CONFIG=config/netlify.js node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --config .webpack/webpack.pwa.js",
"build:viewer:demo": "cross-env NODE_ENV=production APP_CONFIG=config/demo.js HTML_TEMPLATE=rollbar.html node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --progress --config .webpack/webpack.pwa.js",
"build:viewer:package": "yarn run build:package",
"dev": "webpack-dev-server --config .webpack/all.dev.js -w",
"dev:orthanc": "cross-env APP_CONFIG=config/docker_nginx-orthanc.js react-scripts start",
"dev": "cross-env NODE_ENV=development webpack-dev-server --config .webpack/webpack.pwa.js -w",
"dev:orthanc": "cross-env NODE_ENV=development APP_CONFIG=config/docker_nginx-orthanc.js react-scripts start",
"dev:viewer": "yarn run dev",
"start": "yarn run dev",
"orthanc:up": "docker-compose -f docker/Nginx-Orthanc/docker-compose.yml up",
@@ -30,10 +31,6 @@
"test:unit": "jest --watchAll",
"test:unit:ci": "jest --ci --runInBand --collectCoverage"
},
"resolutions": {
"browserslist": "4.6.2",
"caniuse-lite": "1.0.30000974"
},
"files": [
"dist",
"README.md"
@@ -44,20 +41,20 @@
},
"dependencies": {
"@babel/runtime": "^7.5.5",
"@ohif/core": "^0.50.1",
"@ohif/extension-cornerstone": "^0.50.1",
"@ohif/extension-dicom-html": "^0.50.1",
"@ohif/extension-dicom-microscopy": "^0.50.1",
"@ohif/extension-dicom-pdf": "^0.50.1",
"@ohif/extension-vtk": "^0.50.2",
"@ohif/i18n": "^0.50.1",
"@ohif/ui": "^0.50.1",
"@ohif/core": "^0.50.5",
"@ohif/extension-cornerstone": "^0.50.4",
"@ohif/extension-dicom-html": "^0.50.3",
"@ohif/extension-dicom-microscopy": "^0.50.4",
"@ohif/extension-dicom-pdf": "^0.50.3",
"@ohif/extension-vtk": "^0.50.6",
"@ohif/i18n": "^0.50.3",
"@ohif/ui": "^0.50.3",
"@tanem/react-nprogress": "^1.1.25",
"classnames": "^2.2.6",
"core-js": "^3.1.4",
"core-js": "^3.2.1",
"cornerstone-core": "^2.2.8",
"cornerstone-math": "^0.1.8",
"cornerstone-tools": "^3.15.1",
"cornerstone-tools": "^3.19.2",
"cornerstone-wado-image-loader": "^3.0.0",
"dcmjs": "^0.4.7",
"dicom-parser": "^1.8.3",
@@ -80,7 +77,8 @@
"redux-logger": "^3.0.6",
"redux-oidc": "3.1.x",
"redux-thunk": "^2.3.0",
"reselect": "^4.0.0"
"reselect": "^4.0.0",
"vtk.js": "^11.0.1"
},
"devDependencies": {
"cypress": "^3.3.1",
+46 -3
View File
@@ -1,5 +1,6 @@
window.config = {
routerBasename: '/',
extensions: [],
showStudyList: true,
servers: {
dicomWeb: [
@@ -17,9 +18,51 @@ window.config = {
},
],
},
hotkeys: [
{
commandName: 'incrementActiveViewport',
label: 'Next Image Viewport',
keys: ['right'],
},
{
commandName: 'decrementActiveViewport',
label: 'Previous Image Viewport',
keys: ['left'],
},
{ commandName: 'rotateViewportCW', label: 'Rotate Right', keys: ['r'] },
{ commandName: 'rotateViewportCCW', label: 'Rotate Left', keys: ['l'] },
{ commandName: 'invertViewport', label: 'Invert', keys: ['i'] },
{
commandName: 'flipViewportVertical',
label: 'Flip Horizontally',
keys: ['h'],
},
{
commandName: 'flipViewportHorizontal',
label: 'Flip Vertically',
keys: ['v'],
},
{ commandName: 'scaleUpViewport', label: 'Zoom In', keys: ['+'] },
{ commandName: 'scaleDownViewport', label: 'Zoom Out', keys: ['-'] },
{ commandName: 'fitViewportToWindow', label: 'Zoom to Fit', keys: ['='] },
{ commandName: 'resetViewport', label: 'Reset', keys: ['space'] },
{ commandName: 'nextImage', label: 'Next Image', keys: ['down'] },
{ commandName: 'previousImage', label: 'Previous Image', keys: ['up'] },
{
commandName: 'nextViewportDisplaySet',
label: 'Previous Series',
keys: ['pagedown'],
},
{
commandName: 'previousViewportDisplaySet',
label: 'Next Series',
keys: ['pageup'],
},
{ commandName: 'setZoomTool', label: 'Zoom', keys: ['z'] },
],
i18n: {
LOCIZE_PROJECTID: 'a8da3f9a-e467-4dd6-af33-474d582a0294',
LOCIZE_API_KEY: null, // Developers can use this to do in-context editing. DO NOT COMMIT THIS KEY!
USE_LOCIZE: true
}
}
USE_LOCIZE: true,
},
};
@@ -8,10 +8,13 @@
/>
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="<%= PUBLIC_URL %>/manifest.json" />
<link rel="manifest" href="<%= PUBLIC_URL %>manifest.json" />
<!-- Built with: https://polyfill.io/v3/url-builder/ -->
<!-- Targets IE11 -->
<script src="https://polyfill.io/v3/polyfill.min.js?flags=gated&features=default%2CObject.values%2CArray.prototype.flat%2CObject.entries%2CSymbol%2CArray.prototype.includes%2CString.prototype.repeat%2CArray.prototype.find"></script>
<script
type="text/javascript"
src="<%= PUBLIC_URL %>/<%= APP_CONFIG %>"
src="<%= PUBLIC_URL %>app-config.js"
></script>
<title>OHIF Viewer</title>
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="<%= PUBLIC_URL %>manifest.json" />
<!-- Built with: https://polyfill.io/v3/url-builder/ -->
<!-- Targets IE11 -->
<script src="https://polyfill.io/v3/polyfill.min.js?flags=gated&features=default%2CObject.values%2CArray.prototype.flat%2CObject.entries%2CSymbol%2CArray.prototype.includes%2CString.prototype.repeat%2CArray.prototype.find"></script>
<script type="text/javascript" src="<%= PUBLIC_URL %>app-config.js"></script>
<title>OHIF Viewer</title>
<!-- WEB FONTS -->
<link
href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700|Sanchez&display=swap"
rel="stylesheet"
/>
<!-- EXTENSIONS -->
<!-- <script type="text/javascript" src="path/to/some-extension.js"></script>
<script>
window.config.extensions = [SomeExtension];
</script> -->
</head>
<body>
<noscript> You need to enable JavaScript to run this app. </noscript>
<div id="root"></div>
<script>
// Note: This is a client access token so there is no issue with having it publicly available
var _rollbarConfig = {
accessToken: "739c64cd39e84592ba062bc29aac9769",
captureUncaught: true,
captureUnhandledRejections: true,
payload: {
environment: "viewer.ohif.org"
}
};
// Rollbar Snippet
!function(r){var e={};function o(n){if(e[n])return e[n].exports;var t=e[n]={i:n,l:!1,exports:{}};return r[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=r,o.c=e,o.d=function(r,e,n){o.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},o.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,e){if(1&e&&(r=o(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var t in r)o.d(n,t,function(e){return r[e]}.bind(null,t));return n},o.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(e,"a",e),e},o.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},o.p="",o(o.s=0)}([function(r,e,o){var n=o(1),t=o(4);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdnjs.cloudflare.com/ajax/libs/rollbar.js/2.7.1/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,e,o){var n=o(2);function t(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}var a=0;function l(r,e){this.options=r,this._rollbarOldOnError=null;var o=a++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}var i=o(3),d=function(r,e){return new l(r,e)},c=function(r){return new i(d,r)};function s(r){return t(function(){var e=Array.prototype.slice.call(arguments,0),o={shim:this,method:r,args:e,ts:new Date};window._rollbarShims[this.shimId()].messages.push(o)})}l.prototype.loadFull=function(r,e,o,n,a){var l=!1,i=e.createElement("script"),d=e.getElementsByTagName("script")[0],c=d.parentNode;i.crossOrigin="",i.src=n.rollbarJsUrl,o||(i.async=!0),i.onload=i.onreadystatechange=t(function(){if(!(l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){i.onload=i.onreadystatechange=null;try{c.removeChild(i)}catch(r){}l=!0,function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,t,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(t=n.args||[],i=0;i<t.length;++i)if("function"==typeof(l=t[i])){l(e);break}}"function"==typeof a&&a(e)}()}}),c.insertBefore(i,d)},l.prototype.wrap=function(r,e,o){try{var n;if(n="function"==typeof e?e:function(){return e||{}},"function"!=typeof r)return r;if(r._isWrap)return r;if(!r._rollbar_wrapped&&(r._rollbar_wrapped=function(){o&&"function"==typeof o&&o.apply(this,arguments);try{return r.apply(this,arguments)}catch(o){var e=o;throw e&&("string"==typeof e&&(e=new String(e)),e._rollbarContext=n()||{},e._rollbarContext._wrappedSource=r.toString(),window._rollbarWrappedError=e),e}},r._rollbar_wrapped._isWrap=!0,r.hasOwnProperty))for(var t in r)r.hasOwnProperty(t)&&(r._rollbar_wrapped[t]=r[t]);return r._rollbar_wrapped}catch(e){return r}};for(var p="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleUnhandledRejection,captureEvent,captureDomContentLoaded,captureLoad".split(","),u=0;u<p.length;++u)l.prototype[p[u]]=s(p[u]);r.exports={setupShim:function(r,e){if(r){var o=e.globalAlias||"Rollbar";if("object"==typeof r[o])return r[o];r._rollbarShims={},r._rollbarWrappedError=null;var a=new c(e);return t(function(){e.captureUncaught&&(a._rollbarOldOnError=r.onerror,n.captureUncaughtExceptions(r,a,!0),n.wrapGlobals(r,a,!0)),e.captureUnhandledRejections&&n.captureUnhandledRejections(r,a,!0);var t=e.autoInstrument;return!1!==e.enabled&&(void 0===t||!0===t||"object"==typeof t&&t.network)&&r.addEventListener&&(r.addEventListener("load",a.captureLoad.bind(a)),r.addEventListener("DOMContentLoaded",a.captureDomContentLoaded.bind(a))),r[o]=a,a})()}},Rollbar:c}},function(r,e){function o(r,e,o){if(e.hasOwnProperty&&e.hasOwnProperty("addEventListener")){for(var n=e.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var t=function(e,o,t){n.call(this,e,r.wrap(o),t)};t._rollbarOldAdd=n,t.belongsToShim=o,e.addEventListener=t;for(var a=e.removeEventListener;a._rollbarOldRemove&&a.belongsToShim;)a=a._rollbarOldRemove;var l=function(r,e,o){a.call(this,r,e&&e._rollbar_wrapped||e,o)};l._rollbarOldRemove=a,l.belongsToShim=o,e.removeEventListener=l}}r.exports={captureUncaughtExceptions:function(r,e,o){if(r){var n;if("function"==typeof e._rollbarOldOnError)n=e._rollbarOldOnError;else if(r.onerror){for(n=r.onerror;n._rollbarOldOnError;)n=n._rollbarOldOnError;e._rollbarOldOnError=n}var t=function(){var o=Array.prototype.slice.call(arguments,0);!function(r,e,o,n){r._rollbarWrappedError&&(n[4]||(n[4]=r._roLine truncated
// End Rollbar Snippet
</script>
</body>
</html>
File diff suppressed because it is too large. Load diff
+4 -7
View File
@@ -2,12 +2,6 @@ import { hot } from 'react-hot-loader/root';
import './config';
// Polyfills
// PWA Only?
import 'core-js/features/array/flat';
import 'core-js/stable';
import 'regenerator-runtime/runtime';
import {
CommandsManager,
ExtensionManager,
@@ -197,5 +191,8 @@ function _makeAbsoluteIfNecessary(url, base_url) {
return base_url + url;
}
export default hot(App);
// Only wrap/use hot if in dev
const ExportedApp = process.env.NODE_ENV === 'development' ? hot(App) : App;
export default ExportedApp;
export { commandsManager, extensionManager, hotkeysManager };
@@ -13,7 +13,7 @@ class PluginSwitch extends Component {
render() {
return (
<div className="PluginSwitch">
<ExpandableToolMenu buttons={this.props.buttons} text={'View'} />
<ExpandableToolMenu buttons={this.props.buttons} label={'View'} />
</div>
);
}
@@ -173,7 +173,7 @@ function _getButtonComponents(toolbarButtons, activeButtons) {
return (
<ExpandableToolMenu
key={button.id}
text={button.label}
label={button.label}
icon={button.icon}
buttons={childButtons}
activeCommand={activeCommand}
+3 -2
View File
@@ -2,6 +2,9 @@
* Entry point for development and production PWA builds.
* Packaged (NPM) builds go through `index-umd.js`
*/
import 'regenerator-runtime/runtime';
import App from './App.js';
import React from 'react';
import ReactDOM from 'react-dom';
@@ -31,8 +34,6 @@ const appDefaults = {
relativeWebWorkerScriptsPath: '',
};
console.log(OHIFVTKExtension);
if (window) {
config = window.config || {};
config.extensions = [
+2 -2
View File
@@ -142,8 +142,8 @@ function getResetLabellingAndContextMenu(store) {
export default function setupTools(store) {
const toolLabellingFlowCallback = getToolLabellingFlowCallback(store);
const availableTools = [
{ name: 'Pan', mouseButtonMasks: [4] },
{ name: 'Zoom', mouseButtonMasks: [2] },
{ name: 'Pan', mouseButtonMasks: [1, 4] },
{ name: 'Zoom', mouseButtonMasks: [1, 2] },
{ name: 'Wwwc', mouseButtonMasks: [1] },
{ name: 'Magnify' },
{ name: 'WwwcRegion' },
Loaded 100 of 103 files, more files were not shown because too many files have changed in this diff. Show more