-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Working solution * Add async inject example * Fix tests * Code smell * Clear up testing errors in RUI * Listen to reference data state instead
- Loading branch information
Showing
17 changed files
with
129 additions
and
55 deletions.
There are no files selected for viewing
3 changes: 1 addition & 2 deletions
3
projects/ccf-eui/src/app/shared/components/checkbox/checkbox.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
projects/ccf-rui/src/app/core/services/theming/theming.service.spec.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
projects/ccf-rui/src/app/modules/header/header.component.spec.ts
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
projects/ccf-rui/src/app/modules/right-sidebar/right-sidebar.component.spec.ts
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
projects/ccf-rui/src/app/shared/components/drawer/container/container.component.spec.ts
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
projects/ccf-rui/src/app/shared/components/drawer/content/content.component.spec.ts
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
projects/ccf-rui/src/app/shared/components/drawer/drawer/drawer.component.spec.ts
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...ts/ccf-rui/src/app/shared/components/drawer/toggle-button/toggle-button.component.spec.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
projects/ccf-rui/src/webcomponent-async-inject-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>HuBMAP CCF Registration User Interface (CCF-RUI)</title> | ||
<base href="/"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="icon" type="image/x-icon" href="favicon.ico"> | ||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap" rel="stylesheet"> | ||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined" rel="stylesheet"> | ||
<script> | ||
// To test embedded mode, from the console paste: | ||
// localStorage.setItem('TEST_EMBEDDED', true); | ||
if (localStorage['TEST_EMBEDDED'] === 'true') { | ||
const sampleRegistration = { | ||
"@context": "https://hubmapconsortium.github.io/ccf-ontology/ccf-context.jsonld", | ||
"@id": "http://purl.org/ccf/1.5/523ad946-115b-433a-bd1d-ba4b75f8c493", | ||
"@type": "SpatialEntity", | ||
"creator": "Jane Doe", | ||
"creator_first_name": "Jane", | ||
"creator_last_name": "Doe", | ||
"creation_date": "2023-08-29", | ||
"ccf_annotations": [ | ||
"http://purl.obolibrary.org/obo/UBERON_0002015", | ||
"http://purl.obolibrary.org/obo/UBERON_0008716", | ||
"http://purl.obolibrary.org/obo/UBERON_0000362", | ||
"http://purl.obolibrary.org/obo/UBERON_0001228", | ||
"http://purl.obolibrary.org/obo/UBERON_0004200", | ||
"http://purl.obolibrary.org/obo/UBERON_0001225", | ||
"http://purl.obolibrary.org/obo/UBERON_0001284", | ||
"http://purl.obolibrary.org/obo/UBERON_0002189" | ||
], | ||
"slice_thickness": 1, | ||
"slice_count": 2, | ||
"x_dimension": 16, | ||
"y_dimension": 12, | ||
"z_dimension": 14, | ||
"dimension_units": "millimeter", | ||
"placement": { | ||
"@context": "https://hubmapconsortium.github.io/ccf-ontology/ccf-context.jsonld", | ||
"@id": "http://purl.org/ccf/1.5/523ad946-115b-433a-bd1d-ba4b75f8c493_placement", | ||
"@type": "SpatialPlacement", | ||
"target": "http://purl.org/ccf/latest/ccf.owl#VHFLeftKidneyV1.1", | ||
"placement_date": "2023-08-29", | ||
"x_scaling": 1, | ||
"y_scaling": 1, | ||
"z_scaling": 1, | ||
"scaling_units": "ratio", | ||
"x_rotation": 10, | ||
"y_rotation": 25, | ||
"z_rotation": 32, | ||
"rotation_order": "XYZ", | ||
"rotation_units": "degree", | ||
"x_translation": 25.866, | ||
"y_translation": 94.635, | ||
"z_translation": 38.79, | ||
"translation_units": "millimeter" | ||
} | ||
}; | ||
|
||
window.addEventListener('DOMContentLoaded', () => { | ||
const rui = document.createElement("ccf-rui"); | ||
rui.baseHref = 'https://cdn.jsdelivr.net/gh/hubmapconsortium/ccf-ui@staging/rui/'; | ||
rui.useDownload = true; | ||
|
||
setTimeout(() => { | ||
rui.user = {firstName: 'Jane', lastName: 'Doe'}; | ||
rui.organ = { name: 'kidney', side: 'left', sex: 'female' }; | ||
rui.editRegistration = sampleRegistration; | ||
document.body.appendChild(rui); | ||
}, 2000); | ||
}); | ||
} | ||
</script> | ||
</head> | ||
|
||
<body class="mat-typography"> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters