@rcsb/rcsb-saguaro-app 4.4.16 → 4.5.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 CHANGED
@@ -38,7 +38,7 @@ RcsbFvWebApp.buildInstanceFv("pfv", "4Z35.A", {
38
38
  The full collection of examples can be edit and modified at [CODEPEN](https://codepen.io/collection/XjrBRP?grid_type=list)
39
39
 
40
40
  ### Library Documentation
41
- TypeScript classes documentation can be found [here](https://rcsb.github.io/rcsb-saguaro-app/globals.html).
41
+ TypeScript classes documentation can be found [here](https://rcsb.github.io/rcsb-saguaro-app/modules.html).
42
42
 
43
43
  ### Main Class and Methods
44
44
  **RcsbFvWebApp** calss provides a collection of methods to display preconfigured features over PDB and UniProt sequences
@@ -51,7 +51,7 @@ click events.
51
51
  - **RcsbFvWebApp.buildUniprotEntityFv**(elementId: string, upAcc: string, entityId: string)
52
52
  - **RcsbFvWebApp.buildUniprotEntityInstanceFv**(elementId: string, upAcc: string, entityId: string, instanceId: string)
53
53
 
54
- - **RcsbFvWebApp.setBoardConfig**(boardConfigData: [RcsbFvBoardConfigInterface](https://rcsb.github.io/rcsb-saguaro/interfaces/rcsbfvboardconfiginterface.html))
54
+ - **RcsbFvWebApp.setBoardConfig**(boardConfigData: [RcsbFvBoardConfigInterface](https://rcsb.github.io/rcsb-saguaro/interfaces/RcsbFvBoardConfigInterface.html))
55
55
  - **RcsbFvWebApp.getRcsbFv**(elementId: string)
56
56
 
57
57
  ### GraphQL configuration
@@ -78,6 +78,18 @@ click events.
78
78
  - A new method in the `RcsbRequestContextManager` defined in `src/RcsbFvWeb/RcsbFvBuilder`
79
79
  - This method must avoid duplicate requests
80
80
 
81
+ ### Testing
82
+ Different testing example are available in the `src/RcsbFvExamples` folder
83
+ - `npm install`
84
+ - `npm run devServer`
85
+
86
+ Go to:
87
+
88
+ - `http://localhost:9000/EntitySummaryFv.html`
89
+ - `http://localhost:9000/InstanceSequenceFv.html`
90
+ - `http://localhost:9000/UniprotGroupFv.html`
91
+ ...
92
+
81
93
  Contributing
82
94
  ---
83
95
  All contributions are welcome. Please, make a pull request or open an issue.
@@ -1,4 +1,7 @@
1
1
  import React from "react";
2
+ export declare type MenuItemComponentType<P extends {
3
+ stateChange(state: S, prevState: S): void;
4
+ }, S extends {}, SS extends S = S> = typeof AbstractMenuItemComponent<P, S, SS>;
2
5
  export declare abstract class AbstractMenuItemComponent<P extends {
3
6
  stateChange(state: S, prevState: S): void;
4
7
  }, S extends {}, SS extends S = S> extends React.Component<P, S & SS> {
@@ -1,10 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { AbstractMenuItemComponent } from "../AbstractMenuItemComponent";
3
- interface PaginationItemState {
3
+ export interface PaginationItemState {
4
4
  after: number;
5
5
  first: number;
6
6
  }
7
- interface PaginationItemProps {
7
+ export interface PaginationItemProps {
8
8
  count: number;
9
9
  after: string;
10
10
  first: number;
@@ -21,4 +21,3 @@ export declare class PaginationItemComponent extends AbstractMenuItemComponent<P
21
21
  private textColor;
22
22
  private switchAction;
23
23
  }
24
- export {};
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ export declare type UiComponentType<T extends {}> = {
3
+ component: typeof React.Component<T, any>;
4
+ props: T;
5
+ };
6
+ export declare class GroupPfvUI {
7
+ static fvUI(element: string | HTMLElement, uiComponent: UiComponentType<any>[]): void;
8
+ static addBootstrapElement(elementId: string): HTMLElement;
9
+ private static htmlElementUI;
10
+ }
@@ -6,6 +6,7 @@ import { ExternalTrackBuilderInterface } from "../../RcsbCollectTools/FeatureToo
6
6
  import { PairwiseAlignmentInterface } from "../../RcsbUtils/PairwiseAlignmentTools/PairwiseAlignmentBuilder";
7
7
  import { AlignmentRequestContextType } from "../RcsbFvFactories/RcsbFvTrackFactory/TrackFactoryImpl/AlignmentTrackFactory";
8
8
  import { TrackManagerInterface } from "../RcsbFvFactories/RcsbFvBlockFactory/BlockManager/TrackManagerInterface";
9
+ import { UiComponentType } from "../../RcsbFvUI/GroupPfvUI";
9
10
  export declare type RcsbContextType = Partial<{
10
11
  entryId: string;
11
12
  entityId: string;
@@ -36,6 +37,7 @@ export interface RcsbFvAdditionalConfig {
36
37
  alignment?: (alignmentContext: AlignmentRequestContextType, targetAlignment: TargetAlignment) => Promise<Partial<RcsbFvRowConfigInterface>>;
37
38
  annotations?: (trackManager: TrackManagerInterface) => Promise<Partial<RcsbFvRowConfigInterface>>;
38
39
  };
40
+ externalUiComponents?: UiComponentType<any>[];
39
41
  }
40
42
  export interface RcsbFvModuleBuildInterface {
41
43
  group?: GroupReference;
@@ -0,0 +1,9 @@
1
+ export declare class DataContainer<T> {
2
+ private data;
3
+ constructor(data?: T);
4
+ get(): T | undefined;
5
+ set(data: T | undefined): void;
6
+ }
7
+ export interface DataContainerReader<T> {
8
+ get(): T | undefined;
9
+ }