forked from DSpace/dspace-angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
107671: Split Theme model & ThemeConfig classes in separate files to …
…prevent circular dependencies
- Loading branch information
1 parent
63ad040
commit 9f5e7d6
Showing
13 changed files
with
71 additions
and
69 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { Config } from './config.interface'; | ||
|
||
export interface NamedThemeConfig extends Config { | ||
name: string; | ||
|
||
/** | ||
* Specify another theme to build upon: whenever a themed component is not found in the current theme, | ||
* its ancestor theme(s) will be checked recursively before falling back to the default theme. | ||
*/ | ||
extends?: string; | ||
|
||
/** | ||
* A list of HTML tags that should be added to the HEAD section of the document, whenever this theme is active. | ||
*/ | ||
headTags?: HeadTagConfig[]; | ||
} | ||
|
||
/** | ||
* Interface that represents a single theme-specific HTML tag in the HEAD section of the page. | ||
*/ | ||
export interface HeadTagConfig extends Config { | ||
/** | ||
* The name of the HTML tag | ||
*/ | ||
tagName: string; | ||
|
||
/** | ||
* The attributes on the HTML tag | ||
*/ | ||
attributes?: { | ||
[key: string]: string; | ||
}; | ||
} | ||
|
||
export interface RegExThemeConfig extends NamedThemeConfig { | ||
regex: string; | ||
} | ||
|
||
export interface HandleThemeConfig extends NamedThemeConfig { | ||
handle: string; | ||
} | ||
|
||
export interface UUIDThemeConfig extends NamedThemeConfig { | ||
uuid: string; | ||
} | ||
|
||
export type ThemeConfig | ||
= NamedThemeConfig | ||
| RegExThemeConfig | ||
| HandleThemeConfig | ||
| UUIDThemeConfig; |
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