@rcsb/rcsb-saguaro-app 3.2.1-interfaces.2 → 3.4.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/CHANGELOG.md CHANGED
@@ -2,15 +2,18 @@
2
2
 
3
3
  [Semantic Versioning](https://semver.org/)
4
4
 
5
- ## [3.3.0] - 2021-11-29
5
+ ## [3.4.0] - 2021-12-07
6
+ ### UI improvements
7
+ - Exposed methods for creating dropdown menus. Class `RcsbFvUI` static methods
8
+ - `createSelectButton` creates a select dropdown menu
9
+ - `addSelectButton` adds a second menu. Only an additional button can be created (replaced if a new one is created)
10
+ - `clearSelectButton` clear all menus
11
+
12
+ ## [3.3.0] - 2021-11-30
6
13
  ### Annotations configuration improvements
7
14
  - Removed interface `CollectAnnotationsInterface` attribute `addTargetInTitle`
8
15
  - Added `titleSuffix` and `trackTitle` attributes to `CollectAnnotationsInterface`
9
16
  - These new attributes are defined as async functions (ann: AnnotationFeatures, d: Feature) => Promise<string|undefined> to provide or modify track titles based on the features content
10
- - New `RcsbFvInterface` module
11
- - Interface `InstanceSequenceConfig` provides a new attribute `module` to choose between the `RcsbFvInstance` or RcsbFvInterface` modules
12
- - New classes to collect and translate instance/interface ids relationships from data api
13
- - `RcsbQueryInterfaceInstances`, `InterfaceInstanceCollector` and `InterfaceInstanceTranslate`
14
17
 
15
18
  ## [3.2.1] - 2021-11-10
16
19
  ### Minor configuration
@@ -22,8 +25,8 @@
22
25
 
23
26
  ## [3.1.0] - 2021-10-27
24
27
  ### External track builder improvements
25
- - `ExternalTrackBuilderInterface` available through `RcsbFvAdditionalConfig` for all `RcsbFvBuilder` types.
26
- In addition, it includes the query context as additional parameter for processing and addition methods.
28
+ - `ExternalTrackBuilderInterface` available through `RcsbFvAdditionalConfig` for all `RcsbFvBuilder` types
29
+ In addition, it includes the query context as additional parameter for processing and addition methods
27
30
  - `processAlignmentAndFeatures` includes the query context as part of the input parameters
28
31
  - `addTo` includes the query context as part of the input parameters
29
32
  - `filterFeatures` new method for filtering positional features
package/README.md CHANGED
@@ -8,7 +8,7 @@ Feature Summaries. The package allows access to RCSB Saguaro methods to add or c
8
8
  <!---
9
9
  <div id="pfvSelect" ></div>
10
10
  <div id="pfv" ></div>
11
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@rcsb/rcsb-saguaro-app@3.2.1/build/dist/app.js"></script>
11
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@rcsb/rcsb-saguaro-app@3.4.0/build/dist/app.js"></script>
12
12
  <script type="text/javascript">
13
13
  RcsbFvWebApp.buildInstanceFv("pfv", "4Z35.A", {
14
14
  boardConfig:{
@@ -23,7 +23,7 @@ RcsbFvWebApp.buildInstanceFv("pfv", "4Z35.A", {
23
23
  `npm install @rcsb/rcsb-saguaro-app`
24
24
 
25
25
  ### CDN JavaScript
26
- `<script src="https://cdn.jsdelivr.net/npm/@rcsb/rcsb-saguaro-app@3.2.1/build/dist/app.js" type="text/javascript"></script>`
26
+ `<script src="https://cdn.jsdelivr.net/npm/@rcsb/rcsb-saguaro-app@3.4.0/build/dist/app.js" type="text/javascript"></script>`
27
27
 
28
28
  ### JavaScript Examples
29
29
  * [PDB Instance Chain View](https://rcsb.github.io/rcsb-saguaro-app/examples/instance.html)
@@ -15,4 +15,5 @@ export declare class AnnotationTrackManager {
15
15
  private mergeTracks;
16
16
  private buildType;
17
17
  private addAnnotationToTracks;
18
+ private addFeature;
18
19
  }
@@ -2,13 +2,11 @@ import { RcsbFv, RcsbFvBoardConfigInterface } from "@rcsb/rcsb-saguaro";
2
2
  import { PolymerEntityInstanceTranslate } from "../../RcsbUtils/PolymerEntityInstanceTranslate";
3
3
  import { EntryAssemblyTranslate } from "../../RcsbUtils/EntryAssemblyTranslate";
4
4
  import { PolymerEntityChromosomeTranslate } from "../../RcsbUtils/PolymerEntityChromosomeTranslate";
5
- import { InterfaceInstanceTranslate } from "../../RcsbUtils/InterfaceInstanceTranslate";
6
5
  declare class RcsbFvContextManager {
7
6
  private rcsbFvManager;
8
7
  private rcsbButtonManager;
9
8
  private polymerEntityToInstanceMap;
10
9
  private entryToAssemblyMap;
11
- private interfaceToInstanceMap;
12
10
  getFv(elementFvId: string, boardConfig?: Partial<RcsbFvBoardConfigInterface>): RcsbFv;
13
11
  hasFv(elementFvId: string): boolean;
14
12
  private setFv;
@@ -20,7 +18,6 @@ declare class RcsbFvContextManager {
20
18
  getEntityToInstance(entryId: string): Promise<PolymerEntityInstanceTranslate>;
21
19
  getEntryToAssembly(entryId: string): Promise<EntryAssemblyTranslate>;
22
20
  getEntityToChromosome(entityIds: Array<string>): Promise<PolymerEntityChromosomeTranslate>;
23
- getInterfaceToInstance(interfaceId: string): Promise<InterfaceInstanceTranslate>;
24
21
  }
25
22
  export declare const rcsbFvCtxManager: RcsbFvContextManager;
26
23
  export {};
@@ -9,7 +9,6 @@ export interface InstanceSequenceOnchangeInterface {
9
9
  authId: string;
10
10
  asymId: string;
11
11
  }
12
- declare type instanceModule = "interface" | "instance";
13
12
  export interface InstanceSequenceConfig {
14
13
  dropdownTitle?: string;
15
14
  defaultValue?: string | undefined | null;
@@ -17,12 +16,10 @@ export interface InstanceSequenceConfig {
17
16
  filterInstances?: Set<string>;
18
17
  displayAuthId?: boolean;
19
18
  selectButtonOptionProps?: (props: OptionProps<OptionPropsInterface>) => JSX.Element;
20
- module?: instanceModule;
21
19
  }
22
20
  export declare class RcsbFvInstanceBuilder {
23
21
  static buildMultipleInstanceSequenceFv(elementFvId: string, elementEntrySelectId: string, elementInstanceSelectId: string, entryIdList: Array<string>, config: InstanceSequenceConfig, additionalConfig?: RcsbFvAdditionalConfig): Promise<RcsbFvModulePublicInterface>;
24
22
  static buildInstanceSequenceFv(elementFvId: string, elementSelectId: string, entryId: string, config: InstanceSequenceConfig, additionalConfig?: RcsbFvAdditionalConfig): Promise<RcsbFvModulePublicInterface>;
25
23
  static buildSelectorInstanceFv(instanceList: Array<PolymerEntityInstanceInterface>, elementFvId: string, elementSelectId: string, entryId: string, config: InstanceSequenceConfig, additionalConfig?: RcsbFvAdditionalConfig): Promise<RcsbFvModulePublicInterface>;
26
- static buildInstanceFv(elementId: string, instanceId: string, additionalConfig?: RcsbFvAdditionalConfig, rcsbContext?: PolymerEntityInstanceInterface, module?: instanceModule): Promise<RcsbFvModulePublicInterface>;
24
+ static buildInstanceFv(elementId: string, instanceId: string, additionalConfig?: RcsbFvAdditionalConfig, rcsbContext?: PolymerEntityInstanceInterface): Promise<RcsbFvModulePublicInterface>;
27
25
  }
28
- export {};
@@ -13,6 +13,7 @@ export interface SelectOptionInterface {
13
13
  onChange: () => void;
14
14
  }
15
15
  interface SelectButtonInterface {
16
+ elementId: string;
16
17
  options?: Array<SelectOptionInterface> | Array<GroupedOptionsInterface>;
17
18
  additionalOptions?: Array<SelectOptionInterface>;
18
19
  addTitle: boolean;
@@ -20,6 +21,7 @@ interface SelectButtonInterface {
20
21
  width?: number;
21
22
  dropdownTitle?: string;
22
23
  optionProps?: (props: OptionProps<OptionPropsInterface>) => JSX.Element;
24
+ isAdditionalButton?: boolean;
23
25
  }
24
26
  export interface OptionPropsInterface extends SelectOptionInterface {
25
27
  value: number;
@@ -28,6 +30,7 @@ interface SelectButtonState {
28
30
  selectedOption: OptionPropsInterface;
29
31
  }
30
32
  export declare class SelectButton extends React.Component<SelectButtonInterface, SelectButtonState> {
33
+ static readonly BUTTON_CONTAINER_DIV_SUFFIX = "_buttonContainerDiv";
31
34
  private defaultValue;
32
35
  readonly state: SelectButtonState;
33
36
  constructor(props: SelectButtonInterface);
@@ -38,6 +41,7 @@ export declare class SelectButton extends React.Component<SelectButtonInterface,
38
41
  private selectRender;
39
42
  private titleRender;
40
43
  private selectButtonRender;
44
+ private innerSelectButtonRender;
41
45
  private configStyle;
42
46
  private getSelectOpt;
43
47
  }
@@ -7,6 +7,7 @@ export interface SelectButtonConfigInterface {
7
7
  width?: number;
8
8
  dropdownTitle?: string;
9
9
  optionProps?: (props: OptionProps<OptionPropsInterface>) => JSX.Element;
10
+ isAdditionalButton?: boolean;
10
11
  }
11
12
  export declare class WebToolsManager {
12
13
  private static suffix;
@@ -1,16 +1,14 @@
1
1
  import { AlignmentResponse, AnnotationFeatures, QueryAlignmentArgs, QueryAnnotationsArgs } from "@rcsb/rcsb-api-tools/build/RcsbGraphQL/Types/Borrego/GqlTypes";
2
- import { CoreEntry, CoreInterface, CorePolymerEntity, QueryEntriesArgs, QueryEntryArgs, QueryInterfacesArgs, QueryPolymer_EntitiesArgs } from "@rcsb/rcsb-api-tools/build/RcsbGraphQL/Types/Yosemite/GqlTypes";
2
+ import { CoreEntry, CorePolymerEntity, QueryEntriesArgs, QueryEntryArgs, QueryPolymer_EntitiesArgs } from "@rcsb/rcsb-api-tools/build/RcsbGraphQL/Types/Yosemite/GqlTypes";
3
3
  export declare class RcsbClient {
4
4
  private rcsbQueryAnnotations;
5
5
  private rcsbQueryAlignment;
6
6
  private rcsbQueryEntityInstances;
7
7
  private rcsbQueryMutipleEntityInstances;
8
8
  private rcsbQueryEntryProperties;
9
- private rcsbQueryInterfaceInstances;
10
9
  requestRcsbPdbAnnotations(requestConfig: QueryAnnotationsArgs): Promise<Array<AnnotationFeatures>>;
11
10
  requestAlignment(requestConfig: QueryAlignmentArgs): Promise<AlignmentResponse>;
12
11
  requestEntityInstances(requestConfig: QueryEntryArgs): Promise<CoreEntry>;
13
12
  requestMultipleEntityInstances(requestConfig: QueryPolymer_EntitiesArgs): Promise<Array<CorePolymerEntity>>;
14
13
  requestMultipleEntriesProperties(requestConfig: QueryEntriesArgs): Promise<Array<CoreEntry>>;
15
- requestInterfaceInstances(requestConfig: QueryInterfacesArgs): Promise<Array<CoreInterface>>;
16
14
  }
@@ -1 +1,8 @@
1
+ import { GroupedOptionsInterface, SelectOptionInterface } from "./RcsbFvWeb/WebTools/SelectButton";
1
2
  export { buildEntryChromosome, buildFullChromosome, buildEntityChromosome, buildChromosome, buildEntityFv, buildEntitySummaryFv, buildSingleEntitySummaryFv, buildInstanceFv, buildInstanceSequenceFv, buildMultipleInstanceSequenceFv, buildAssemblySequenceFv, buildPairwiseAlignment, buildPfv, buildMultipleAlignmentSequenceFv, buildUniprotEntityFv, buildUniprotEntityInstanceFv, buildUniprotFv, unmount } from "./RcsbFvWeb/RcsbFvBuilder";
3
+ import { SelectButtonConfigInterface } from "./RcsbFvWeb/WebTools/WebToolsManager";
4
+ export declare class RcsbFvUI {
5
+ static clearSelectButton(elementFvId: string, selectButtonId: string): void;
6
+ static createSelectButton(elementFvId: string, selectButtonId: string, options: Array<SelectOptionInterface> | Array<GroupedOptionsInterface>, config?: SelectButtonConfigInterface): void;
7
+ static addSelectButton(elementFvId: string, selectButtonId: string, options: Array<SelectOptionInterface>, config?: SelectButtonConfigInterface): void;
8
+ }