@gen-epix/ui 1.0.4 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +30385 -30327
- package/package.json +21 -13
package/README.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
<p align="center">
|
2
|
+
<img src="https://raw.githubusercontent.com/RIVM-bioinformatics/gen-epix-ui-demo-client/refs/heads/main/src/assets/logo/gen-epix-logo-large.svg" alt="gen-epix-api-logo">
|
3
|
+
</p>
|
4
|
+
<p align="center">
|
5
|
+
<em>Genomic Epidemiology platform for disease X</em>
|
6
|
+
</p>
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
# Gen-EpiX: Genomic Epidemiology platform for disease X - Frontend UI Library<br>[beta]
|
11
|
+
|
12
|
+
Gen-EpiX is platform for visualizing and analyzing genomic epidemiology data. It can be used for any disease and has very fine-grained access controls to enable collaboration between multiple organizations. It does not include, by design, bioinformatics pipelines or any other data analysis pipelines.
|
13
|
+
|
14
|
+
The platform is currently at the beta release stage and as such not yet usable for production. We are currently to get the platform released, for use in the Netherlands as the official national platform for laboratory-based surveillance of infectious diseases. Feel free to contact us <a href="mailto:ivo.van.walle@rivm.nl">here</a> if you are interested.
|
15
|
+
|
16
|
+
## About @gen-epix/ui
|
17
|
+
|
18
|
+
The project exports a library of frontend components and an (almost) ready to use application. You will need to create your own project and include `@gen-epix/ui` as a dependency. Please refer to the <a href="https://github.com/RIVM-bioinformatics/gen-epix-ui-demo-client">demo client project</a> to see a working example of this library.
|
19
|
+
|
20
|
+
Basic example:
|
21
|
+
|
22
|
+
```tsx
|
23
|
+
import { createRoot } from 'react-dom/client';
|
24
|
+
|
25
|
+
import {
|
26
|
+
App,
|
27
|
+
ConfigManager,
|
28
|
+
setup,
|
29
|
+
} from '@gen-epix/ui';
|
30
|
+
|
31
|
+
// call setup before anything else
|
32
|
+
setup();
|
33
|
+
|
34
|
+
ConfigManager.instance.config = {
|
35
|
+
// add your config
|
36
|
+
}
|
37
|
+
createRoot(document.getElementById('root')).render(<App />);
|
38
|
+
```
|
package/dist/index.d.ts
CHANGED
@@ -5698,6 +5698,7 @@ export declare type EpiCaseAbacContextValue = {
|
|
5698
5698
|
itemDataCollections?: Array<DataCollection[]>;
|
5699
5699
|
itemSharedInDataCollections?: Array<DataCollection[]>;
|
5700
5700
|
itemDataCollectionOptions?: Array<OptionBase<string>[]>;
|
5701
|
+
createdInDataCollection?: DataCollection;
|
5701
5702
|
rights: Array<CaseSetRights | CaseRights>;
|
5702
5703
|
};
|
5703
5704
|
|
@@ -12770,7 +12771,7 @@ export declare const useDiseases: () => UseQueryResult<Disease[]>;
|
|
12770
12771
|
|
12771
12772
|
export declare const useDiseasesMap: () => UseMap<Disease>;
|
12772
12773
|
|
12773
|
-
export declare const useEditMutation: <TData extends GenericData | GenericData[], TVariables = TData>({ queryFn, resourceQueryKey, associationQueryKeys, getErrorNotificationMessage, getSuccessNotificationMessage, getProgressNotificationMessage, onSuccess, onError, }: UseEditMutationProps<TData, TVariables>) => {
|
12774
|
+
export declare const useEditMutation: <TData extends GenericData | GenericData[], TVariables = TData>({ queryFn, resourceQueryKey, associationQueryKeys, getErrorNotificationMessage, getSuccessNotificationMessage, getProgressNotificationMessage, onSuccess, onError, getIntermediateItem, }: UseEditMutationProps<TData, TVariables>) => {
|
12774
12775
|
mutate: UseMutateFunction<TData, Error, TVariables, MutationContextEdit<TData>>;
|
12775
12776
|
isMutating: boolean;
|
12776
12777
|
setPreviousItem: Dispatch<SetStateAction<TData>>;
|
@@ -12785,6 +12786,7 @@ export declare type UseEditMutationProps<TData, TVariables = TData> = {
|
|
12785
12786
|
readonly getSuccessNotificationMessage: (data: TData, context: MutationContextEdit<TData>) => string | ReactElement;
|
12786
12787
|
readonly onSuccess?: (item: TData, variables: TVariables, context: MutationContextEdit<TData>) => Promise<void>;
|
12787
12788
|
readonly onError?: (error: unknown, variables: TVariables, context: MutationContextEdit<TData>) => Promise<void>;
|
12789
|
+
readonly getIntermediateItem?: (variables: TVariables, previousItem: TData) => TData;
|
12788
12790
|
};
|
12789
12791
|
|
12790
12792
|
export declare const useEpiCaseAbacContext: () => EpiCaseAbacContextValue;
|