Skip to content

Commit e404968

Browse files
Merge branch 'restore-decorator-support_contribute-9.0'
2 parents ef8b124 + 35dd379 commit e404968

255 files changed

Lines changed: 2285 additions & 1817 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ yarn-error.log
4242
junit.xml
4343

4444
/src/mirador-viewer/config.local.js
45+
46+
## ignore the auto-generated decorator registries
47+
decorator-registries/

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"serve": "ts-node -r tsconfig-paths/register --project ./tsconfig.ts-node.json scripts/serve.ts",
1313
"serve:ssr": "node dist/server/main",
1414
"analyze": "webpack-bundle-analyzer dist/browser/stats.json",
15+
"generate:decorator:registries": "ts-node --project ./tsconfig.ts-node.json scripts/generate-decorator-registries.ts",
1516
"build": "ng build --configuration development",
1617
"build:stats": "ng build --stats-json",
1718
"build:prod": "cross-env NODE_ENV=production npm run build:ssr",
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { DecoratorParam } from './decorator-param.interface';
2+
3+
/**
4+
* The configuration for a dynamic component decorator. This is used to generate the registry files.
5+
*/
6+
export interface DecoratorConfig {
7+
/**
8+
* Name of the decorator
9+
*/
10+
name: string;
11+
12+
/**
13+
* List of DecoratorParams
14+
*/
15+
params: DecoratorParam[];
16+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
* The configuration for a decorator parameter.
3+
*/
4+
export interface DecoratorParam {
5+
/**
6+
* The name of the parameter
7+
*/
8+
name: string;
9+
10+
/**
11+
* The default value of the decorator param
12+
*
13+
* (Optional)
14+
*/
15+
default?: string;
16+
17+
/**
18+
* The property of the provided parameter value that should be used instead of the value itself.
19+
*
20+
* For example, if the parameter value is {@link ResourceType} 'BITSTREAM', you'll want to use 'BITSTREAM.value'
21+
* instead of the whole {@link ResourceType} object. In this case the {@link DecoratorParam#property} is `value`.
22+
*
23+
* (Optional)
24+
*/
25+
property?: string;
26+
}

0 commit comments

Comments
 (0)