diff --git a/src/content-handlers/iiif/BaseConfig.ts b/src/content-handlers/iiif/BaseConfig.ts index edf1af59c..0641ff947 100644 --- a/src/content-handlers/iiif/BaseConfig.ts +++ b/src/content-handlers/iiif/BaseConfig.ts @@ -1,5 +1,4 @@ import { StorageType } from "@edsilv/utils"; - export { StorageType } from "@edsilv/utils"; export type MetricType = string | "sm" | "md" | "lg" | "xl"; @@ -105,11 +104,104 @@ type Locale = { label: string; }; +export type ModuleOptions = {}; + +export type ModuleContent = {}; + +export type ModuleConfig = { + options: ModuleOptions; + content: ModuleContent; +}; + export type Localisation = { label: string; locales: Locale[]; }; +export type HeaderPanelOptions = { + /** Determines if center options are enabled */ + centerOptionsEnabled: boolean; + /** Determines if locale toggle is enabled */ + localeToggleEnabled: boolean; + /** Determines if settings button is enabled */ + settingsButtonEnabled: boolean; +}; + +export type HeaderPanelContent = { + close: string; + settings: string; +}; + +type HeaderPanel = ModuleConfig & { + options: HeaderPanelOptions; + content: HeaderPanelContent; +}; + +export type LeftPanelOptions = { + /** Determines if expand full is enabled */ + expandFullEnabled: boolean; + /** Determines the duration of the panel expand/collapse animation */ + panelAnimationDuration: number; + /** Width of the collapsed panel */ + panelCollapsedWidth: number; + /** Width of the expanded panel */ + panelExpandedWidth: number; + /** Determines if the panel is open */ + panelOpen: boolean; +}; + +export type LeftPanelContent = { + collapse: string; + collapseFull: string; + expand: string; + expandFull: string; +}; + +type LeftPanel = ModuleConfig & { + options: LeftPanelOptions; + content: LeftPanelContent; +}; + +export type FooterPanelOptions = { + /** Determines if bookmarking is enabled */ + bookmarkEnabled: boolean; + /** Determines if downloading is enabled */ + downloadEnabled: boolean; + /** Determines if embedding is enabled */ + embedEnabled: boolean; + /** Determines if feedback is enabled */ + feedbackEnabled: boolean; + /** Determines if fullscreen mode is enabled */ + fullscreenEnabled: boolean; + /** Determines if buttons are minimised */ + minimiseButtons: boolean; + /** Determines if more information is enabled */ + moreInfoEnabled: boolean; + /** Determines if opening is enabled */ + openEnabled: boolean; + /** Determines if printing is enabled */ + printEnabled: boolean; + /** Determines if sharing is enabled */ + shareEnabled: boolean; +}; + +export type FooterPanelContent = { + bookmark: string; + download: string; + embed: string; + exitFullScreen: string; + feedback: string; + fullScreen: string; + moreInfo: string; + open: string; + share: string; +}; + +type FooterPanel = ModuleConfig & { + options: FooterPanelOptions; + content: FooterPanelContent; +}; + type DialogueOptions = { topCloseButtonEnabled: boolean; }; @@ -118,7 +210,7 @@ type DialogueContent = { close: string; }; -type Dialogue = { +type Dialogue = ModuleConfig & { options?: DialogueOptions; content: DialogueContent; }; @@ -268,7 +360,10 @@ export type BaseConfig = { modules: { dialogue: Dialogue; downloadDialogue: DownloadDialogue; + footerPanel: FooterPanel; genericDialogue: GenericDialogue; + headerPanel: HeaderPanel; + leftPanel: LeftPanel; moreInfoRightPanel: MoreInfoRightPanel; }; localisation: Localisation; diff --git a/src/content-handlers/iiif/extensions/uv-aleph-extension/Extension.ts b/src/content-handlers/iiif/extensions/uv-aleph-extension/Extension.ts index 536d13d9d..88ba7acdb 100644 --- a/src/content-handlers/iiif/extensions/uv-aleph-extension/Extension.ts +++ b/src/content-handlers/iiif/extensions/uv-aleph-extension/Extension.ts @@ -23,8 +23,8 @@ export default class Extension extends BaseExtension $shareDialogue: JQuery; centerPanel: AlephCenterPanel; downloadDialogue: DownloadDialogue; - footerPanel: FooterPanel; - headerPanel: HeaderPanel; + footerPanel: FooterPanel; + headerPanel: HeaderPanel; leftPanel: AlephLeftPanel; mobileFooterPanel: MobileFooterPanel; rightPanel: MoreInfoRightPanel; diff --git a/src/content-handlers/iiif/extensions/uv-aleph-extension/config/Config.ts b/src/content-handlers/iiif/extensions/uv-aleph-extension/config/Config.ts index 30f142a17..e20aa5f1f 100644 --- a/src/content-handlers/iiif/extensions/uv-aleph-extension/config/Config.ts +++ b/src/content-handlers/iiif/extensions/uv-aleph-extension/config/Config.ts @@ -1,6 +1,28 @@ -import { BaseConfig } from "@/content-handlers/iiif/BaseConfig"; +import { + BaseConfig, + LeftPanelContent, + LeftPanelOptions, +} from "@/content-handlers/iiif/BaseConfig"; -type Modules = {}; +type AlephLeftPanelOptions = LeftPanelOptions & { + consoleTabEnabled: boolean; + graphTabEnabled: boolean; + settingsTabEnabled: boolean; + srcTabEnabled: boolean; +}; + +type AlephLeftPanelContent = LeftPanelContent & { + title: string; +}; + +type AlephLeftPanel = { + options: AlephLeftPanelOptions; + content: AlephLeftPanelContent; +}; + +type Modules = { + alephLeftPanel: AlephLeftPanel; +}; export type Config = BaseConfig & { modules: Modules; diff --git a/src/content-handlers/iiif/extensions/uv-aleph-extension/config/config.json b/src/content-handlers/iiif/extensions/uv-aleph-extension/config/config.json index c362ab632..3bb85b7cf 100644 --- a/src/content-handlers/iiif/extensions/uv-aleph-extension/config/config.json +++ b/src/content-handlers/iiif/extensions/uv-aleph-extension/config/config.json @@ -46,24 +46,39 @@ "zoomToSearchResultEnabled": true }, "modules": { - "alephLeftPanel": { + "leftPanel": { "options": { "expandFullEnabled": false, "panelAnimationDuration": 250, "panelCollapsedWidth": 30, "panelExpandedWidth": 255, - "panelOpen": false, + "panelOpen": false + }, + "content": { + "collapse": "$collapse", + "collapseFull": "$collapseFull", + "expand": "$expandContents", + "expandFull": "$expandGallery" + } + }, + "alephLeftPanel": { + "options": { "consoleTabEnabled": true, "graphTabEnabled": true, "settingsTabEnabled": true, - "srcTabEnabled": false + "srcTabEnabled": false, + "expandFullEnabled": false, + "panelAnimationDuration": 250, + "panelCollapsedWidth": 30, + "panelExpandedWidth": 255, + "panelOpen": false }, "content": { - "collapse": "Collapse", - "collapseFull": "Collapse", - "expand": "Expand", - "expandFull": "Expand", - "title": "Tools" + "title": "Tools", + "collapse": "$collapse", + "collapseFull": "$collapseFull", + "expand": "$expandContents", + "expandFull": "$expandGallery" } }, "dialogue": { @@ -111,11 +126,13 @@ }, "headerPanel": { "options": { + "centerOptionsEnabled": true, "localeToggleEnabled": false, "settingsButtonEnabled": true }, "content": { - "settings": "Settings" + "close": "$close", + "settings": "$settings" } }, "helpDialogue": { diff --git a/src/content-handlers/iiif/extensions/uv-av-extension/Extension.ts b/src/content-handlers/iiif/extensions/uv-av-extension/Extension.ts index fb583aa20..b1b4b5908 100644 --- a/src/content-handlers/iiif/extensions/uv-av-extension/Extension.ts +++ b/src/content-handlers/iiif/extensions/uv-av-extension/Extension.ts @@ -25,8 +25,8 @@ export default class Extension extends BaseExtension $shareDialogue: JQuery; centerPanel: AVCenterPanel; downloadDialogue: DownloadDialogue; - footerPanel: FooterPanel; - headerPanel: HeaderPanel; + footerPanel: FooterPanel; + headerPanel: HeaderPanel; leftPanel: ContentLeftPanel; mobileFooterPanel: MobileFooterPanel; rightPanel: MoreInfoRightPanel; diff --git a/src/content-handlers/iiif/extensions/uv-av-extension/config/config.json b/src/content-handlers/iiif/extensions/uv-av-extension/config/config.json index 87408137e..489d48135 100644 --- a/src/content-handlers/iiif/extensions/uv-av-extension/config/config.json +++ b/src/content-handlers/iiif/extensions/uv-av-extension/config/config.json @@ -46,6 +46,21 @@ "zoomToSearchResultEnabled": true }, "modules": { + "leftPanel": { + "options": { + "expandFullEnabled": false, + "panelAnimationDuration": 250, + "panelCollapsedWidth": 30, + "panelExpandedWidth": 255, + "panelOpen": false + }, + "content": { + "collapse": "$collapse", + "collapseFull": "$collapseFull", + "expand": "$expandContents", + "expandFull": "$expandGallery" + } + }, "contentLeftPanel": { "options": { "autoExpandTreeEnabled": true, @@ -137,10 +152,12 @@ }, "headerPanel": { "options": { + "centerOptionsEnabled": true, "localeToggleEnabled": false, "settingsButtonEnabled": true }, "content": { + "close": "$close", "settings": "$settings" } }, diff --git a/src/content-handlers/iiif/extensions/uv-default-extension/Extension.ts b/src/content-handlers/iiif/extensions/uv-default-extension/Extension.ts index 119dc3181..db66fb891 100644 --- a/src/content-handlers/iiif/extensions/uv-default-extension/Extension.ts +++ b/src/content-handlers/iiif/extensions/uv-default-extension/Extension.ts @@ -22,8 +22,8 @@ export default class Extension extends BaseExtension $settingsDialogue: JQuery; centerPanel: FileLinkCenterPanel; shareDialogue: ShareDialogue; - footerPanel: FooterPanel; - headerPanel: HeaderPanel; + footerPanel: FooterPanel; + headerPanel: HeaderPanel; helpDialogue: HelpDialogue; leftPanel: ResourcesLeftPanel; rightPanel: MoreInfoRightPanel; diff --git a/src/content-handlers/iiif/extensions/uv-default-extension/config/Config.ts b/src/content-handlers/iiif/extensions/uv-default-extension/config/Config.ts index 30f142a17..ec0f16eff 100644 --- a/src/content-handlers/iiif/extensions/uv-default-extension/config/Config.ts +++ b/src/content-handlers/iiif/extensions/uv-default-extension/config/Config.ts @@ -1,6 +1,33 @@ -import { BaseConfig } from "@/content-handlers/iiif/BaseConfig"; +import { + BaseConfig, + LeftPanelContent, + LeftPanelOptions, +} from "@/content-handlers/iiif/BaseConfig"; -type Modules = {}; +type ResourcesLeftPanelOptions = LeftPanelOptions & { + expandFullEnabled: boolean; + panelAnimationDuration: number; + panelCollapsedWidth: number; + panelExpandedWidth: number; + panelOpen: boolean; + twoColThumbWidth: number; + twoColThumbHeight: number; + oneColThumbWidth: number; + oneColThumbHeight: number; +}; + +type ResourcesLeftPanelContent = LeftPanelContent & { + title: string; +}; + +type ResourcesLeftPanel = { + options: ResourcesLeftPanelOptions; + content: ResourcesLeftPanelContent; +}; + +type Modules = { + resourcesLeftPanel: ResourcesLeftPanel; +}; export type Config = BaseConfig & { modules: Modules; diff --git a/src/content-handlers/iiif/extensions/uv-default-extension/config/config.json b/src/content-handlers/iiif/extensions/uv-default-extension/config/config.json index ffc4c7d4b..58055a400 100644 --- a/src/content-handlers/iiif/extensions/uv-default-extension/config/config.json +++ b/src/content-handlers/iiif/extensions/uv-default-extension/config/config.json @@ -46,6 +46,21 @@ "zoomToSearchResultEnabled": true }, "modules": { + "leftPanel": { + "options": { + "expandFullEnabled": false, + "panelAnimationDuration": 250, + "panelCollapsedWidth": 30, + "panelExpandedWidth": 255, + "panelOpen": false + }, + "content": { + "collapse": "$collapse", + "collapseFull": "$collapseFull", + "expand": "$expandContents", + "expandFull": "$expandGallery" + } + }, "shareDialogue": { "options": { "embedTemplate": "" @@ -68,21 +83,26 @@ "footerPanel": { "options": { "bookmarkEnabled": false, - "downloadEnabled": false, + "downloadEnabled": true, "embedEnabled": false, "feedbackEnabled": false, + "fullscreenEnabled": true, "minimiseButtons": true, + "moreInfoEnabled": true, "openEnabled": false, + "printEnabled": false, "shareEnabled": true }, "content": { "bookmark": "$add_to_bookmarks", "download": "$download", - "embed": "$share", + "embed": "$embed", "exitFullScreen": "$exitFullScreen", + "feedback": "$feedback", "fullScreen": "$fullScreen", "moreInfo": "$moreInfo", - "open": "$oOpen" + "open": "$open", + "share": "$share" } }, "genericDialogue": { @@ -96,9 +116,14 @@ } }, "headerPanel": { + "options": { + "centerOptionsEnabled": true, + "localeToggleEnabled": false, + "settingsButtonEnabled": true + }, "content": { "close": "$close", - "help": "$help" + "settings": "$settings" } }, "helpDialogue": { @@ -151,10 +176,18 @@ "panelAnimationDuration": 250, "panelCollapsedWidth": 30, "panelExpandedWidth": 255, - "panelOpen": true + "panelOpen": true, + "oneColThumbHeight": 320, + "oneColThumbWidth": 200, + "twoColThumbHeight": 150, + "twoColThumbWidth": 90 }, "content": { - "title": "$contents" + "title": "$contents", + "collapse": "$collapse", + "collapseFull": "$collapseFull", + "expand": "$expandContents", + "expandFull": "$expandGallery" } }, "dialogue": { diff --git a/src/content-handlers/iiif/extensions/uv-ebook-extension/Extension.ts b/src/content-handlers/iiif/extensions/uv-ebook-extension/Extension.ts index 7b4d32c80..08d86d794 100644 --- a/src/content-handlers/iiif/extensions/uv-ebook-extension/Extension.ts +++ b/src/content-handlers/iiif/extensions/uv-ebook-extension/Extension.ts @@ -27,8 +27,8 @@ export default class Extension extends BaseExtension $shareDialogue: JQuery; centerPanel: EbookCenterPanel; downloadDialogue: DownloadDialogue; - footerPanel: FooterPanel; - headerPanel: HeaderPanel; + footerPanel: FooterPanel; + headerPanel: HeaderPanel; leftPanel: EbookLeftPanel; mobileFooterPanel: MobileFooterPanel; moreInfoDialogue: MoreInfoDialogue; diff --git a/src/content-handlers/iiif/extensions/uv-ebook-extension/config/Config.ts b/src/content-handlers/iiif/extensions/uv-ebook-extension/config/Config.ts index 30f142a17..e0f0614f1 100644 --- a/src/content-handlers/iiif/extensions/uv-ebook-extension/config/Config.ts +++ b/src/content-handlers/iiif/extensions/uv-ebook-extension/config/Config.ts @@ -1,6 +1,29 @@ -import { BaseConfig } from "@/content-handlers/iiif/BaseConfig"; +import { + BaseConfig, + LeftPanelContent, + LeftPanelOptions, +} from "@/content-handlers/iiif/BaseConfig"; -type Modules = {}; +type EbookLeftPanelOptions = LeftPanelOptions & { + expandFullEnabled: boolean; + panelAnimationDuration: number; + panelCollapsedWidth: number; + panelExpandedWidth: number; + panelOpen: boolean; +}; + +type EbookLeftPanelContent = LeftPanelContent & { + title: string; +}; + +type EbookLeftPanel = { + options: EbookLeftPanelOptions; + content: EbookLeftPanelContent; +}; + +type Modules = { + ebookLeftPanel: EbookLeftPanel; +}; export type Config = BaseConfig & { modules: Modules; diff --git a/src/content-handlers/iiif/extensions/uv-ebook-extension/config/config.json b/src/content-handlers/iiif/extensions/uv-ebook-extension/config/config.json index 3d386e4b5..2ce909d27 100644 --- a/src/content-handlers/iiif/extensions/uv-ebook-extension/config/config.json +++ b/src/content-handlers/iiif/extensions/uv-ebook-extension/config/config.json @@ -46,15 +46,35 @@ "zoomToSearchResultEnabled": true }, "modules": { + "leftPanel": { + "options": { + "expandFullEnabled": false, + "panelAnimationDuration": 250, + "panelCollapsedWidth": 30, + "panelExpandedWidth": 255, + "panelOpen": false + }, + "content": { + "collapse": "$collapse", + "collapseFull": "$collapseFull", + "expand": "$expandContents", + "expandFull": "$expandGallery" + } + }, "ebookLeftPanel": { "options": { "expandFullEnabled": false, "panelAnimationDuration": 250, "panelCollapsedWidth": 30, - "panelExpandedWidth": 255 + "panelExpandedWidth": 255, + "panelOpen": false }, "content": { - "title": "$contents" + "title": "$contents", + "collapse": "$collapse", + "collapseFull": "$collapseFull", + "expand": "$expandContents", + "expandFull": "$expandGallery" } }, "dialogue": { @@ -102,10 +122,12 @@ }, "headerPanel": { "options": { + "centerOptionsEnabled": true, "localeToggleEnabled": false, "settingsButtonEnabled": true }, "content": { + "close": "$close", "settings": "$settings" } }, diff --git a/src/content-handlers/iiif/extensions/uv-mediaelement-extension/Extension.ts b/src/content-handlers/iiif/extensions/uv-mediaelement-extension/Extension.ts index 96c5a83c6..d2b738b8a 100644 --- a/src/content-handlers/iiif/extensions/uv-mediaelement-extension/Extension.ts +++ b/src/content-handlers/iiif/extensions/uv-mediaelement-extension/Extension.ts @@ -39,8 +39,8 @@ export default class Extension extends BaseExtension centerPanel: MediaElementCenterPanel; downloadDialogue: DownloadDialogue; shareDialogue: ShareDialogue; - footerPanel: FooterPanel; - headerPanel: HeaderPanel; + footerPanel: FooterPanel; + headerPanel: HeaderPanel; helpDialogue: HelpDialogue; leftPanel: ResourcesLeftPanel; rightPanel: MoreInfoRightPanel; diff --git a/src/content-handlers/iiif/extensions/uv-mediaelement-extension/config/config.json b/src/content-handlers/iiif/extensions/uv-mediaelement-extension/config/config.json index 829c52041..41ccae357 100644 --- a/src/content-handlers/iiif/extensions/uv-mediaelement-extension/config/config.json +++ b/src/content-handlers/iiif/extensions/uv-mediaelement-extension/config/config.json @@ -46,6 +46,21 @@ "zoomToSearchResultEnabled": true }, "modules": { + "leftPanel": { + "options": { + "expandFullEnabled": false, + "panelAnimationDuration": 250, + "panelCollapsedWidth": 30, + "panelExpandedWidth": 255, + "panelOpen": false + }, + "content": { + "collapse": "$collapse", + "collapseFull": "$collapseFull", + "expand": "$expandContents", + "expandFull": "$expandGallery" + } + }, "shareDialogue": { "options": { "embedTemplate": "" @@ -65,17 +80,22 @@ "footerPanel": { "options": { "bookmarkEnabled": false, + "downloadEnabled": true, "embedEnabled": false, "feedbackEnabled": false, + "fullscreenEnabled": true, "minimiseButtons": true, + "moreInfoEnabled": true, "openEnabled": false, + "printEnabled": false, "shareEnabled": true }, "content": { "bookmark": "$add_to_bookmarks", "download": "$download", - "embed": "$share", + "embed": "$embed", "exitFullScreen": "$exitFullScreen", + "feedback": "$feedback", "fullScreen": "$fullScreen", "moreInfo": "$moreInfo", "open": "$open", @@ -93,9 +113,14 @@ } }, "headerPanel": { + "options": { + "centerOptionsEnabled": true, + "localeToggleEnabled": false, + "settingsButtonEnabled": true + }, "content": { "close": "$close", - "help": "$help" + "settings": "$settings" } }, "helpDialogue": { @@ -162,6 +187,9 @@ } }, "dialogue": { + "options": { + "topCloseButtonEnabled": false + }, "content": { "close": "$close" } diff --git a/src/content-handlers/iiif/extensions/uv-model-viewer-extension/Extension.ts b/src/content-handlers/iiif/extensions/uv-model-viewer-extension/Extension.ts index 0d202eb6f..73b218f06 100644 --- a/src/content-handlers/iiif/extensions/uv-model-viewer-extension/Extension.ts +++ b/src/content-handlers/iiif/extensions/uv-model-viewer-extension/Extension.ts @@ -31,11 +31,11 @@ export default class ModelViewerExtension extends BaseExtension { $settingsDialogue: JQuery; centerPanel: ModelViewerCenterPanel; downloadDialogue: DownloadDialogue; - footerPanel: FooterPanel; - headerPanel: HeaderPanel; + footerPanel: FooterPanel; + headerPanel: HeaderPanel; helpDialogue: HelpDialogue; leftPanel: ContentLeftPanel; - mobileFooterPanel: FooterPanel; + mobileFooterPanel: FooterPanel; moreInfoDialogue: MoreInfoDialogue; rightPanel: MoreInfoRightPanel; settingsDialogue: SettingsDialogue; diff --git a/src/content-handlers/iiif/extensions/uv-model-viewer-extension/config/config.json b/src/content-handlers/iiif/extensions/uv-model-viewer-extension/config/config.json index 56d6d5512..57bdef65c 100644 --- a/src/content-handlers/iiif/extensions/uv-model-viewer-extension/config/config.json +++ b/src/content-handlers/iiif/extensions/uv-model-viewer-extension/config/config.json @@ -65,12 +65,15 @@ }, "footerPanel": { "options": { + "bookmarkEnabled": false, "downloadEnabled": true, "embedEnabled": false, "feedbackEnabled": false, + "fullscreenEnabled": true, "minimiseButtons": true, "moreInfoEnabled": true, "openEnabled": false, + "printEnabled": false, "shareEnabled": true }, "content": { @@ -78,6 +81,7 @@ "download": "$download", "embed": "$embed", "exitFullScreen": "$exitFullScreen", + "feedback": "$feedback", "fullScreen": "$fullScreen", "moreInfo": "$moreInfo", "open": "$open", @@ -95,9 +99,13 @@ } }, "headerPanel": { + "options": { + "centerOptionsEnabled": true, + "localeToggleEnabled": false, + "settingsButtonEnabled": true + }, "content": { "close": "$close", - "help": "$help", "settings": "$settings" } }, @@ -145,6 +153,21 @@ "title": "$moreInformation" } }, + "leftPanel": { + "options": { + "expandFullEnabled": false, + "panelAnimationDuration": 250, + "panelCollapsedWidth": 30, + "panelExpandedWidth": 255, + "panelOpen": false + }, + "content": { + "collapse": "$collapse", + "collapseFull": "$collapseFull", + "expand": "$expandContents", + "expandFull": "$expandGallery" + } + }, "contentLeftPanel": { "options": { "elideCount": 40, @@ -180,6 +203,9 @@ } }, "dialogue": { + "options": { + "topCloseButtonEnabled": false + }, "content": { "close": "$close" } diff --git a/src/content-handlers/iiif/extensions/uv-openseadragon-extension/config/Config.ts b/src/content-handlers/iiif/extensions/uv-openseadragon-extension/config/Config.ts index 93fb303ed..fc2480b93 100644 --- a/src/content-handlers/iiif/extensions/uv-openseadragon-extension/config/Config.ts +++ b/src/content-handlers/iiif/extensions/uv-openseadragon-extension/config/Config.ts @@ -1,4 +1,12 @@ -import { BaseConfig } from "@/content-handlers/iiif/BaseConfig"; +import { + BaseConfig, + FooterPanelContent, + FooterPanelOptions, + HeaderPanelContent, + HeaderPanelOptions, + LeftPanelContent, + LeftPanelOptions, +} from "@/content-handlers/iiif/BaseConfig"; /** * Type for Thumbs Cache Invalidation @@ -10,10 +18,7 @@ type ThumbsCacheInvalidation = { paramType: string; }; -/** - * Type for Content Left Panel Options - */ -type ContentLeftPanelOptions = { +type ContentLeftPanelOptions = LeftPanelOptions & { /** Determines if tree should expand automatically */ autoExpandTreeEnabled: boolean; /** Number of items to auto expand tree */ @@ -28,8 +33,6 @@ type ContentLeftPanelOptions = { defaultToTreeIfGreaterThan: number; /** Number of characters to elide at */ elideCount: number; - /** Determines if full expansion is enabled */ - expandFullEnabled: boolean; /** Threshold for gallery thumb chunked resizing */ galleryThumbChunkedResizingThreshold: number; /** Height of the gallery thumbnail */ @@ -44,14 +47,6 @@ type ContentLeftPanelOptions = { oneColThumbWidth: number; /** Determines if page mode is enabled */ pageModeEnabled: boolean; - /** Duration of the panel animation */ - panelAnimationDuration: number; - /** Width of the collapsed panel */ - panelCollapsedWidth: number; - /** Width of the expanded panel */ - panelExpandedWidth: number; - /** Determines if the panel is open */ - panelOpen: boolean; /** Order of the tabs */ tabOrder: string; /** Configuration for thumbs cache invalidation */ @@ -72,12 +67,8 @@ type ContentLeftPanelOptions = { twoColThumbWidth: number; }; -type ContentLeftPanelContent = { - collapse: string; - collapseFull: string; +type ContentLeftPanelContent = LeftPanelContent & { date: string; - expand: string; - expandFull: string; index: string; manifestRanges: string; searchResult: string; @@ -93,61 +84,6 @@ type ContentLeftPanel = { content: ContentLeftPanelContent; }; -type FooterPanelOptions = { - /** Determines if autocomplete for words is allowed */ - autocompleteAllowWords: boolean; - /** Determines if bookmarking is enabled */ - bookmarkEnabled: boolean; - /** Determines if downloading is enabled */ - downloadEnabled: boolean; - /** Determines if embedding is enabled */ - embedEnabled: boolean; - /** Determines if feedback is enabled */ - feedbackEnabled: boolean; - /** Determines if fullscreen mode is enabled */ - fullscreenEnabled: boolean; - /** Determines if buttons are minimised */ - minimiseButtons: boolean; - /** Determines if more information is enabled */ - moreInfoEnabled: boolean; - /** Determines if opening is enabled */ - openEnabled: boolean; - /** Determines if printing is enabled */ - printEnabled: boolean; - /** Determines if sharing is enabled */ - shareEnabled: boolean; -}; - -type FooterPanelContent = { - bookmark: string; - download: string; - embed: string; - exitFullScreen: string; - feedback: string; - fullScreen: string; - moreInfo: string; - open: string; - share: string; -}; - -type FooterPanel = { - options: FooterPanelOptions; - content: FooterPanelContent; -}; - -type HeaderPanelOptions = { - /** Determines if center options are enabled */ - centerOptionsEnabled: boolean; - /** Determines if locale toggle is enabled */ - localeToggleEnabled: boolean; - /** Determines if settings button is enabled */ - settingsButtonEnabled: boolean; -}; - -type HeaderPanel = { - options: HeaderPanelOptions; -}; - type HelpDialogueContent = { text: string; title: string; @@ -183,23 +119,26 @@ type MultiSelectDialogue = { content: MultiSelectDialogueContent; }; -type PagingHeaderPanelOptions = { - /** Determines if autocomplete box is enabled */ - autoCompleteBoxEnabled: boolean; +type PagingHeaderPanelOptions = HeaderPanelOptions & { /** Determines if autocomplete for words is allowed */ autocompleteAllowWords: boolean; + /** Determines if autocomplete box is enabled */ + autoCompleteBoxEnabled: boolean; /** Determines if gallery button is enabled */ galleryButtonEnabled: boolean; + /** Determines if help is enabled */ + helpEnabled: boolean; /** Determines if image selection box is enabled */ imageSelectionBoxEnabled: boolean; + /** Determines if mode options is enabled */ + modeOptionsEnabled: boolean; /** Determines if page mode is enabled */ pageModeEnabled: boolean; /** Determines if paging toggle is enabled */ pagingToggleEnabled: boolean; }; -type PagingHeaderPanelContent = { - close: string; +type PagingHeaderPanelContent = HeaderPanelContent & { emptyValue: string; first: string; firstImage: string; @@ -222,7 +161,6 @@ type PagingHeaderPanelContent = { previous: string; previousImage: string; previousPage: string; - settings: string; twoUp: string; }; @@ -282,7 +220,9 @@ type OpenSeadragonCenterPanel = { content: OpenSeadragonCenterPanelContent; }; -type SearchFooterPanelOptions = { +type SearchFooterPanelOptions = FooterPanelOptions & { + /** Determines if autocomplete for words is allowed */ + autocompleteAllowWords: boolean; /** Number of terms to elide in details */ elideDetailsTermsCount: number; /** Number of terms to elide in results */ @@ -295,7 +235,7 @@ type SearchFooterPanelOptions = { positionMarkerEnabled: boolean; }; -type SearchFooterPanelContent = { +type SearchFooterPanelContent = FooterPanelContent & { clearSearch: string; defaultLabel: string; displaying: string; @@ -410,8 +350,6 @@ type RestrictedDialogue = { type Modules = { contentLeftPanel: ContentLeftPanel; - footerPanel: FooterPanel; - headerPanel: HeaderPanel; helpDialogue: HelpDialogue; multiSelectDialogue: MultiSelectDialogue; pagingHeaderPanel: PagingHeaderPanel; diff --git a/src/content-handlers/iiif/extensions/uv-openseadragon-extension/config/config.json b/src/content-handlers/iiif/extensions/uv-openseadragon-extension/config/config.json index 78bdf8f56..d0ea1fe0b 100644 --- a/src/content-handlers/iiif/extensions/uv-openseadragon-extension/config/config.json +++ b/src/content-handlers/iiif/extensions/uv-openseadragon-extension/config/config.json @@ -49,6 +49,21 @@ "zoomToBoundsEnabled": true }, "modules": { + "leftPanel": { + "options": { + "expandFullEnabled": false, + "panelAnimationDuration": 250, + "panelCollapsedWidth": 30, + "panelExpandedWidth": 255, + "panelOpen": false + }, + "content": { + "collapse": "$collapse", + "collapseFull": "$collapseFull", + "expand": "$expandContents", + "expandFull": "$expandGallery" + } + }, "contentLeftPanel": { "options": { "autoExpandTreeEnabled": false, @@ -145,7 +160,6 @@ }, "footerPanel": { "options": { - "autocompleteAllowWords": false, "bookmarkEnabled": false, "downloadEnabled": true, "embedEnabled": false, @@ -184,6 +198,10 @@ "centerOptionsEnabled": true, "localeToggleEnabled": false, "settingsButtonEnabled": true + }, + "content": { + "close": "$close", + "settings": "$settings" } }, "helpDialogue": { @@ -252,7 +270,12 @@ "galleryButtonEnabled": true, "imageSelectionBoxEnabled": false, "pageModeEnabled": false, - "pagingToggleEnabled": true + "pagingToggleEnabled": true, + "centerOptionsEnabled": true, + "localeToggleEnabled": false, + "settingsButtonEnabled": true, + "helpEnabled": true, + "modeOptionsEnabled": true }, "content": { "close": "$close", @@ -314,11 +337,22 @@ }, "searchFooterPanel": { "options": { + "autocompleteAllowWords": false, "elideDetailsTermsCount": 20, "elideResultsTermsCount": 10, "forceImageMode": false, "pageModeEnabled": true, - "positionMarkerEnabled": true + "positionMarkerEnabled": true, + "bookmarkEnabled": false, + "downloadEnabled": true, + "embedEnabled": false, + "feedbackEnabled": false, + "fullscreenEnabled": true, + "minimiseButtons": true, + "moreInfoEnabled": true, + "openEnabled": false, + "printEnabled": false, + "shareEnabled": true }, "content": { "clearSearch": "$clearSearch", @@ -336,7 +370,16 @@ "print": "$print", "resultFoundFor": "$resultFoundFor", "resultsFoundFor": "$resultsFoundFor", - "searchWithin": "$searchWithinItem" + "searchWithin": "$searchWithinItem", + "bookmark": "$add_to_bookmarks", + "download": "$download", + "embed": "$embed", + "exitFullScreen": "$exitFullScreen", + "feedback": "$feedback", + "fullScreen": "$fullScreen", + "moreInfo": "$moreInfo", + "open": "$open", + "share": "$share" } }, "settingsDialogue": { diff --git a/src/content-handlers/iiif/extensions/uv-pdf-extension/Extension.ts b/src/content-handlers/iiif/extensions/uv-pdf-extension/Extension.ts index 845ff57f6..cb550fbeb 100644 --- a/src/content-handlers/iiif/extensions/uv-pdf-extension/Extension.ts +++ b/src/content-handlers/iiif/extensions/uv-pdf-extension/Extension.ts @@ -27,7 +27,7 @@ export default class Extension extends BaseExtension centerPanel: PDFCenterPanel; downloadDialogue: DownloadDialogue; shareDialogue: ShareDialogue; - footerPanel: FooterPanel; + footerPanel: FooterPanel; headerPanel: PDFHeaderPanel; leftPanel: ResourcesLeftPanel; rightPanel: MoreInfoRightPanel; diff --git a/src/content-handlers/iiif/extensions/uv-pdf-extension/config/Config.ts b/src/content-handlers/iiif/extensions/uv-pdf-extension/config/Config.ts index e3aeb9a30..254955eeb 100644 --- a/src/content-handlers/iiif/extensions/uv-pdf-extension/config/Config.ts +++ b/src/content-handlers/iiif/extensions/uv-pdf-extension/config/Config.ts @@ -1,6 +1,31 @@ -import { BaseConfig, Options } from "@/content-handlers/iiif/BaseConfig"; +import { + BaseConfig, + HeaderPanelContent, + HeaderPanelOptions, + Options, +} from "@/content-handlers/iiif/BaseConfig"; -type Modules = {}; +type PDFHeaderPanelOptions = HeaderPanelOptions & {}; + +type PDFHeaderPanelContent = HeaderPanelContent & { + emptyValue: string; + first: string; + go: string; + last: string; + next: string; + of: string; + pageSearchLabel: string; + previous: string; +}; + +type PDFHeaderPanel = { + options: PDFHeaderPanelOptions; + content: PDFHeaderPanelContent; +}; + +type Modules = { + pdfHeaderPanel: PDFHeaderPanel; +}; type PDFOptions = Options & { /** Determines if PDF.js should be used for PDF rendering */ diff --git a/src/content-handlers/iiif/extensions/uv-pdf-extension/config/config.json b/src/content-handlers/iiif/extensions/uv-pdf-extension/config/config.json index 6aa78a979..fcdf5cbc9 100644 --- a/src/content-handlers/iiif/extensions/uv-pdf-extension/config/config.json +++ b/src/content-handlers/iiif/extensions/uv-pdf-extension/config/config.json @@ -47,6 +47,21 @@ "zoomToSearchResultEnabled": true }, "modules": { + "leftPanel": { + "options": { + "expandFullEnabled": false, + "panelAnimationDuration": 250, + "panelCollapsedWidth": 30, + "panelExpandedWidth": 255, + "panelOpen": false + }, + "content": { + "collapse": "$collapse", + "collapseFull": "$collapseFull", + "expand": "$expandContents", + "expandFull": "$expandGallery" + } + }, "shareDialogue": { "options": { "embedTemplate": "" @@ -66,10 +81,14 @@ "footerPanel": { "options": { "bookmarkEnabled": false, + "downloadEnabled": true, "embedEnabled": false, "feedbackEnabled": false, + "fullscreenEnabled": true, "minimiseButtons": true, + "moreInfoEnabled": true, "openEnabled": false, + "printEnabled": false, "shareEnabled": true }, "content": { @@ -95,9 +114,14 @@ } }, "headerPanel": { + "options": { + "centerOptionsEnabled": true, + "localeToggleEnabled": false, + "settingsButtonEnabled": true + }, "content": { "close": "$close", - "help": "$help" + "settings": "$settings" } }, "helpDialogue": { @@ -174,6 +198,9 @@ } }, "dialogue": { + "options": { + "topCloseButtonEnabled": false + }, "content": { "close": "$close" } @@ -205,6 +232,11 @@ } }, "pdfHeaderPanel": { + "options": { + "centerOptionsEnabled": true, + "localeToggleEnabled": false, + "settingsButtonEnabled": true + }, "content": { "emptyValue": "$pleaseEnterValue", "first": "$first", @@ -212,7 +244,10 @@ "last": "$last", "next": "$next", "of": "$of", - "previous": "$previous" + "previous": "$previous", + "pageSearchLabel": "$searchByPageNumber", + "close": "$close", + "settings": "$settings" } }, "loginDialogue": { diff --git a/src/content-handlers/iiif/modules/uv-alephleftpanel-module/AlephLeftPanel.ts b/src/content-handlers/iiif/modules/uv-alephleftpanel-module/AlephLeftPanel.ts index ea9a603cb..d743d8fdb 100644 --- a/src/content-handlers/iiif/modules/uv-alephleftpanel-module/AlephLeftPanel.ts +++ b/src/content-handlers/iiif/modules/uv-alephleftpanel-module/AlephLeftPanel.ts @@ -5,8 +5,11 @@ import { applyPolyfills, defineCustomElements, } from "@universalviewer/aleph/loader"; +import { Config } from "../../extensions/uv-aleph-extension/config/Config"; -export class AlephLeftPanel extends LeftPanel { +export class AlephLeftPanel extends LeftPanel< + Config["modules"]["alephLeftPanel"] +> { private _alControlPanel: any; constructor($element: JQuery) { diff --git a/src/content-handlers/iiif/modules/uv-contentleftpanel-module/ContentLeftPanel.ts b/src/content-handlers/iiif/modules/uv-contentleftpanel-module/ContentLeftPanel.ts index 8de25d912..96bbb4a4e 100644 --- a/src/content-handlers/iiif/modules/uv-contentleftpanel-module/ContentLeftPanel.ts +++ b/src/content-handlers/iiif/modules/uv-contentleftpanel-module/ContentLeftPanel.ts @@ -22,8 +22,11 @@ import { } from "manifesto.js"; import { AnnotationGroup, TreeSortType } from "@iiif/manifold"; import { isVisible } from "../../../../Utils"; +import { Config } from "../../extensions/uv-openseadragon-extension/config/Config"; -export class ContentLeftPanel extends LeftPanel { +export class ContentLeftPanel extends LeftPanel< + Config["modules"]["contentLeftPanel"] +> { $bottomOptions: JQuery; $galleryView: JQuery; $leftOptions: JQuery; diff --git a/src/content-handlers/iiif/modules/uv-dialogues-module/LoginDialogue.ts b/src/content-handlers/iiif/modules/uv-dialogues-module/LoginDialogue.ts index a0ae02ca2..7983ffba3 100644 --- a/src/content-handlers/iiif/modules/uv-dialogues-module/LoginDialogue.ts +++ b/src/content-handlers/iiif/modules/uv-dialogues-module/LoginDialogue.ts @@ -1,10 +1,13 @@ const $ = require("jquery"); +import { BaseConfig } from "../../BaseConfig"; import { IIIFEvents } from "../../IIIFEvents"; import { Dialogue } from "../uv-shared-module/Dialogue"; import { ILoginDialogueOptions } from "../uv-shared-module/ILoginDialogueOptions"; import { IExternalResource } from "manifesto.js"; -export class LoginDialogue extends Dialogue { +export class LoginDialogue extends Dialogue< + BaseConfig["modules"]["loginDialogue"] +> { loginCallback: any; logoutCallback: any; $cancelButton: JQuery; diff --git a/src/content-handlers/iiif/modules/uv-ebookleftpanel-module/EbookLeftPanel.ts b/src/content-handlers/iiif/modules/uv-ebookleftpanel-module/EbookLeftPanel.ts index e1ffb0b3b..cad86026c 100644 --- a/src/content-handlers/iiif/modules/uv-ebookleftpanel-module/EbookLeftPanel.ts +++ b/src/content-handlers/iiif/modules/uv-ebookleftpanel-module/EbookLeftPanel.ts @@ -7,8 +7,11 @@ import { applyPolyfills, defineCustomElements, } from "@universalviewer/uv-ebook-components/loader"; +import { Config } from "../../extensions/uv-ebook-extension/config/Config"; -export class EbookLeftPanel extends LeftPanel { +export class EbookLeftPanel extends LeftPanel< + Config["modules"]["ebookLeftPanel"] +> { private _ebookTOC: any; private _$container: JQuery; private _$ebookTOC: JQuery; diff --git a/src/content-handlers/iiif/modules/uv-ebookmobilefooterpanel-module/MobileFooter.ts b/src/content-handlers/iiif/modules/uv-ebookmobilefooterpanel-module/MobileFooter.ts index 037a90984..cfeb09887 100644 --- a/src/content-handlers/iiif/modules/uv-ebookmobilefooterpanel-module/MobileFooter.ts +++ b/src/content-handlers/iiif/modules/uv-ebookmobilefooterpanel-module/MobileFooter.ts @@ -1,6 +1,9 @@ +import { Config } from "../../extensions/uv-ebook-extension/config/Config"; import { FooterPanel as BaseFooterPanel } from "../uv-shared-module/FooterPanel"; -export class FooterPanel extends BaseFooterPanel { +export class FooterPanel extends BaseFooterPanel< + Config["modules"]["footerPanel"] +> { $fullScreenBtn: JQuery; constructor($element: JQuery) { diff --git a/src/content-handlers/iiif/modules/uv-modelviewercenterpanel-module/ModelViewerCenterPanel.ts b/src/content-handlers/iiif/modules/uv-modelviewercenterpanel-module/ModelViewerCenterPanel.ts index f75d7e616..f59571039 100644 --- a/src/content-handlers/iiif/modules/uv-modelviewercenterpanel-module/ModelViewerCenterPanel.ts +++ b/src/content-handlers/iiif/modules/uv-modelviewercenterpanel-module/ModelViewerCenterPanel.ts @@ -12,6 +12,7 @@ import { Async } from "@edsilv/utils"; import { AnnotationGroup } from "@iiif/manifold"; import ModelViewerExtension from "../../extensions/uv-model-viewer-extension/Extension"; import { Events } from "../../../../Events"; +import { Config } from "../../extensions/uv-model-viewer-extension/config/Config"; export class ModelViewerCenterPanel extends CenterPanel { $modelviewer: JQuery; @@ -55,9 +56,11 @@ export class ModelViewerCenterPanel extends CenterPanel { this.$modelviewer = $( ` extends BaseFooterPanel { constructor($element: JQuery) { super($element); } diff --git a/src/content-handlers/iiif/modules/uv-pagingheaderpanel-module/PagingHeaderPanel.ts b/src/content-handlers/iiif/modules/uv-pagingheaderpanel-module/PagingHeaderPanel.ts index ace219417..43237080e 100644 --- a/src/content-handlers/iiif/modules/uv-pagingheaderpanel-module/PagingHeaderPanel.ts +++ b/src/content-handlers/iiif/modules/uv-pagingheaderpanel-module/PagingHeaderPanel.ts @@ -9,8 +9,11 @@ import { sanitize } from "../../../../Utils"; import { ViewingDirection } from "@iiif/vocabulary/dist-commonjs/"; import { Bools, Strings } from "@edsilv/utils"; import { Canvas, LanguageMap, ManifestType } from "manifesto.js"; +import { Config } from "../../extensions/uv-openseadragon-extension/config/Config"; -export class PagingHeaderPanel extends HeaderPanel { +export class PagingHeaderPanel extends HeaderPanel< + Config["modules"]["pagingHeaderPanel"] +> { $autoCompleteBox: JQuery; $firstButton: JQuery; $galleryButton: JQuery; diff --git a/src/content-handlers/iiif/modules/uv-pdfheaderpanel-module/PDFHeaderPanel.ts b/src/content-handlers/iiif/modules/uv-pdfheaderpanel-module/PDFHeaderPanel.ts index 4ea46dd4b..fe2388f5d 100644 --- a/src/content-handlers/iiif/modules/uv-pdfheaderpanel-module/PDFHeaderPanel.ts +++ b/src/content-handlers/iiif/modules/uv-pdfheaderpanel-module/PDFHeaderPanel.ts @@ -1,10 +1,13 @@ const $ = require("jquery"); import { IIIFEvents } from "../../IIIFEvents"; import { PDFExtensionEvents } from "../../extensions/uv-pdf-extension/Events"; +import { Config } from "../../extensions/uv-pdf-extension/config/Config"; import { HeaderPanel } from "../uv-shared-module/HeaderPanel"; import { Strings } from "@edsilv/utils"; -export class PDFHeaderPanel extends HeaderPanel { +export class PDFHeaderPanel extends HeaderPanel< + Config["modules"]["pdfHeaderPanel"] +> { $firstButton: JQuery; $lastButton: JQuery; $nextButton: JQuery; diff --git a/src/content-handlers/iiif/modules/uv-resourcesleftpanel-module/ResourcesLeftPanel.ts b/src/content-handlers/iiif/modules/uv-resourcesleftpanel-module/ResourcesLeftPanel.ts index 45589f844..61af584db 100644 --- a/src/content-handlers/iiif/modules/uv-resourcesleftpanel-module/ResourcesLeftPanel.ts +++ b/src/content-handlers/iiif/modules/uv-resourcesleftpanel-module/ResourcesLeftPanel.ts @@ -5,8 +5,11 @@ import { ThumbsView } from "./ThumbsView"; import { ViewingDirection, MediaType } from "@iiif/vocabulary/dist-commonjs/"; import { Files } from "@edsilv/utils"; import { Annotation, LanguageMap, Resource } from "manifesto.js"; +import { Config } from "../../extensions/uv-default-extension/config/Config"; -export class ResourcesLeftPanel extends LeftPanel { +export class ResourcesLeftPanel extends LeftPanel< + Config["modules"]["resourcesLeftPanel"] +> { $resources: JQuery; $resourcesButton: JQuery; $resourcesView: JQuery; diff --git a/src/content-handlers/iiif/modules/uv-shared-module/BaseExpandPanel.ts b/src/content-handlers/iiif/modules/uv-shared-module/BaseExpandPanel.ts index 00ad07484..fc6c61758 100644 --- a/src/content-handlers/iiif/modules/uv-shared-module/BaseExpandPanel.ts +++ b/src/content-handlers/iiif/modules/uv-shared-module/BaseExpandPanel.ts @@ -2,8 +2,11 @@ const $ = require("jquery"); import { BaseView } from "./BaseView"; import { Bools } from "@edsilv/utils"; import { IIIFEvents } from "../../IIIFEvents"; +import { BaseConfig } from "../../BaseConfig"; -export class BaseExpandPanel extends BaseView { +export class BaseExpandPanel< + T extends BaseConfig["modules"]["leftPanel"] +> extends BaseView { isExpanded: boolean = false; isFullyExpanded: boolean = false; isUnopened: boolean = true; diff --git a/src/content-handlers/iiif/modules/uv-shared-module/BaseView.ts b/src/content-handlers/iiif/modules/uv-shared-module/BaseView.ts index 789cd22cd..a20b7acd2 100644 --- a/src/content-handlers/iiif/modules/uv-shared-module/BaseView.ts +++ b/src/content-handlers/iiif/modules/uv-shared-module/BaseView.ts @@ -2,13 +2,14 @@ const $ = require("jquery"); import { Panel } from "./Panel"; import { IExtension } from "./IExtension"; import { IIIFExtensionHost } from "../../IIIFExtensionHost"; +import { ModuleConfig } from "../../BaseConfig"; -export class BaseView extends Panel { - config: any; - content: any; +export class BaseView extends Panel { + config: T; + content: T["content"]; extension: IExtension; modules: string[]; - options: any; + options: T["options"]; constructor( $element: JQuery, @@ -31,9 +32,9 @@ export class BaseView extends Panel { (this.extensionHost).extension ); - this.config = {}; - this.config.content = {}; - this.config.options = {}; + this.config = {} as T; + this.config.content = {} as T["content"]; + this.config.options = {} as T["options"]; var that = this; diff --git a/src/content-handlers/iiif/modules/uv-shared-module/Dialogue.ts b/src/content-handlers/iiif/modules/uv-shared-module/Dialogue.ts index 668cef20d..b5f03ddca 100644 --- a/src/content-handlers/iiif/modules/uv-shared-module/Dialogue.ts +++ b/src/content-handlers/iiif/modules/uv-shared-module/Dialogue.ts @@ -2,8 +2,11 @@ const $ = require("jquery"); import { BaseView } from "./BaseView"; import { IIIFEvents } from "../../IIIFEvents"; import { Maths } from "@edsilv/utils"; +import { BaseConfig } from "../../BaseConfig"; -export class Dialogue extends BaseView { +export class Dialogue< + T extends BaseConfig["modules"]["dialogue"] +> extends BaseView { allowClose: boolean = true; isActive: boolean = false; isUnopened: boolean = true; @@ -66,7 +69,7 @@ export class Dialogue extends BaseView { this.$bottom = $('
'); this.$element.append(this.$bottom); - if (this.config.topCloseButtonEnabled) { + if (this.options.topCloseButtonEnabled) { this.$top.append(this.$closeButton); } else { this.$buttons.append(this.$closeButton); diff --git a/src/content-handlers/iiif/modules/uv-shared-module/FooterPanel.ts b/src/content-handlers/iiif/modules/uv-shared-module/FooterPanel.ts index 2cb66b353..1eee2636d 100644 --- a/src/content-handlers/iiif/modules/uv-shared-module/FooterPanel.ts +++ b/src/content-handlers/iiif/modules/uv-shared-module/FooterPanel.ts @@ -3,8 +3,11 @@ import { IIIFEvents } from "../../IIIFEvents"; import { BaseView } from "./BaseView"; import { Bools, Documents } from "@edsilv/utils"; import { Events } from "../../../../Events"; +import { BaseConfig } from "../../BaseConfig"; -export class FooterPanel extends BaseView { +export class FooterPanel< + T extends BaseConfig["modules"]["footerPanel"] +> extends BaseView { $feedbackButton: JQuery; $bookmarkButton: JQuery; $downloadButton: JQuery; diff --git a/src/content-handlers/iiif/modules/uv-shared-module/HeaderPanel.ts b/src/content-handlers/iiif/modules/uv-shared-module/HeaderPanel.ts index ad31c3bb5..ecd107f41 100644 --- a/src/content-handlers/iiif/modules/uv-shared-module/HeaderPanel.ts +++ b/src/content-handlers/iiif/modules/uv-shared-module/HeaderPanel.ts @@ -8,8 +8,11 @@ import { InformationArgs } from "./InformationArgs"; import { InformationFactory } from "./InformationFactory"; import { Bools } from "@edsilv/utils"; import { isVisible } from "../../../../Utils"; +import { BaseConfig } from "../../BaseConfig"; -export class HeaderPanel extends BaseView { +export class HeaderPanel< + T extends BaseConfig["modules"]["headerPanel"] +> extends BaseView { $centerOptions: JQuery; $helpButton: JQuery; $informationBox: JQuery; diff --git a/src/content-handlers/iiif/modules/uv-shared-module/ILoginDialogueOptions.ts b/src/content-handlers/iiif/modules/uv-shared-module/ILoginDialogueOptions.ts index 1203d16d1..4f0966110 100644 --- a/src/content-handlers/iiif/modules/uv-shared-module/ILoginDialogueOptions.ts +++ b/src/content-handlers/iiif/modules/uv-shared-module/ILoginDialogueOptions.ts @@ -1,4 +1,5 @@ export interface ILoginDialogueOptions { showCancelButton: boolean; warningMessage: string; + topCloseButtonEnabled: boolean; } diff --git a/src/content-handlers/iiif/modules/uv-shared-module/LeftPanel.ts b/src/content-handlers/iiif/modules/uv-shared-module/LeftPanel.ts index c11e350f8..48ab05a03 100644 --- a/src/content-handlers/iiif/modules/uv-shared-module/LeftPanel.ts +++ b/src/content-handlers/iiif/modules/uv-shared-module/LeftPanel.ts @@ -1,8 +1,11 @@ +import { BaseConfig } from "../../BaseConfig"; import { IIIFEvents } from "../../IIIFEvents"; import { BaseExpandPanel } from "./BaseExpandPanel"; import { Bools } from "@edsilv/utils"; -export class LeftPanel extends BaseExpandPanel { +export class LeftPanel< + T extends BaseConfig["modules"]["leftPanel"] +> extends BaseExpandPanel { constructor($element: JQuery) { super($element); } diff --git a/src/content-handlers/iiif/modules/uv-shared-module/Shell.ts b/src/content-handlers/iiif/modules/uv-shared-module/Shell.ts index 30aa25c1b..da85b7703 100644 --- a/src/content-handlers/iiif/modules/uv-shared-module/Shell.ts +++ b/src/content-handlers/iiif/modules/uv-shared-module/Shell.ts @@ -1,10 +1,11 @@ const $ = require("jquery"); import { isVisible } from "../../../../Utils"; +import { BaseConfig } from "../../BaseConfig"; import { IIIFEvents } from "../../IIIFEvents"; import { BaseView } from "./BaseView"; import { GenericDialogue } from "./GenericDialogue"; -export class Shell extends BaseView { +export class Shell extends BaseView { public $centerPanel: JQuery; public $element: JQuery; public $footerPanel: JQuery;