Move ohif:metadata into ohif:core

This commit is contained in:
Erik Ziegler 2018-09-17 11:17:22 +02:00
parent 700fff763c
commit da36c33c70
8 changed files with 22 additions and 72 deletions

View File

@ -0,0 +1,11 @@
import { OHIFStudyMetadata } from './OHIFStudyMetadata';
import { OHIFSeriesMetadata } from './OHIFSeriesMetadata';
import { OHIFInstanceMetadata } from './OHIFInstanceMetadata';
const metadata = {
OHIFStudyMetadata,
OHIFSeriesMetadata,
OHIFInstanceMetadata
}
export default metadata;

View File

@ -0,0 +1,11 @@
import { OHIF } from 'meteor/ohif:core';
import { metadata } from '/client/classes/metadata/';
/**
* Append Metadata namespace to OHIF namespace...
*/
OHIF.metadata = metadata;
export { metadata };

View File

@ -1,10 +0,0 @@
import { Metadata } from '../namespace';
// OHIFStudyMetadata, OHIFSeriesMetadata, OHIFInstanceMetadata
import { OHIFStudyMetadata } from './OHIFStudyMetadata';
import { OHIFSeriesMetadata } from './OHIFSeriesMetadata';
import { OHIFInstanceMetadata } from './OHIFInstanceMetadata';
Metadata.StudyMetadata = OHIFStudyMetadata;
Metadata.SeriesMetadata = OHIFSeriesMetadata;
Metadata.InstanceMetadata = OHIFInstanceMetadata;

View File

@ -1,39 +0,0 @@
/**
* Import namespace...
*/
import { OHIF, Metadata } from './namespace.js';
/**
* Import scripts that will populate the Metadata namespace as a side effect only import. This is effectively the public API...
*/
import './client/'; // which is actually: import './client/index.js';
/**
* Export relevant objects...
*
* With the following export it becomes possible to import "OHIF" from "ohif:core" and "Metadata"
* from "ohif:metadata" using a single import (a shorthand), like this:
*
* import { OHIF } from 'meteor/ohif:metadata';
*
* Which is equivalent to:
*
* import { OHIF } from 'meteor/ohif:core';
* import 'meteor/ohif:metadata';
*
* The second (extended) format should be used when other OHIF packages are also to be used within
* the current module. This makes it explicit that the following imports will populate their
* respective namespaces within the to "OHIF" namespace. Example:
*
* import { OHIF } from 'meteor/ohif:core';
* import 'meteor/ohif:metadata';
* import 'meteor/ohif:hanging-protocols';
* [ ... ]
* OHIF.metadata.setActiveViewport(...);
* OHIF.hangingprotocols.doSomething(...);
*
*/
export { OHIF, Metadata };

View File

@ -1,23 +0,0 @@
/**
* Import main dependency...
*/
import { OHIF } from 'meteor/ohif:core';
/**
* Create Metadata namespace...
*/
const Metadata = {};
/**
* Append Metadata namespace to OHIF namespace...
*/
OHIF.metadata = Metadata;
/**
* Export relevant objects...
*/
export { OHIF, Metadata };