protvista-uniprot 2.9.0 → 2.9.2

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.
@@ -0,0 +1,29 @@
1
+ import { LitElement } from 'lit-element';
2
+ import { DownloadConfig } from './protvista-uniprot';
3
+ declare class DownloadPanel extends LitElement {
4
+ open: boolean;
5
+ format: string;
6
+ config?: DownloadConfig;
7
+ accession?: string;
8
+ constructor();
9
+ static get properties(): {
10
+ accession: {
11
+ type: StringConstructor;
12
+ };
13
+ config: {
14
+ type: ArrayConstructor;
15
+ };
16
+ open: {
17
+ type: BooleanConstructor;
18
+ };
19
+ format: {
20
+ type: StringConstructor;
21
+ };
22
+ };
23
+ static get styles(): import("lit-element").CSSResult;
24
+ handleDownload(): void;
25
+ handleSetFormat(format: string): void;
26
+ downloadSVG(): import("lit-element").SVGTemplateResult;
27
+ render(): import("lit-element").TemplateResult;
28
+ }
29
+ export default DownloadPanel;
@@ -0,0 +1,137 @@
1
+ import { LitElement, html, css, svg } from 'lit-element';
2
+ import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
3
+ import urlJoin from 'url-join';
4
+ import { saveAs } from 'file-saver';
5
+ import downloadIcon from './icons/download.svg';
6
+ const downloadFiles = (downloadConfig, format = 'json', accession) => {
7
+ downloadConfig.forEach((config) => {
8
+ saveAs(urlJoin(config.url, `${accession}.${format}`, `${accession}_${config.type}.${format}`), `${accession}_${config.type}.${format}`);
9
+ });
10
+ };
11
+ class DownloadPanel extends LitElement {
12
+ constructor() {
13
+ super();
14
+ this.open = false;
15
+ this.format = 'json';
16
+ }
17
+ static get properties() {
18
+ return {
19
+ accession: { type: String },
20
+ config: { type: Array },
21
+ open: { type: Boolean },
22
+ format: { type: String },
23
+ };
24
+ }
25
+ static get styles() {
26
+ return css `
27
+ :host {
28
+ position: relative;
29
+ }
30
+
31
+ :host button {
32
+ display: inline-block;
33
+ background-color: #FFF;
34
+ border: none;
35
+ padding: 0.2rem;
36
+ margin: 0;
37
+ text-decoration: none;
38
+ font-size: 1rem;
39
+ cursor: pointer;
40
+ text-align: center;
41
+ color: #00709b;
42
+ transition: opacity 250ms ease-in-out, transform 150ms ease;
43
+ opacity: 0.8
44
+ -webkit-appearance: none;
45
+ -moz-appearance: none;
46
+ }
47
+
48
+ :host button:hover {
49
+ opacity:1;
50
+ }
51
+
52
+ :host button svg {
53
+ width: 1.5rem;
54
+ height: 1.5rem;
55
+ transition: opacity 250ms ease-in-out, transform 150ms ease;
56
+ opacity: 0.8;
57
+ }
58
+ :host button svg:hover {
59
+ opacity: 1;
60
+ }
61
+
62
+ .download-menu {
63
+ display: none;
64
+ position: absolute;
65
+ background-color: #fff;
66
+ padding: 1rem;
67
+ box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
68
+ transition: all 0.3s cubic-bezier(.25,.8,.25,1);
69
+ }
70
+ :host(:hover) .download-menu {
71
+ display: block;
72
+ }
73
+ .download-menu ul {
74
+ margin: 0;
75
+ padding: 0;
76
+ }
77
+ .download-menu li {
78
+ list-style: none;
79
+ margin: 0.5rem 0;
80
+ }
81
+ `;
82
+ }
83
+ handleDownload() {
84
+ if (this.config && this.accession) {
85
+ downloadFiles(this.config, this.format, this.accession);
86
+ }
87
+ }
88
+ handleSetFormat(format) {
89
+ this.format = format;
90
+ }
91
+ downloadSVG() {
92
+ return svg `${unsafeHTML(downloadIcon)}`;
93
+ }
94
+ render() {
95
+ return html `
96
+ <button title="Download">${this.downloadSVG()}</button>
97
+ <div class="${`download-menu ${this.open && `download-menu-open`}`}">
98
+ <ul>
99
+ <li>
100
+ <label
101
+ ><input
102
+ type="radio"
103
+ name="download-type"
104
+ value="json"
105
+ checked
106
+ @click="${() => this.handleSetFormat('json')}"
107
+ />JSON</label
108
+ >
109
+ </li>
110
+ <li>
111
+ <label
112
+ ><input
113
+ type="radio"
114
+ name="download-type"
115
+ value="xml"
116
+ @click="${() => this.handleSetFormat('xml')}"
117
+ />XML</label
118
+ >
119
+ </li>
120
+ <li>
121
+ <label
122
+ ><input
123
+ type="radio"
124
+ name="download-type"
125
+ value="gff"
126
+ @click="${() => this.handleSetFormat('gff')}"
127
+ />GFF</label
128
+ >
129
+ </li>
130
+ </ul>
131
+ <button @click="${this.handleDownload}">Download</button>
132
+ </div>
133
+ `;
134
+ }
135
+ }
136
+ export default DownloadPanel;
137
+ //# sourceMappingURL=download-panel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"download-panel.js","sourceRoot":"","sources":["../../src/download-panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,OAAO,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAIhD,MAAM,aAAa,GAAG,CACpB,cAA8B,EAC9B,MAAM,GAAG,MAAM,EACf,SAAiB,EACjB,EAAE;IACF,cAAc,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QAChC,MAAM,CACJ,OAAO,CACL,MAAM,CAAC,GAAG,EACV,GAAG,SAAS,IAAI,MAAM,EAAE,EACxB,GAAG,SAAS,IAAI,MAAM,CAAC,IAAI,IAAI,MAAM,EAAE,CACxC,EACD,GAAG,SAAS,IAAI,MAAM,CAAC,IAAI,IAAI,MAAM,EAAE,CACxC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,aAAc,SAAQ,UAAU;IAMpC;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;QAClB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YAC3B,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;YACvB,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;YACvB,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SACzB,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,MAAM;QACf,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuDT,CAAC;IACJ,CAAC;IAED,cAAc;QACZ,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,EAAE;YACjC,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;SACzD;IACH,CAAC;IAED,eAAe,CAAC,MAAc;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,WAAW;QACT,OAAO,GAAG,CAAA,GAAG,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;IAC1C,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;iCACkB,IAAI,CAAC,WAAW,EAAE;oBAC/B,iBAAiB,IAAI,CAAC,IAAI,IAAI,oBAAoB,EAAE;;;;;;;;;0BAS9C,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC;;;;;;;;;;0BAUlC,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC;;;;;;;;;;0BAUjC,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC;;;;;0BAKjC,IAAI,CAAC,cAAc;;KAExC,CAAC;IACJ,CAAC;CACF;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,19 @@
1
+ export declare const getFilteredVariants: (variants: ProtvistaVariationData, callbackFilter: (variantPos: ProtvistaVariant) => void) => {
2
+ variants: ProtvistaVariant[];
3
+ }[];
4
+ declare const filterConfig: {
5
+ name: string;
6
+ type: {
7
+ name: string;
8
+ text: string;
9
+ };
10
+ options: {
11
+ labels: string[];
12
+ colors: string[];
13
+ };
14
+ filterData: (variants: ProtvistaVariationData) => {
15
+ variants: ProtvistaVariant[];
16
+ }[];
17
+ }[];
18
+ export declare const colorConfig: (variant: ProtvistaVariant) => string;
19
+ export default filterConfig;
@@ -0,0 +1,141 @@
1
+ const scaleColors = {
2
+ UPDiseaseColor: '#990000',
3
+ UPNonDiseaseColor: '#99cc00',
4
+ predictedColor: '#4c8acd',
5
+ othersColor: '#009e73',
6
+ };
7
+ const consequences = {
8
+ uncertain: [/uncertain/i, /conflicting/i, /unclassified/i, /risk factor/i],
9
+ };
10
+ const significanceMatches = (clinicalSignificance, values) => clinicalSignificance.some(({ type }) => {
11
+ return values.some((rx) => rx.test(type));
12
+ });
13
+ export const getFilteredVariants = (variants, callbackFilter) => variants.map((variant) => {
14
+ const matchingVariants = variant.variants.filter((variantPos) => callbackFilter(variantPos));
15
+ return {
16
+ ...variant,
17
+ variants: [...matchingVariants],
18
+ };
19
+ });
20
+ const filterConfig = [
21
+ {
22
+ name: 'disease',
23
+ type: {
24
+ name: 'consequence',
25
+ text: 'Filter Consequence',
26
+ },
27
+ options: {
28
+ labels: ['Likely disease'],
29
+ colors: [scaleColors.UPDiseaseColor],
30
+ },
31
+ filterData: (variants) => getFilteredVariants(variants, (variantPos) => { var _a; return (_a = variantPos.association) === null || _a === void 0 ? void 0 : _a.some((association) => association.disease); }),
32
+ },
33
+ {
34
+ name: 'predicted',
35
+ type: {
36
+ name: 'consequence',
37
+ text: 'Filter Consequence',
38
+ },
39
+ options: {
40
+ labels: ['Predicted consequence'],
41
+ colors: [scaleColors.predictedColor],
42
+ },
43
+ filterData: (variants) => getFilteredVariants(variants, (variantPos) => variantPos.hasPredictions),
44
+ },
45
+ {
46
+ name: 'nonDisease',
47
+ type: {
48
+ name: 'consequence',
49
+ text: 'Filter Consequence',
50
+ },
51
+ options: {
52
+ labels: ['Likely benign'],
53
+ colors: [scaleColors.UPNonDiseaseColor],
54
+ },
55
+ filterData: (variants) => getFilteredVariants(variants, (variantPos) => {
56
+ var _a;
57
+ return (_a = variantPos.association) === null || _a === void 0 ? void 0 : _a.some((association) => association.disease === false);
58
+ }),
59
+ },
60
+ {
61
+ name: 'uncertain',
62
+ type: {
63
+ name: 'consequence',
64
+ text: 'Filter Consequence',
65
+ },
66
+ options: {
67
+ labels: ['Uncertain'],
68
+ colors: [scaleColors.othersColor],
69
+ },
70
+ filterData: (variants) => getFilteredVariants(variants, (variantPos) => (typeof variantPos.clinicalSignificances === 'undefined' &&
71
+ !variantPos.hasPredictions) ||
72
+ (variantPos.clinicalSignificances &&
73
+ significanceMatches(variantPos.clinicalSignificances, consequences.uncertain))),
74
+ },
75
+ {
76
+ name: 'UniProt',
77
+ type: {
78
+ name: 'provenance',
79
+ text: 'Filter Provenance',
80
+ },
81
+ options: {
82
+ labels: ['UniProt reviewed'],
83
+ colors: ['#9f9f9f'],
84
+ },
85
+ filterData: (variants) => getFilteredVariants(variants, (variantPos) => variantPos.xrefNames &&
86
+ (variantPos.xrefNames.includes('uniprot') ||
87
+ variantPos.xrefNames.includes('UniProt'))),
88
+ },
89
+ {
90
+ name: 'ClinVar',
91
+ type: {
92
+ name: 'provenance',
93
+ text: 'Filter Provenance',
94
+ },
95
+ options: {
96
+ labels: ['ClinVar reviewed'],
97
+ colors: ['#9f9f9f'],
98
+ },
99
+ filterData: (variants) => getFilteredVariants(variants, (variantPos) => variantPos.xrefNames &&
100
+ (variantPos.xrefNames.includes('ClinVar') ||
101
+ variantPos.xrefNames.includes('clinvar'))),
102
+ },
103
+ {
104
+ name: 'LSS',
105
+ type: {
106
+ name: 'provenance',
107
+ text: 'Filter Provenance',
108
+ },
109
+ options: {
110
+ labels: ['Large scale studies'],
111
+ colors: ['#9f9f9f'],
112
+ },
113
+ filterData: (variants) => getFilteredVariants(variants, (variantPos) => variantPos.sourceType === 'large_scale_study' ||
114
+ variantPos.sourceType === 'mixed'),
115
+ },
116
+ ];
117
+ const countVariantsForFilter = (filterName, variant) => {
118
+ const variantWrapper = [{ variants: [variant] }];
119
+ const filter = filterConfig.find((filter) => filter.name === filterName);
120
+ if (filter) {
121
+ return filter.filterData(variantWrapper)[0].variants.length > 0;
122
+ }
123
+ return false;
124
+ };
125
+ export const colorConfig = (variant) => {
126
+ if (countVariantsForFilter('disease', variant)) {
127
+ return scaleColors.UPDiseaseColor;
128
+ }
129
+ else if (countVariantsForFilter('nonDisease', variant)) {
130
+ return scaleColors.UPNonDiseaseColor;
131
+ }
132
+ else if (countVariantsForFilter('uncertain', variant)) {
133
+ return scaleColors.othersColor;
134
+ }
135
+ else if (countVariantsForFilter('predicted', variant)) {
136
+ return scaleColors.predictedColor;
137
+ }
138
+ return scaleColors.othersColor;
139
+ };
140
+ export default filterConfig;
141
+ //# sourceMappingURL=filterConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filterConfig.js","sourceRoot":"","sources":["../../src/filterConfig.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG;IAClB,cAAc,EAAE,SAAS;IACzB,iBAAiB,EAAE,SAAS;IAC5B,cAAc,EAAE,SAAS;IACzB,WAAW,EAAE,SAAS;CACvB,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,SAAS,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,CAAC;CAC3E,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAC1B,oBAA4C,EAC5C,MAAgB,EAChB,EAAE,CACF,oBAAoB,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACrC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5C,CAAC,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,QAAgC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AU,CAAC,CAAC;IACzE,IAAI,MAAM,EAAE;QACV,OAAO,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;KACjE;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,OAAyB,EAAE,EAAE;IACvD,IAAI,sBAAsB,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE;QAC9C,OAAO,WAAW,CAAC,cAAc,CAAC;KACnC;SAAM,IAAI,sBAAsB,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE;QACxD,OAAO,WAAW,CAAC,iBAAiB,CAAC;KACtC;SAAM,IAAI,sBAAsB,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE;QACvD,OAAO,WAAW,CAAC,WAAW,CAAC;KAChC;SAAM,IAAI,sBAAsB,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE;QACvD,OAAO,WAAW,CAAC,cAAc,CAAC;KACnC;IACD,OAAO,WAAW,CAAC,WAAW,CAAC;AACjC,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+
2
+ <svg width="60px" height="55px" viewBox="20 13 60 55" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <path d="M65.7143402,61.142849 C65.7143402,62.3928505 64.6786247,63.428566 63.4286232,63.428566 C62.1786217,63.428566 61.1429062,62.3928505 61.1429062,61.142849 C61.1429062,59.8928475 62.1786217,58.857132 63.4286232,58.857132 C64.6786247,58.857132 65.7143402,59.8928475 65.7143402,61.142849 Z M74.8572083,61.142849 C74.8572083,62.3928505 73.8214927,63.428566 72.5714912,63.428566 C71.3214898,63.428566 70.2857742,62.3928505 70.2857742,61.142849 C70.2857742,59.8928475 71.3214898,58.857132 72.5714912,58.857132 C73.8214927,58.857132 74.8572083,59.8928475 74.8572083,61.142849 Z M79.4286423,53.1428394 C79.4286423,51.24998 77.8929262,49.7142639 76.0000668,49.7142639 L59.4286184,49.7142639 L54.5714698,54.5714126 C53.2500396,55.8571284 51.5357519,56.5714149 49.7143211,56.5714149 C47.8928904,56.5714149 46.1786026,55.8571284 44.8571725,54.5714126 L40.0357382,49.7142639 L23.4285755,49.7142639 C21.5357161,49.7142639 20,51.24998 20,53.1428394 L20,64.5714245 C20,66.4642839 21.5357161,68 23.4285755,68 L76.0000668,68 C77.8929262,68 79.4286423,66.4642839 79.4286423,64.5714245 L79.4286423,53.1428394 Z M67.8214856,32.8213866 C67.4643423,31.9999571 66.6429127,31.4285278 65.7143402,31.4285278 L56.5714722,31.4285278 L56.5714722,15.4285088 C56.5714722,14.1785073 55.5357566,13.1427917 54.2857552,13.1427917 L45.1428871,13.1427917 C43.8928856,13.1427917 42.8571701,14.1785073 42.8571701,15.4285088 L42.8571701,31.4285278 L33.7143021,31.4285278 C32.7857295,31.4285278 31.9643,31.9999571 31.6071567,32.8213866 C31.2500134,33.6785305 31.4285851,34.6785317 32.1071573,35.3213896 L48.1071764,51.3214087 C48.5357483,51.785695 49.1428919,51.9999809 49.7143211,51.9999809 C50.2857504,51.9999809 50.892894,51.785695 51.3214659,51.3214087 L67.321485,35.3213896 C68.0000572,34.6785317 68.1786289,33.6785305 67.8214856,32.8213866 Z" stroke="none" fill="#00709b" fill-rule="evenodd"></path>
4
+ </svg>
@@ -0,0 +1,17 @@
1
+ <!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL -->
2
+ <svg width="38" height="38" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg" stroke="currentColor">
3
+ <g fill="none" fill-rule="evenodd">
4
+ <g transform="translate(1 1)" stroke-width="2">
5
+ <circle stroke-opacity=".5" cx="18" cy="18" r="18"/>
6
+ <path d="M36 18c0-9.94-8.06-18-18-18">
7
+ <animateTransform
8
+ attributeName="transform"
9
+ type="rotate"
10
+ from="0 18 18"
11
+ to="360 18 18"
12
+ dur="1s"
13
+ repeatCount="indefinite"/>
14
+ </path>
15
+ </g>
16
+ </g>
17
+ </svg>
@@ -0,0 +1,14 @@
1
+ import ProtvistaUniprot from './protvista-uniprot';
2
+ import _DownloadPanel from './download-panel';
3
+ import _ProtvistaUniprotStructure from './protvista-uniprot-structure';
4
+ export declare const transformDataFeatureAdapter: any;
5
+ export declare const transformDataProteomicsAdapter: any;
6
+ export declare const transformDataStructureAdapter: any;
7
+ export declare const transformDataVariationAdapter: (data: import("protvista-variation-adapter/dist/es/variants").ProteinsAPIVariation) => {
8
+ sequence: string;
9
+ variants: any[];
10
+ };
11
+ export declare const transformDataInterproAdapter: any;
12
+ export declare const ProtvistaUniprotStructure: typeof _ProtvistaUniprotStructure;
13
+ export declare const DownloadPanel: typeof _DownloadPanel;
14
+ export default ProtvistaUniprot;
@@ -0,0 +1,21 @@
1
+ import { loadComponent } from './loadComponents';
2
+ import ProtvistaUniprot from './protvista-uniprot';
3
+ import _DownloadPanel from './download-panel';
4
+ import _ProtvistaUniprotStructure from './protvista-uniprot-structure';
5
+ import { transformDataFeatureAdapter as _transformDataFeatureAdapter } from './protvista-uniprot';
6
+ import { transformDataProteomicsAdapter as _transformDataProteomicsAdapter } from './protvista-uniprot';
7
+ import { transformDataStructureAdapter as _transformDataStructureAdapter } from './protvista-uniprot';
8
+ import { transformDataVariationAdapter as _transformDataVariationAdapter } from './protvista-uniprot';
9
+ import { transformDataInterproAdapter as _transformDataInterproAdapter } from './protvista-uniprot';
10
+ export const transformDataFeatureAdapter = _transformDataFeatureAdapter;
11
+ export const transformDataProteomicsAdapter = _transformDataProteomicsAdapter;
12
+ export const transformDataStructureAdapter = _transformDataStructureAdapter;
13
+ export const transformDataVariationAdapter = _transformDataVariationAdapter;
14
+ export const transformDataInterproAdapter = _transformDataInterproAdapter;
15
+ export const ProtvistaUniprotStructure = _ProtvistaUniprotStructure;
16
+ export const DownloadPanel = _DownloadPanel;
17
+ loadComponent('protvista-uniprot', ProtvistaUniprot);
18
+ loadComponent('download-panel', _DownloadPanel);
19
+ loadComponent('protvista-uniprot-structure', _ProtvistaUniprotStructure);
20
+ export default ProtvistaUniprot;
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,0BAA0B,MAAM,+BAA+B,CAAC;AAEvE,OAAO,EAAE,2BAA2B,IAAI,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAClG,OAAO,EAAE,8BAA8B,IAAI,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AACxG,OAAO,EAAE,6BAA6B,IAAI,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AACtG,OAAO,EAAE,6BAA6B,IAAI,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AACtG,OAAO,EAAE,4BAA4B,IAAI,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAEpG,MAAM,CAAC,MAAM,2BAA2B,GAAG,4BAA4B,CAAC;AACxE,MAAM,CAAC,MAAM,8BAA8B,GAAG,+BAA+B,CAAC;AAC9E,MAAM,CAAC,MAAM,6BAA6B,GAAG,8BAA8B,CAAC;AAC5E,MAAM,CAAC,MAAM,6BAA6B,GAAG,8BAA8B,CAAC;AAC5E,MAAM,CAAC,MAAM,4BAA4B,GAAG,6BAA6B,CAAC;AAC1E,MAAM,CAAC,MAAM,yBAAyB,GAAG,0BAA0B,CAAC;AACpE,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAC;AAE5C,aAAa,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,CAAC;AACrD,aAAa,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;AAChD,aAAa,CAAC,6BAA6B,EAAE,0BAA0B,CAAC,CAAC;AAEzE,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,2 @@
1
+ declare const loadComponent: (name: string, elementConstructor: CustomElementConstructor) => void;
2
+ export { loadComponent };
@@ -0,0 +1,7 @@
1
+ const loadComponent = function (name, elementConstructor) {
2
+ if (!customElements.get(name)) {
3
+ customElements.define(name, elementConstructor);
4
+ }
5
+ };
6
+ export { loadComponent };
7
+ //# sourceMappingURL=loadComponents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadComponents.js","sourceRoot":"","sources":["../../src/loadComponents.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa,GAAG,UACpB,IAAY,EACZ,kBAA4C;IAE5C,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QAC7B,cAAc,CAAC,MAAM,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;KACjD;AACH,CAAC,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { LitElement, TemplateResult } from 'lit-element';
2
+ declare type ProcessedStructureData = {
3
+ id: string;
4
+ source: 'PDB' | 'AlphaFold';
5
+ method: string;
6
+ resolution?: string;
7
+ chain?: string;
8
+ positions?: string;
9
+ downloadLink?: string;
10
+ protvistaFeatureId: string;
11
+ };
12
+ declare class ProtvistaUniprotStructure extends LitElement {
13
+ accession?: string;
14
+ data?: ProcessedStructureData[];
15
+ structureId?: string;
16
+ metaInfo?: TemplateResult;
17
+ private loading?;
18
+ constructor();
19
+ static get properties(): {
20
+ accession: {
21
+ type: StringConstructor;
22
+ };
23
+ structureId: {
24
+ type: StringConstructor;
25
+ };
26
+ data: {
27
+ type: ObjectConstructor;
28
+ };
29
+ loading: {
30
+ type: BooleanConstructor;
31
+ };
32
+ };
33
+ connectedCallback(): Promise<void>;
34
+ disconnectedCallback(): void;
35
+ updated(): void;
36
+ addStyles(): void;
37
+ removeStyles(): void;
38
+ onTableRowClick({ id }: {
39
+ id: string;
40
+ }): void;
41
+ get cssStyle(): import("lit-element").CSSResult;
42
+ /**
43
+ * we need to use the light DOM.
44
+ * */
45
+ createRenderRoot(): this;
46
+ render(): TemplateResult;
47
+ }
48
+ export default ProtvistaUniprotStructure;