Skip to content

Commit

Permalink
Merge pull request #132 from DiSSCo/RefactorAnnotationTour
Browse files Browse the repository at this point in the history
Refactor annotation tour
  • Loading branch information
TomDijkema authored Nov 26, 2024
2 parents 47b9898 + ada9cf1 commit 72fd9d2
Show file tree
Hide file tree
Showing 38 changed files with 1,346 additions and 166 deletions.
20 changes: 17 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.2",
"@types/css-font-loading-module": "^0.0.14",
"@types/cytoscape": "^3.21.5",
"@types/jsonpath": "^0.2.4",
"@types/leaflet": "^1.9.12",
Expand Down
6 changes: 4 additions & 2 deletions src/app/Store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import type { PreloadedStateShapeFromReducersMapObject } from '@reduxjs/toolkit'
/* Import Redux Slices */
import AnnotateReducer from 'redux-store/AnnotateSlice';
import BootReducder from 'redux-store/BootSlice';
import GlobalReducer from 'redux-store/GlobalSlice';
import SearchReducer from 'redux-store/SearchSlice';
import DigitalMediaReducer from 'redux-store/DigitalMediaSlice';
import DigitalSpecimenReducer from 'redux-store/DigitalSpecimenSlice';
import GlobalReducer from 'redux-store/GlobalSlice';
import SearchReducer from 'redux-store/SearchSlice';
import TourReducer from 'redux-store/TourSlice';


const rootReducer = combineReducers({
Expand All @@ -18,6 +19,7 @@ const rootReducer = combineReducers({
digitalSpecimen: DigitalSpecimenReducer,
global: GlobalReducer,
search: SearchReducer,
tour: TourReducer
});

export const setupStore = (preloadedState?: PreloadedStateShapeFromReducersMapObject<RootState>) => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/types/Annotation.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface Annotation {
/**
* The handle of the annotation. It is a unique identifier for the annotation. It is composed of the handle of the document followed by a slash and a unique identifier for the annotation.
*/
"dcterms:identifier"?: string;
"dcterms:identifier": string;
/**
* The DOI to the FDO type of the object
*/
Expand Down
174 changes: 174 additions & 0 deletions src/app/types/ChronometricAge.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ export interface ChronometricAge {
* The reference system associated with the latestChronometricAge
*/
"chrono:latestChronometricAgeReferenceSystem"?: string;
/**
* A description of or reference to the methods used to determine the chronometric age.
*/
"chrono:chronometricAgeProtocol"?: string;
/**
* The temporal uncertainty of the earliestChronometricAge and latestChronometicAge in years
*/
Expand Down Expand Up @@ -78,4 +82,174 @@ export interface ChronometricAge {
* Notes or comments about the ChronometricAge
*/
"chrono:chronometricAgeRemarks"?: string;
/**
* The agent(s) involved in the determination of the chronometric age, uses `ods:Agent`
*/
"ods:hasAgents"?: Agent[];
}
export interface Agent {
/**
* The identifier for the Agent object
*/
"@id"?: string;
/**
* The type of the agent, the prov ontology is only used in the prov-o ods:CreateUpdateTombstoneEvent
*/
"@type":
| "schema:Person"
| "schema:Organization"
| "schema:SoftwareApplication"
| "prov:Person"
| "prov:SoftwareAgent";
/**
* The primary unique identifier of the Agent object. All identifiers will also be added to the ods:hasIdentifiers array
*/
"schema:identifier"?: string;
/**
* Full name of the agent
*/
"schema:name"?: string;
/**
* Contains all roles associated with the agent in the context of the Digital Object. Should always contain at least one role
*
* @minItems 1
*/
"ods:hasRoles"?: [
{
/**
* The identifier for the agent role, preferably a URL to a controlled vocabulary
*/
"@id"?: string;
/**
* The type of the object, in this case schema:Role
*/
"@type": "schema:Role";
/**
* The category that best matches the nature of a role of an Agent
*/
"schema:roleName": string;
/**
* Date the agent began the role
*/
"schema:startDate"?: string;
/**
* Date the agent ended the role
*/
"schema:endDate"?: string;
/**
* Can be used to indicate the order of importance when there are multiple agents with the same role. Lower order means higher importance.
*/
"schema:position"?: number;
},
...{
/**
* The identifier for the agent role, preferably a URL to a controlled vocabulary
*/
"@id"?: string;
/**
* The type of the object, in this case schema:Role
*/
"@type": "schema:Role";
/**
* The category that best matches the nature of a role of an Agent
*/
"schema:roleName": string;
/**
* Date the agent began the role
*/
"schema:startDate"?: string;
/**
* Date the agent ended the role
*/
"schema:endDate"?: string;
/**
* Can be used to indicate the order of importance when there are multiple agents with the same role. Lower order means higher importance.
*/
"schema:position"?: number;
}[]
];
/**
* Email of the agent
*/
"schema:email"?: string;
/**
* URL to a website of the agent
*/
"schema:url"?: string;
/**
* Contains all identifiers associated with the agent
*/
"ods:hasIdentifiers"?: Identifier[];
}
/**
* Object used to describe identifiers of a Digital Object, based on https://rs.gbif.org/extension/gbif/1.0/identifier.xml but includes ods specific terms
*/
export interface Identifier {
/**
* The identifier for the Identifier object.
*/
"@id"?: string;
/**
* The type of the digital object, in this case a ods:Identifier
*/
"@type": "ods:Identifier";
/**
* A name for the identifier
*/
"dcterms:title": string;
/**
* The type of the value in the `dcterms:identifier` field
*/
"dcterms:type"?:
| "ARK"
| "arXiv"
| "bibcode"
| "DOI"
| "EAN13"
| "EISSN"
| "Handle"
| "IGSN"
| "ISBN"
| "ISSN"
| "ISTC"
| "LISSN"
| "LSID"
| "PMID"
| "PURL"
| "UPC"
| "URL"
| "URN"
| "w3id"
| "UUID"
| "Other"
| "Locally unique identifier";
/**
* The value for the identifier
*/
"dcterms:identifier": string;
/**
* All possible mime types of content that can be returned by identifier in case the identifier is resolvable. Plain UUIDs for example do not have a dc:format return type, as they are not resolvable on their own. For a list of MIME types see the list maintained by IANA: http://www.iana.org/assignments/media-types/index.html, in particular the text http://www.iana.org/assignments/media-types/text/ and application http://www.iana.org/assignments/media-types/application/ types. Frequently used values are text/html, text/xml, application/rdf+xml, application/json
*/
"dcterms:format"?: string[];
/**
* Additional keywords that the publisher may prefer to be attached to the identifier
*/
"dcterms:subject"?: string[];
/**
* Indicates whether the identifier is part of the physical label
*/
"ods:isPartOfLabel"?: boolean;
/**
* Indicates whether the identifier is a persistent identifier
*/
"ods:gupriLevel"?:
| "LocallyUniqueStable"
| "GloballyUniqueStable"
| "GloballyUniqueStableResolvable"
| "GloballyUniqueStablePersistentResolvable"
| "GloballyUniqueStablePersistentResolvableFDOCompliant";
/**
* Indicates the status of the identifier
*/
"ods:identifierStatus"?: "Preferred" | "Alternative" | "Superseded";
}
Loading

0 comments on commit 72fd9d2

Please sign in to comment.