Skip to content

Commit

Permalink
added getRequiredStatement to IIIIFResource, updated TypeScript, adde…
Browse files Browse the repository at this point in the history
…d skipLibCheck to tsconfig
  • Loading branch information
edsilv committed Aug 22, 2018
1 parent 320bca3 commit 8aa5d42
Show file tree
Hide file tree
Showing 7 changed files with 533 additions and 287 deletions.
251 changes: 166 additions & 85 deletions dist/client/manifesto.bundle.js

Large diffs are not rendered by default.

253 changes: 167 additions & 86 deletions dist/client/manifesto.js

Large diffs are not rendered by default.

55 changes: 28 additions & 27 deletions dist/manifesto.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// manifesto v2.3.0 https://github.com/iiif-commons/manifesto
// manifesto v2.3.1 https://github.com/iiif-commons/manifesto

declare namespace Manifesto {
class StringValue {
Expand Down Expand Up @@ -341,10 +341,10 @@ declare namespace Manifesto {
getPosterCanvas(): ICanvas | null;
getBehavior(): Behavior | null;
getDefaultTree(): ITreeNode;
private _getTopRanges();
private _getTopRanges;
getTopRanges(): IRange[];
private _getRangeById(id);
private _parseRanges(r, path, parentRange?);
private _getRangeById;
private _parseRanges;
getAllRanges(): IRange[];
getRangeById(id: string): IRange | null;
getRangeByPath(path: string): IRange | null;
Expand Down Expand Up @@ -378,8 +378,8 @@ declare namespace Manifesto {
* Get a tree of sub collections and manifests, using each child manifest's first 'top' range.
*/
getDefaultTree(): ITreeNode;
private _parseManifests(parentCollection);
private _parseCollections(parentCollection);
private _parseManifests;
private _parseCollections;
}
}

Expand All @@ -400,7 +400,7 @@ declare namespace Manifesto {
getViewingHint(): ViewingHint | null;
getTree(treeRoot: ITreeNode): ITreeNode;
spansTime(time: number): boolean;
private _parseTreeNode(node, range);
private _parseTreeNode;
}
}

Expand Down Expand Up @@ -573,7 +573,7 @@ declare namespace Manifesto {
static createRestrictedError(): Error;
static createInternalServerError(message: string): Error;
static authorize(resource: IExternalResource, tokenStorageStrategy: string, clickThrough: (resource: IExternalResource) => Promise<any>, restricted: (resource: IExternalResource) => Promise<any>, login: (resource: IExternalResource) => Promise<any>, getAccessToken: (resource: IExternalResource, rejectOnError: boolean) => Promise<IAccessToken>, storeAccessToken: (resource: IExternalResource, token: IAccessToken, tokenStorageStrategy: string) => Promise<any>, getStoredAccessToken: (resource: IExternalResource, tokenStorageStrategy: string) => Promise<IAccessToken>): Promise<IExternalResource>;
private static showAuthInteraction(resource, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, resolve, reject);
private static showAuthInteraction;
static getService(resource: any, profile: ServiceProfile | string): IService | null;
static getResourceById(parentResource: IJSONLDResource, id: string): IJSONLDResource;
static getAllArrays(obj: any): any[];
Expand Down Expand Up @@ -771,6 +771,7 @@ declare namespace Manifesto {
getLogo(): string | null;
getNavDate(): Date;
getRelated(): any;
getRequiredStatement(): Manifesto.LabelValuePair | null;
getSeeAlso(): any;
index: number;
isCollection(): boolean;
Expand Down Expand Up @@ -812,6 +813,25 @@ declare namespace Manifesto {
}
}

declare namespace Manifesto {
interface IManifestResource extends IJSONLDResource {
externalResource: Manifesto.IExternalResource;
options: IManifestoOptions;
getLabel(): TranslationCollection;
getMetadata(): LabelValuePair[];
getRendering(format: RenderingFormat | string): IRendering | null;
getRenderings(): IRendering[];
getService(profile: ServiceProfile | string): IService | null;
getServices(): IService[];
getThumbnail(): Thumbnail | null;
isAnnotation(): boolean;
isCanvas(): boolean;
isManifest(): boolean;
isRange(): boolean;
isSequence(): boolean;
}
}

interface IManifesto {
AnnotationMotivation: Manifesto.AnnotationMotivation;
Behavior: Manifesto.Behavior;
Expand Down Expand Up @@ -846,25 +866,6 @@ declare namespace Manifesto {
}
}

declare namespace Manifesto {
interface IManifestResource extends IJSONLDResource {
externalResource: Manifesto.IExternalResource;
options: IManifestoOptions;
getLabel(): TranslationCollection;
getMetadata(): LabelValuePair[];
getRendering(format: RenderingFormat | string): IRendering | null;
getRenderings(): IRendering[];
getService(profile: ServiceProfile | string): IService | null;
getServices(): IService[];
getThumbnail(): Thumbnail | null;
isAnnotation(): boolean;
isCanvas(): boolean;
isManifest(): boolean;
isRange(): boolean;
isSequence(): boolean;
}
}

declare namespace Manifesto {
interface IRange extends IManifestResource {
canvases: string[] | null;
Expand Down
253 changes: 167 additions & 86 deletions dist/server/manifesto.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "manifesto.js",
"version": "2.3.0",
"version": "2.3.1",
"description": "IIIF Presentation API utility library for client and server",
"main": "./dist/server/manifesto.js",
"types": "./dist/manifesto.d.ts",
Expand All @@ -19,7 +19,7 @@
},
"homepage": "https://github.com/iiif-commons/manifesto",
"devDependencies": {
"@types/node": "10.3.2",
"@types/node": "10.7.1",
"browserify": "13.0.1",
"chai": "2.3.0",
"del": "1.1.1",
Expand All @@ -42,7 +42,7 @@
"run-sequence": "1.1.0",
"serve-static": "1.10.0",
"through2": "2.0.1",
"typescript": "2.5.3",
"typescript": "3.0.1",
"yargs": "3.10.0"
},
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions src/IIIIFResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace Manifesto {
getLogo(): string | null;
getNavDate(): Date;
getRelated(): any;
getRequiredStatement(): Manifesto.LabelValuePair | null;
getSeeAlso(): any;
index: number;
isCollection(): boolean;
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"strictNullChecks": true,
"target": "es5",
"lib": ["es6", "dom"],
"skipLibCheck": true,
"types": ["node", "http-status-codes"]
},
"files": [
Expand Down

0 comments on commit 8aa5d42

Please sign in to comment.